Skip to main content
POST
/
persona-calls
Create Persona Call
curl --request POST \
  --url https://api.kejue.co/api/v1/persona-calls \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "persona_id": "<string>",
  "contact_id": "<string>",
  "contact": {
    "phone": "<string>",
    "whatsapp_number": "<string>",
    "email": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "company": "<string>",
    "job_title": "<string>",
    "country": "<string>",
    "timezone": "<string>",
    "language": "<string>",
    "tags": [
      "<string>"
    ],
    "metadata": {}
  },
  "agent_id": "<string>",
  "phone_number_id": "<string>",
  "schedule_at": "2023-11-07T05:31:56Z",
  "priority": 50,
  "config": {
    "prompt": "<string>",
    "first_message": "<string>",
    "first_message_uninterruptible": true,
    "voice_id": "<string>",
    "temperature": 1,
    "max_duration": 3615,
    "silence_timeout": 62,
    "recording_enabled": true,
    "language_locale": "<string>",
    "inactivity_messages": [
      {
        "delay_seconds": 15,
        "end_behavior": "END_BEHAVIOR_UNSPECIFIED",
        "message": "Are you still there?"
      }
    ],
    "call_start_hour": 11,
    "call_start_minute": 29,
    "call_end_hour": 11,
    "call_end_minute": 29,
    "allowed_days": [
      123
    ],
    "auto_retry": true,
    "retry_schedule": [
      123
    ],
    "scoring_criteria": "<string>",
    "tools": [
      {
        "id": "<string>",
        "config": {}
      }
    ],
    "tags": [
      {
        "name": "<string>",
        "description": "<string>"
      }
    ],
    "structured_data_schema": [
      {
        "key": "<string>",
        "description": "<string>"
      }
    ],
    "server_url": "<string>",
    "server_secret": "<string>",
    "webhooks": [
      {
        "url": "<string>",
        "events": [],
        "signing_method": "hmac_sha256",
        "secret": "<string>"
      }
    ],
    "webhook_ids": [
      "<string>"
    ]
  },
  "external_reference": "<string>",
  "context": {}
}
'
{
  "id": "<string>",
  "contact_id": "<string>",
  "status": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "scheduled_at": "2023-11-07T05:31:56Z"
}

Authorizations

X-API-Key
string
header
required

Workspace API key (e.g. kej_live_...)

Body

application/json

Persona call creation — requires persona_id, inherits full settings hierarchy.

persona_id
string
required

Persona to use

contact_id
string | null

Existing contact ID

contact
ContactInput · object

New contact to create inline

agent_id
string | null

Voice agent ID

phone_number_id
string | null

Pin a specific origin phone number

schedule_at
string<date-time> | null

Schedule for later

priority
integer
default:50

Queue priority

Required range: 0 <= x <= 100
config
CallConfig · object

Overrides on top of settings hierarchy

external_reference
string | null

External tracking ID

Maximum string length: 255
context
Context · object

Template variables

Response

Successful Response

Response after creating a call via public API.

id
string
required

Call ID

contact_id
string
required

Contact ID

status
string
required
created_at
string<date-time>
required
scheduled_at
string<date-time> | null