Skip to main content
POST
/
v1
/
system-prompts
Create System Prompt
curl --request POST \
  --url https://api.cuadra.ai/v1/system-prompts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "enabled": true,
  "particles": [
    {
      "particleId": "<string>",
      "particleVersionId": "pv_xyz789",
      "order": 0
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "enabled": true,
  "isSystem": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "description": "System prompt for customer support interactions",
  "totalTokenCount": 150,
  "particleCount": 3,
  "particles": [
    {
      "id": "<string>",
      "particleId": "<string>",
      "order": 123,
      "particleName": "Professional Tone",
      "particleCategory": "tone",
      "particleVersionId": "pv_abc123",
      "pinnedVersion": 2,
      "tokenCount": 25
    }
  ]
}

Authorizations

Authorization
string
header
required

JWT token from Stytch B2B authentication (magic link, SSO, or M2M)

Headers

Idempotency-Key
string | null

Body

application/json

Request schema for creating a system prompt.

name
string
required

Human-readable name for the system prompt

Required string length: 1 - 255
description
string | null

Optional description of the system prompt's purpose

Maximum string length: 1000
enabled
boolean
default:true

Whether the system prompt is active

particles
SystemPromptParticleAdd · object[] | null

Initial particles to add (optional)

Response

Successful Response

Response schema for system prompt.

id
string
required

Unique system prompt identifier

Example:

"sp_abc123"

name
string
required

Human-readable name

Example:

"Customer Support Agent"

enabled
boolean
required

Whether the system prompt is active

Example:

true

isSystem
boolean
required

Whether this is a system-managed template

Example:

false

createdAt
string<date-time>
required

Timestamp when the system prompt was created

updatedAt
string<date-time>
required

Timestamp when the system prompt was last updated

description
string | null

System prompt description

Example:

"System prompt for customer support interactions"

totalTokenCount
integer | null

Total token count of all particles

Example:

150

particleCount
integer | null

Number of particles in this system prompt

Example:

3

particles
SystemPromptParticleOut · object[] | null

Particle associations (when expanded)