---
title: "Edit AI Snippet"
method: PATCH
path: "/ai/settings/snippets/{aiSnippetId}"
tags: ["AI"]
---

# Edit AI Snippet

`PATCH /ai/settings/snippets/{aiSnippetId}`

## Request

- Base URL: `https://api.crowdin.com/api/v2`
- URL: `https://api.crowdin.com/api/v2/ai/settings/snippets/{aiSnippetId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/docs/ai/settings/snippets/:aiSnippetId/patch.ts> (a function with typed inputs; its response is checked against the schema)

**Required scopes:** `ai.prompt` (Read and Write).

## Path parameters

- `aiSnippetId` integer, required

## Request body

- AiCustomPlaceholderOperation[]: A JSON Patch document as defined by <a href="https://tools.ietf.org/html/rfc6902#section-3" target="_blank">RFC 6902</a>
  - `op` 'replace' | 'test', required: Patch operation to perform
  - `path` '/description' | '/placeholder' | '/value', json-pointer, required: A JSON Pointer as defined by <a href="https://tools.ietf.org/html/rfc6901" target="_blank">RFC 6901</a>

## Response `200`

AI Snippet was successfully updated

- AiCustomPlaceholderResource: Base schema of resource container. Container is a wrapper object that contains payload in required `data` property and provides space for adding any other metadata.
  - `data` AiCustomPlaceholder, required
    - `id` integer
    - `description` string
    - `placeholder` string
    - `value` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400`: Invalid Request Parameters
- `401`: Unauthorized
- `403`: Forbidden
- `404`: AI Snippet with specified user id and id was not found
- `405`: Method Not Allowed

---

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