Skip to main content
PUT
/
snippet
Update a snippet
curl --request PUT \
  --url https://www.getsnippets.ai/api/prompts/snippet \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<string>",
  "note": "<string>",
  "shortcut": "<string>",
  "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tagIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "content": {
    "type": "plaintext",
    "content": "Hello, world!"
  },
  "isArchived": true
}'
{
"success": true,
"data": {
"snippetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"usage": {
"remainingRequests": 123
},
"metadata": {
"fieldsUpdated": {},
"tagsAttached": 123
}
}

Authorizations

Authorization
string
header
required

API key authentication using Bearer token. Include your API key in the Authorization header.

Query Parameters

id
string<uuid>
required

The ID of the snippet to update

Body

application/json
title
string
Maximum length: 200
note
string
Maximum length: 5000
shortcut
string
Maximum length: 100
folderId
string<uuid> | null
tagIds
string<uuid>[]
content
object
isArchived
boolean

Response

Snippet updated successfully

success
boolean
Example:

true

data
object
usage
object
metadata
object