---
title: "Update snippet"
method: PATCH
path: "/snippets/{id}"
tags: ["Snippets"]
---

# Update snippet

`PATCH /snippets/{id}`

## Request

- Base URL: `https://api.openwhispr.com/api/v1`
- URL: `https://api.openwhispr.com/api/v1/snippets/{id}`
- Auth: HTTP bearer

Change a snippet's trigger, replacement, or both. At least one field is required. Requires snippets:write on a personal key (owk_live_). Returns 403 forbidden for managed users whose organization has turned off cloud backup.

## Path parameters

- `id` string, required

## Request body

- SnippetUpdateRequest: At least one of trigger or replacement is required.
  - `trigger` string: New trigger phrase.
  - `replacement` string: New replacement text.

## Response `200`

Updated snippet.

- object
  - `data` Snippet
    - `id` string
    - `trigger` string: Phrase that fires the snippet when dictated.
    - `replacement` string: Text the trigger is replaced with.
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400`: Validation error — no fields provided, or trigger outside 1-100 characters.
- `403`: Missing snippets:write, a workspace key, or cloud backup turned off by your organization.
- `404`: Snippet not found.
- `409`: Another snippet already uses that trigger.

## Changes

- **2026-11-03** `cf6557643deb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openwhispr/apis/openwhispr-api/changes/snippets/:id/patch.md)

---

[API](https://skmtc.dev/openwhispr/apis/openwhispr-api.md) - [All operations](https://skmtc.dev/openwhispr/apis/openwhispr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openwhispr/apis/openwhispr-api/revisions/cf6557643deb?raw)
