# Create saved reply

**POST** `/saved-replies`

Creates a saved reply; `createdBy` is the calling user. Any agent can create a
personal reply; workspace and team replies need a workspace owner or admin, or an API
key. An API key can't create a personal reply because it has no user to manage it.

- `400` with code `gateway_invalid_request`: the request breaks this schema, for
  example a length, the `shortcut` pattern, an unknown `scope` or more than 50
  `teamIds`.
- `400` with code `messaging_saved_reply_invalid_input`: `title` or `body` is only
  whitespace, `teamIds` is empty for scope `teams`, or set for another scope.
- `400` with code `messaging_saved_reply_body_invalid`: `body` isn't a valid template.
- `400` with code `messaging_saved_reply_owner_required`: an API key created a
  personal reply.
- `403` with code `messaging_saved_reply_manage_shared_denied`: an agent created a
  workspace or team reply.
- `404` with code `messaging_saved_reply_team_not_found`: a team doesn't exist in the
  workspace.
- `422` with code `messaging_saved_reply_limit_reached`: the workspace has 500
  workspace and team replies, or the caller has 100 personal replies.

Authentication: bearerAuth
Required scopes: `saved_reply:create`
Allowed roles: `owner`, `admin`, `agent`
Authorization: Create a saved reply; shared scopes also require saved_reply:manage_shared.

## Request body

- `application/json`: [CreateSavedReplyRequest](/api/reference/schemas/create-saved-reply-request.md) required.

## Responses

- `201` ([SavedReply](/api/reference/schemas/saved-reply.md)): Saved reply created
- `default` ([ProblemDetails](/api/reference/schemas/problem-details.md)): Error
