Skip to main content
POST
/
agents
/
{agent_id}
/
calls
Create Agent Call
curl --request POST \
  --url https://api.kejue.co/api/v1/agents/{agent_id}/calls \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "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": "<string>",
  "priority": 50,
  "config": {},
  "external_reference": "<string>",
  "context": {}
}
'
{
  "error": "Invalid or missing API key",
  "code": "UNAUTHORIZED",
  "details": {}
}

Authorizations

X-API-Key
string
header
required

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

Path Parameters

agent_id
string
required

Body

application/json

Create a call using an agent's full configuration.

contact_id
string | null

Existing contact ID

contact
ContactInput · object

New contact to create inline

agent_id
string | null

Voice config ID

phone_number_id
string | null

Pin a specific origin phone number

schedule_at
string | null

Schedule for later (ISO 8601)

priority
integer
default:50

Queue priority

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

Overrides on top of the agent's config

external_reference
string | null

External tracking ID

Maximum string length: 255
context
Context · object

Template variables

Response

Successful Response