Skip to main content
POST
/
v1
/
prompts
Create a new prompt (also creates version 1)
curl --request POST \
  --url https://api.example.com/v1/prompts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Support reply template",
  "description": "Used by the support team for first-response drafts",
  "content": "You are a helpful support agent. Reply to: {{message}}"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "labels": {},
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
Example:

"Support reply template"

description
string | null
required
Example:

"Used by the support team for first-response drafts"

content
string
required
Example:

"You are a helpful support agent. Reply to: {{message}}"

Response

201 - application/json
id
string
required

Prompt UUID

name
string
required

Human-readable prompt name (unique per tenant)

description
string
required

Optional description

labels
object
required

Map of label name → version number (e.g. { production: 2 })

createdAt
string<date-time>
required