Skip to main content
POST
/
snippets
Create multiple snippets
curl --request POST \
  --url https://www.getsnippets.ai/api/prompts/snippets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "snippets": [
    {
      "title": "My API Snippet",
      "content": {
        "type": "plaintext",
        "content": "Hello, world!"
      },
      "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "note": "<string>",
      "shortcut": "<string>",
      "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "tagIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "additionalVariations": [
        {
          "content": {
            "type": "plaintext",
            "content": "Hello, world!"
          },
          "variationName": "Spanish Version"
        }
      ]
    }
  ]
}
'
{
  "success": true,
  "data": {
    "message": "<string>",
    "createdSnippets": [
      {
        "snippetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    ]
  },
  "usage": {
    "remainingRequests": 123,
    "usageDeducted": 123
  },
  "metadata": {
    "requestedCount": 123,
    "createdCount": 123,
    "failedCount": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.getsnippets.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Body

application/json
snippets
object[]
required
Maximum array length: 100

Response

Snippets created successfully

success
boolean
Example:

true

data
object
usage
object
metadata
object