Create a key, check it, and queue your first call.
1
Create a key
In the Callifly dashboard, open Settings → API Management → New key. Pick the assistant and the scopes. For this quick start: assistants:read, calls:write and calls:read. Copy the key: it starts with cfly_ and is shown only once.
2
Check the key
A 200 with your assistant in the array means the key works.
Each key is bound to one assistant. It reads only that assistant's data and queues calls only for that assistant. Create, scope and revoke keys in Settings → API Management. A revoked key stops working on the next request. Keep keys on your server: browser calls are not supported.
Orchestration has its own base URL and accepts the same header. The older X-API-Key header still works there.
Scopes
A request outside the key's scopes returns 403FORBIDDEN_SCOPE.
Scope
Allows
assistants:read
GET /assistants, GET /assistants/{id}
calls:read
GET /calls, GET /calls/{id}
calls:write
POST /calls
conversations:read
GET /chat-conversations
sms:write
POST /send-sms
orchestrate
POST /external/v1/orchestrate and GET /external/v1/orchestrate/{jobId}
status
GET /external/v1/orchestrate/{jobId}
Key errors
These use the short error shape, {"code","message"}. See Errors.
HTTP
code
When
401
UNAUTHORIZED
No key was sent. Message: Missing API key. Send `Authorization: Bearer cfly_...`.
401
INVALID_API_KEY
Unknown or revoked key. Message: Invalid or revoked API key
403
FORBIDDEN_SCOPE
The key lacks the scope. Example message: API key lacks required scope: calls:write
Do
›Store the key in an environment variable or a secrets manager
›Create one key per assistant, with only the scopes it needs
›Revoke a leaked key right away in Settings → API Management
Don't
›Commit a key, or ship it in code that runs in a browser
›Share one key across several assistants
Reference
API reference
All paths are relative to https://api.callifly.com/client, except orchestration, which lives under https://api.callifly.com/external/v1. Requests and responses are JSON. A path that is not listed here returns 404.
Read
Data retrieval
Every read is limited to the assistant bound to your key. The examples show the fields you can rely on. Responses can contain more fields: ignore the ones that are not documented here.
GET/assistantsassistants:read
List your assistant
Returns an array with the assistant bound to your key. The array is empty if that assistant was deleted. No query parameters.
Response fields
Field
Type
Notes
assistantId
string
The assistant bound to your key.
name
string
description
string
Present when set.
assistantType
string
voice, chat or hybrid. Present when set.
status
string
pending, active or failed
isDisabled
boolean
The assistant itself is turned off.
companyDisabled
boolean
Your account is disabled.
effectivelyDisabled
boolean
true when either of the two above is true.
effectiveDisabledReason
string
Present only when disabled: manual, credits_exhausted, payment_failed or system.
attachedPhone
object
The Callifly number attached to the assistant: phoneNumber, enabled, createdAt, updatedAt. Absent when no number is attached.
[{"assistantId": "8f1c2e4a-6b3d-4f7e-a2c9-1d5b7e9f0a34",
"name": "Reception",
"description": "Answers calls for the Paris office",
"assistantType": "voice",
"status": "active",
"isDisabled": false,
"effectivelyDisabled": false,
"companyDisabled": false,
"attachedPhone": {"phoneNumber": "+33187654321",
"enabled": true,
"createdAt": "2026-09-02T08:15:00.000Z",
"updatedAt": "2026-09-02T08:15:00.000Z"}}]
GET/assistants/{id}assistants:read
Read your assistant's configuration
Returns the configuration of the assistant bound to your key, including its prompt. Any other id returns 403. The fields depend on how the assistant is set up: the example shows a typical voice assistant.
{"id": "8f1c2e4a-6b3d-4f7e-a2c9-1d5b7e9f0a34",
"assistantId": "8f1c2e4a-6b3d-4f7e-a2c9-1d5b7e9f0a34",
"name": "Reception",
"model": {"messages": [{"role": "system", "content": "You are the receptionist of the Paris office…"}]},
"firstMessage": "Hello, Paris office, how can I help you?",
"status": "active",
"allowEditing": false,
"isDisabled": false,
"effectivelyDisabled": false,
"companyDisabled": false,
"attachedPhone": {"phoneNumber": "+33187654321",
"enabled": true}}
Response 403
{"success": false,
"error": {"code": 403, "name": "FORBIDDEN", "message": "Assistant is not available for this key"}}
GET/callscalls:read
List calls
Lists your assistant's calls, newest first, as {"calls": [...], "nextKey": "..."}. nextKey is missing on the last page.
Query parameters
Param
Type
Default
Notes
fromDate optional
ISO 8601
Calls on or after this date or time.
endDate optional
ISO 8601 date
Calls up to the end of this day (UTC), inclusive.
customerNumber optional
E.164
Calls with this number. Encode + as %2B.
pageSize optional
integer 1–100
100
Values outside 1–100 are brought back into range.
lastKey optional
string
nextKey from the previous page.
view optional
full | lean
full
lean leaves out messages and structuredOutputs for lighter pages.
Call fields
Field
Type
Notes
callId
string
Pass it to GET /calls/{id}.
assistantId
string
assistantName
string
callType
string
Report type: end-of-call-report. It does not tell inbound from outbound.
customerNumber
string
The other party, in E.164.
phoneNumber
string
Your assistant's number on the call.
phoneName
string
Label of that number.
startedAt
number
Unix time in milliseconds.
endedAt
number
Unix time in milliseconds.
duration
number
Seconds.
billableMins
number
Duration rounded up to the minute.
callEndReason
string
Why the call ended, for example customer-ended-call.
summary
string
transcript
string
recordingUrl
string
stereoRecordingUrl
string
analysis
object
summary, structuredData and successEvaluation as produced after the call.
structuredData
object
The fields your assistant extracts.
successEvaluation
string, boolean or object
structuredOutputs
object
Left out with view=lean.
overrideVariables
object
Variables the call ran with.
messages
array
The conversation, turn by turn. Left out with view=lean.
language
string
Language code, for example fr-FR. Present when known.
sentimentEscalated
boolean
Caller sentiment signals. Other sentiment… fields appear when available.
A field with no value can hold a placeholder instead of being left out: "N/A" for text such as summary, transcript or recordingUrl, and "unknown" for numbers and names such as customerNumber. The webhook after a call uses the same placeholders.
{"calls": [{"callId": "b2e7c4d1-9a3f-4c6e-8b15-7f0d2a9e6c38",
"assistantId": "8f1c2e4a-6b3d-4f7e-a2c9-1d5b7e9f0a34",
"assistantName": "Reception",
"callType": "end-of-call-report",
"customerNumber": "+33612345678",
"phoneNumber": "+33187654321",
"phoneName": "Paris office",
"startedAt": 1794905218016,
"endedAt": 1794905338016,
"duration": 120,
"billableMins": 2,
"callEndReason": "customer-ended-call",
"summary": "Marie confirmed her delivery slot for Wednesday morning.",
"transcript": "AI: Hello, Paris office, how can I help you?\nUser: Hi, I'm calling about my delivery…",
"recordingUrl": "https://…/recording.wav",
"stereoRecordingUrl": "https://…/stereo.wav",
"analysis": {"summary": "Marie confirmed her delivery slot for Wednesday morning.",
"structuredData": {"slot": "2026-11-18T10:00"},
"successEvaluation": "true"},
"structuredData": {"slot": "2026-11-18T10:00"},
"successEvaluation": "true",
"overrideVariables": {},
"language": "fr-FR",
"sentimentEscalated": false,
"sentimentEscalationRecommended": false}],
"nextKey": "eyJ…"}
GET/calls/{id}calls:read
Read one call
Returns one call with every field from the list, including messages and structuredOutputs. The object is not wrapped. A call that does not exist, or belongs to another assistant, returns 404. The message varies (Call not found, Call with id <id> not found or Access denied to call): switch on error.name.
Lists your assistant's chat conversations (web chat, SMS, WhatsApp, and email with includeEmail=true). Each one carries its full messages array and, by default, its report.
Query parameters
Param
Type
Default
Notes
startDate optional
ISO 8601
Conversations started on or after.
endDate optional
ISO 8601
Conversations started on or before.
phoneNumber optional
E.164
Conversations with this number. Encode + as %2B.
includeReports optional
boolean
true
Set to false to leave out report.
includeEmail optional
boolean
false
Include email conversations.
includeDeleted optional
boolean
false
Include deleted conversations.
pageSize optional
integer 1–100
100
Outside 1–100 returns 400.
lastEvaluatedKey optional
string
pagination.lastEvaluatedKey from the previous page. An invalid value returns 400.
Conversation fields
Field
Type
Notes
sessionId
string
assistantId
string
assistantName
string
channel
string
For example WEB, SMS, WHATSAPP or EMAIL.
status
string
For example active, ended or completed.
phoneNumber
string
The contact's number, for SMS and WhatsApp.
createdAt
string
ISO 8601.
updatedAt
string
ISO 8601.
timestamp
number
Start time, Unix milliseconds.
totalMessages
number
messages
array
Each message has messageId, role (user, assistant or tool), content and timestamp (Unix milliseconds).
overrideVariables
object
Present when set.
report
object
analysis (summary, structuredData, successEvaluation) and processingStatus: pending, processing, processed or failed. Absent until a report exists.
id identifies your call request. It is not a callId: once the call has taken place, find it with GET /calls or the webhook.
Calling hours and countries
Callifly serves both B2C and B2B assistants and follows the calling regulations of each recipient's country. A call queued outside the allowed hours is held until calling is allowed.
Just before dialing, Callifly checks the call again. The call is not placed when the number is blocked or on a do-not-call list, when the assistant has been disabled, or when Callifly does not call that country.
Errors
These use the detailed error shape. Switch on error.name.
{"success": false,
"error": {"code": 400,
"name": "INVALID_PHONE",
"message": "Phone number must be in E.164 format (e.g., +33612345678)"}}
HTTP
error.name
When
400
INVALID_BODY
The body is not valid JSON.
400
INVALID_PHONE
The number is missing or not in E.164 format.
400
MISSING_ASSISTANT
The key is not bound to an assistant.
403
PHONE_BLOCKED
The number is on Callifly's blocklist.
404
NOT_FOUND
The key's assistant can't be found.
409
NO_PHONE_LINE
The assistant has no phone number it can call from, for example after it was deleted, or disabled because credits ran out.
429
RATE_LIMITED
The key's per-minute call limit is reached. See Rate limits.
500
InternalServerError
Temporary problem on our side. Don't retry automatically: see Errors.
503
RATE_LIMIT_UNAVAILABLE, CONFIG_UNAVAILABLE
Temporary. Try again shortly. Treat any other 503 the same way.
Country not called
A valid number in a country Callifly does not call is accepted with 202, then not placed. The API returns no error for it and no webhook is sent. In your dashboard logs, the call shows as not called with this reason: "Not called: Callifly does not place calls to this country yet. Contact us to enable it."
POST/send-smssms:write
Send an SMS
Sends one SMS to one number, right away, from your assistant's SMS number. If the assistant has none, it is sent from a shared Callifly number. A 200 means the message was handed to the carrier.
JSON body
Field
Type
Required
Notes
to
string
Yes
E.164, for example +33612345678.
message
string
Yes
The text to send. It is converted to plain characters to keep the message short: accents and special characters become plain equivalents, and characters with none, such as emojis or Arabic and Chinese script, are removed.
Example
curl -X POST https://api.callifly.com/client/send-sms \
-H "Authorization: Bearer cfly_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+33612345678", "message": "Hello Marie, your order 48213 is ready for pickup."}'
Response 200
{"results": [{"toolCallId": "N/A", "result": "SMS sent successfully"}]}
Errors
These use the detailed error shape. Switch on error.name.
The number is not in E.164 format, or cannot receive SMS (for example a French landline).
404
NotFound
The key's assistant no longer exists.
500
MissingConfiguration
No number is available to send from.
500
InternalServerError
The body is not valid JSON, or the message could not be sent.
POST/orchestrateorchestrate
Orchestration: run a multi-step outreach
Reach a customer across several channels in one request. List the steps in the order you want, for example an SMS, then a WhatsApp message, then a call. Callifly runs one step at a time and stops as soon as the customer responds. If nobody responds, it alerts you by email or webhook.
Send Authorization: Bearer cfly_..., like the rest of the API. Integrations that send X-API-Key: cfly_... keep working; if both headers are sent, X-API-Key is used. Its base URL is https://api.callifly.com/external/v1. The key needs the orchestrate scope.
How a job runs
Each step starts about one minute after the previous one ends.
After a step is sent, Callifly waits delayMinutes, then checks it. An SMS or WhatsApp step succeeds when the customer replies. A call step succeeds when the call is answered.
On success the job ends as COMPLETED and the remaining steps are skipped. When every step has been tried without success, the job ends as ESCALATED.
Call steps follow the same calling hours and country rules as POST /calls. If the customer hangs up right away on two calls, the remaining steps are skipped and the job is escalated.
JSON body
Field
Type
Required
Notes
requestId
string
No
Your own reference. Sending a requestId you already used returns that job instead of starting a new one. Generated when omitted.
customerDetails.phoneNumber
string
Yes
The customer, in E.164.
customerDetails.name
string
No
The customer's name. Fills {{name}} in SMS text and appears in the escalation.
customerDetails.email
string
No
The customer's email, shown in the escalation.
channels
array
Yes
The steps, in order. At least one.
channels[].type
string
Yes
SMS, WHATSAPP or CALL.
channels[].delayMinutes
number
Yes
Minutes to wait after the step is sent before checking for a reply or an answer. 0 or more.
channels[].maxRetries
number
No
How many more times to try a step that could not be sent. Default 0.
channels[].options
object
No
Step settings, see below.
overrideVariables
object
No
Variables passed to your assistant, and to SMS text placeholders.
escalation.type
string
Yes
EMAIL, WEBHOOK or BOTH.
escalation.email
string
No
Required with EMAIL or BOTH.
escalation.webhookUrl
string
No
Required with WEBHOOK or BOTH. http or https.
escalation.webhookHeaders
object
No
Headers sent with the webhook, for example a secret.
SMS step
Sent from your assistant's SMS number. A reply by SMS or WhatsApp counts as a response.
options
Type
Required
Notes
messageTemplate
string
No
The text. {{name}} is replaced with the customer's name and {{key}} with a variable. Defaults to the text set on your assistant.
templateVariables
object
No
Placeholder values. They take priority over overrideVariables.
skipSessionCreation
boolean
No
Set to false when you expect a conversation, so your assistant has the job's context when the customer replies. Default true.
WhatsApp step
WhatsApp only lets a business start a conversation with an approved message template, so a WhatsApp step always sends a template. templateSid is required. Contact us if you need help with templates. A reply on WhatsApp counts as a response, and your assistant continues the conversation.
options
Type
Required
Notes
templateSid
string
Yes
The ID of the approved template.
templateVariables
object
No
Values for the template's numbered placeholders, for example {"1": "Marie"}. overrideVariables are not used here.
templateName
string
No
A label for your own tracking.
Call step
Your assistant calls the customer. The assistant needs a phone number attached, otherwise the request returns 400MISSING_PHONE_MAPPING. overrideVariables reach the assistant during the call.
{"jobId": "job_4f1c9a2e7b3d4e8a9c615d2f0b8e4a17",
"requestId": "order-48213",
"status": "PENDING",
"message": "Orchestration job created successfully. Workflow will begin shortly.",
"estimatedCompletionMinutes": 120}
estimatedCompletionMinutes is the sum of the waits plus 5 minutes per step. Calling hours can make it longer. A repeated requestId returns 200 with the existing job.
Errors
Orchestration errors have their own shape, {"error","message"}. Switch on the HTTP status.
{"error": "Validation Error",
"message": "channels[0].type must be one of: WHATSAPP, CALL, SMS"}
HTTP
error
When
400
Bad Request
The body is not valid JSON.
400
Validation Error
A field is missing or invalid. message names it, for example customerDetails.phoneNumber is required.
400
Validation Error
A CALL step was sent but the assistant has no phone number. The body also has code: MISSING_PHONE_MAPPING.
401
Unauthorized
No key was sent. Message: Missing API key. Send Authorization: Bearer cfly_...
401
Unauthorized
Unknown, revoked or expired key. Message: Invalid or expired API key
403
Forbidden
The key lacks the orchestrate scope.
403
Forbidden
Your account or the assistant is disabled. Message, for example: Assistant is currently disabled. Reason: credits_exhausted
500
Internal Server Error
Temporary. Try again with the same requestId.
GET/orchestrate/{jobId}status
Read a job's status
Send the same header as when you start a job. Returns the job and every step. Works with the status or orchestrate scope. A job that does not exist, or belongs to another account, returns 404.
Times are Unix milliseconds. result and completedAt appear once the job has ended. duration is in seconds.
Job statuses
status
Notes
PENDING
Created, not started yet.
IN_PROGRESS
Steps are running.
COMPLETED
A step succeeded: the customer responded.
ESCALATED
No step succeeded. The escalation was sent.
FAILED
The job could not run.
CANCELLED
Cancelled from the dashboard before it ended.
Step statuses
status
Notes
PENDING
Not run yet.
EXECUTING
Being sent.
WAITING_VERIFICATION
Sent. Waiting for delayMinutes before the check.
SUCCESS
The customer replied or answered.
FAILED
No response, or the step could not be sent.
SKIPPED
Not run, for example because the customer was already reached on another channel.
CALLBACK_SCHEDULED
The customer asked to be called back. The call runs again at the agreed time.
Errors
{"error": "Not Found",
"message": "Orchestration job not found"}
HTTP
error
When
401
Unauthorized
No key was sent. Message: Missing API key. Send Authorization: Bearer cfly_...
401
Unauthorized
Unknown, revoked or expired key. Message: Invalid or expired API key
403
Forbidden
The key has neither status nor orchestrate.
404
Not Found
Unknown job, or a job from another account.
Escalation
When a job ends as COMPLETED or ESCALATED, Callifly sends the escalation you chose: an email, a JSON POST to webhookUrl with your webhookHeaders, or both. The webhook body carries jobId, requestId, status, success, customer (phoneNumber, name, email), result (completedChannel, completedAt, attemptedChannels) and metadata.
Note: The escalation webhook is sent once, with no automatic retry and no signature, and your webhook URL has 10 seconds to answer. Use a secret header, and read the job status through the API if you miss one.
Chat API
Your assistant holds written conversations on web chat, SMS, WhatsApp and email. Use the API to start them and to read them.
Start a conversation
Add an SMS or WhatsApp step to an orchestration. When the customer replies, your assistant answers in the same thread. For SMS, set skipSessionCreation to false so the assistant has the job's context.
Read conversations, email included
GET /chat-conversations returns every conversation with its messages and report. Email conversations are left out by default: add includeEmail=true to get them, with channel set to EMAIL.
Yes, with backoff, except POST /calls and POST /send-sms: see below.
503
Temporary problem on our side.
Yes, with backoff.
502
UPSTREAM_UNAVAILABLE: the API could not reach the service, or got no answer within 25 seconds. The body includes a requestId to share with support. Other server errors come back with their own status.
Yes, with backoff, except POST /calls and POST /send-sms: see below.
Back off exponentially: wait 1 second, then 2, then 4, up to 5 tries.
Don't retry POST /calls or POST /send-sms automatically after a 500, a 502 or a timeout. The first request may have gone through, and the customer would be called or texted twice. For a call, wait for the webhook, or look for it with GET /calls once it would have ended.
Limits
Rate limits
POST /calls is limited per key, 60 calls per minute by default. Above that, the API returns 429 with error.nameRATE_LIMITED.
All requests are also protected by platform-wide throttling. A 429 without error.name means: slow down and retry.
Orchestration requests are throttled at 100 per second, with bursts up to 200.
Push
Webhooks
Turn on the webhook for your assistant in the dashboard to get each of its calls and chat conversations pushed to your webhook URL as soon as it is processed. Set the URL and optional custom headers there. Callifly sends a JSON POST with Content-Type: application/json and your headers.
Note: Today each webhook is sent once, with no automatic retry and no signature. It's your responsibility to make sure your webhook URL is reachable and responds quickly, and to verify and reconcile the data on your side (for example by listing calls through the API).
After a call
The body carries callId, callEndReason, assistantName, customerNumber, startedAt, endedAt, duration, summary, transcript, messages (without the system prompt), structuredData, overrideVariables and url, a link to the call in your dashboard. Pass callId to GET /calls/{id} for the full call.
After a chat conversation
The body carries sessionId, assistantName, customerNumber, status, messageCount, channel (WEB when not set), createdAt, updatedAt, summary, messages, structuredData, overrideVariables and url.
Tip: add a secret custom header and reject any request that doesn't carry it.
Coming soon
More ways to reach your customers
Calls, SMS, WhatsApp and orchestration are live. Email is next.
Email triggering
Email steps in orchestration
FAQ
Frequently asked questions
The request queues the call, so it may not start immediately. It can take up to about 2 minutes.
Use the webhook, or list calls with customerNumber. The id returned by POST /calls identifies the request, not the call.
Callifly calls a defined list of countries. A number elsewhere is accepted but not called. Contact us to enable a country.
No. Keep your key on a server.
No. Create one key per assistant.
The assistant is disabled and its phone number released, so POST /calls returns 409NO_PHONE_LINE until you top up.
Yes. POST /calls allows 60 calls per minute per key by default. See Rate limits.
No. There is no public sandbox.
The REST API is for code you write: backends and automations. MCP connects an AI assistant such as Claude or ChatGPT to your Callifly account.