---
title: "Create snippet"
method: POST
path: "/snippets/create"
tags: ["Snippets"]
---

# Create snippet

`POST /snippets/create`

## Request

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

Create a snippet: a trigger phrase and the text it expands into. Requires snippets:write on a personal key (owk_live_). Returns 403 forbidden for managed users whose organization has turned off cloud backup.

## Request body

- SnippetCreateRequest
  - `trigger` string, required: Phrase that fires the snippet.
  - `replacement` string, required: Text the trigger becomes.

## Response `201`

Created 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 — missing field or trigger outside 1-100 characters.
- `403`: Missing snippets:write, a workspace key, or cloud backup turned off by your organization.
- `409`: A snippet with that trigger already exists.

## Changes

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

[Operation history](https://skmtc.dev/openwhispr/apis/openwhispr-api/changes/snippets/create/post.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)
