Skip to main content
PUT
/
v1
/
particles
/
{particle_id}
Update Particle
curl --request PUT \
  --url https://api.cuadra.ai/v1/particles/{particle_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Updated Tone",
  "description": "Updated description text",
  "content": "Updated prompt content.",
  "enabled": true
}
'
{
  "id": "<string>",
  "name": "<string>",
  "category": "tone",
  "isSystem": true,
  "enabled": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "description": "Sets professional tone",
  "currentVersion": 3,
  "tokenCount": 25,
  "content": "Maintain a professional tone.",
  "versions": [
    {
      "id": "<string>",
      "version": 123,
      "tokenCount": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "content": "You are a helpful assistant.",
      "createdBy": "user_xyz789"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string | null

Path Parameters

particle_id
string
required

Particle ID

Body

application/json

Request schema for updating a particle. Updating content creates a new version automatically.

name
string | null

Updated name

Required string length: 1 - 255
Example:

"Updated Tone"

description
string | null

Updated description

Maximum string length: 1000
Example:

"Updated description text"

content
string | null

New content (creates a new version)

Required string length: 1 - 50000
Example:

"Updated prompt content."

enabled
boolean | null

Updated enabled status

Example:

true

Response

Successful Response

Response schema for particle. Content visibility is controlled by is_system flag: - System particles: content hidden (MOAT protection) - Organization particles: content visible to org members

id
string
required

Unique particle identifier

Example:

"part_abc123"

name
string
required

Human-readable name

Example:

"Professional Tone"

category
enum<string>
required

Particle category

Available options:
role,
tone,
guardrails,
constraints,
format
Example:

"tone"

isSystem
boolean
required

Whether this is a system-managed particle

Example:

false

enabled
boolean
required

Whether the particle is active

Example:

true

createdAt
string<date-time>
required

Timestamp when the particle was created

Example:

"2024-01-15T10:30:00Z"

updatedAt
string<date-time>
required

Timestamp when the particle was last updated

Example:

"2024-01-15T14:45:00Z"

description
string | null

Particle description

Example:

"Sets professional tone"

currentVersion
integer | null

Current version number (derived from current_version)

Example:

3

tokenCount
integer | null

Token count of current version

Example:

25

content
string | null

Current content (hidden for system particles)

Example:

"Maintain a professional tone."

versions
ParticleVersionOut · object[] | null

Version history (when expanded)