Skip to main content
POST
/
api
/
prompts
/
create
Create a new prompt
curl --request POST \
  --url https://your-instance.example.com/api/prompts/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Leasing follow-up assistant",
  "prompt": "<prompt><role>Leasing assistant</role><goal>Re-engage leads 24h after their last reply.</goal></prompt>",
  "description": "Follow up with leads 24h after their last response.",
  "temperature": 0.7,
  "responseTime": 45,
  "isHidden": false
}
'
{
  "message": "Prompt created successfully",
  "prompt": {
    "_id": "64d2f9c5e8a1d4e001a0b1c2",
    "name": "Maple Court — Tour confirm",
    "description": "Confirms a tour booking and proposes alternates.",
    "prompt": "<prompt><role>Leasing assistant</role><goal>Confirm tour.</goal></prompt>",
    "temperature": 0.3,
    "responseTime": 30,
    "isHidden": false,
    "voiceAI": {
      "enabled": false
    },
    "createdBy": "64a1b2c3d4e5f60012345679",
    "organizationId": "64a1b2c3d4e5f60012345678",
    "createdAt": "2026-05-20T15:04:01.135Z",
    "updatedAt": "2026-05-20T15:04:01.135Z"
  }
}

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

Human-readable prompt name shown in pickers and lists.

prompt
string

XML prompt body driving the AI agent.

responseTime
number

Target reply latency in seconds; the engine throttles streaming to roughly this duration.

description
string

Short summary of the prompt's purpose; surfaced in summary lists and pickers.

isHidden
boolean

Hidden prompts are excluded from non-admin lists and approval flows.

temperature
number

Sampling temperature (0-1). Lower = more deterministic.

Response

Prompt created successfully

Returned by POST /api/prompts/create.

message
string
required
prompt
object
required

Prompt document as stored in the Prompt collection. Returned shape varies slightly per endpoint (some list/summary endpoints project a subset of fields).

Example:
{
"_id": "5f7b1c2e8a1d4e0012c3b4a5",
"name": "Leasing follow-up assistant",
"prompt": "<prompt><role>Leasing assistant</role><goal>Re-engage leads 24h after their last reply.</goal></prompt>",
"description": "Follow up with leads 24h after their last response.",
"temperature": 0.7,
"responseTime": 45,
"isHidden": false,
"tools": [{ "name": "book_tour" }],
"toolConfigs": { "book_tour": { "requireApproval": true } },
"organizationId": "64a1b2c3d4e5f60012345678",
"userId": "64a1b2c3d4e5f60012345679",
"createdAt": "2026-03-12T14:22:10.000Z",
"updatedAt": "2026-04-22T10:14:00.000Z"
}