# Update saved reply

**PATCH** `/saved-replies/{id}`

Changes the fields that are present. Only the user who created a personal reply can
change it, and only workspace owners and admins, and API keys, can change workspace and
team replies. They can also move anyone's personal reply to scope `workspace` or
`teams`, and a reply between those two. A workspace or team reply can't become
personal. `createdBy` never changes.

- `400` with code `gateway_invalid_request`, `messaging_saved_reply_invalid_input` or
  `messaging_saved_reply_body_invalid`: as for create; moving to scope `teams` needs
  `teamIds`.
- `403` with code `messaging_saved_reply_manage_shared_denied`: an agent changed a
  workspace or team reply, or moved a personal one to them.
- `403` with code `messaging_saved_reply_owner_only`: a workspace owner or admin, or an
  API key, changed another user's personal reply without moving it to scope
  `workspace` or `teams`.
- `404` with code `messaging_saved_reply_not_found`: the reply doesn't exist, or it is
  another user's personal reply and the caller is an agent, or it is a team reply and
  the caller is an agent who isn't a member of any of its teams. API keys, workspace
  owners and admins read every reply.
- `404` with code `messaging_saved_reply_team_not_found`: a team isn't a team of the
  workspace, or it was deleted.
- `422` with code `messaging_saved_reply_scope_change_denied`: a workspace or team reply
  was moved to scope `personal`.
- `422` with code `messaging_saved_reply_limit_reached`: moving a personal reply would
  exceed 500 workspace and team replies.

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

## Parameters

- `id` (path string, required) - Saved reply ID.

## Request body

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

## Responses

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