Developers

A simple, predictable and documented voice API.

Create agents, read calls and receive every event through webhooks. From €0.17 per minute, voice, transcription and telephony included, paid from prepaid credit.

  • REST API v1
  • Signed webhooks
  • Bring your own LLM
POST /api/v1/agents · Create an agent
curl https://callpme.com/api/v1/agents \
  -H "Authorization: Bearer $CALLPME_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Front desk — Diallo Clinic",
    "role": "appointment",
    "voice": { "language": "en-US" }
  }'
call.completed · Webhook received
{
  "event": "call.completed",
  "data": {
    "id": "call_51a9e0",
    "agentId": "agt_8f2c1d",
    "agentName": "Front desk — Diallo Clinic",
    "durationSec": 112,
    "goalAchieved": true
  },
  "timestamp": "2026-11-05T09:42:11.000Z"
}
per minute, voice, transcription and telephony included
€0.17
versioned REST API, JSON responses
v1
event types delivered by webhook
16
HMAC signature on every delivery
SHA-256

Everything the dashboard does, through the API.

Bring voice into your product, your CRM or your business processes.

  • Agents

    Create, list, update and delete your agents. The role sets the default instructions and actions.

  • Calls

    Place an outbound call, then fetch the list of calls with the transcript, recording and outcome of each one.

  • Webhooks

    Receive call completions, booked appointments, written messages, collected payments and finished campaigns on your servers in real time.

  • API keys

    Keys per organization, kept on your server. Every request is scoped to the key's organization.

  • Bring your own LLM

    Choose the language model behind your agents to match your quality and cost requirements.

  • Predictable format

    Appointments, leads, conversations, campaigns, knowledge base and usage: consistent JSON responses, cursor pagination, idempotent creates and an OpenAPI 3.1 specification.

Your first agent in three steps.

Every request uses the Authorization: Bearer header with your key.

  1. 01

    Create an API key

    In the dashboard, open the Developers area and generate a key. Keep it on your server, never in the browser.

    CALLPME_KEY=cpk_live_••••••••••••••••
  2. 02

    Create your first agent

    A single POST request is all it takes. The role sets the default instructions and actions.

    bash
    curl https://callpme.com/api/v1/agents \
      -H "Authorization: Bearer $CALLPME_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Front desk — Diallo Clinic",
        "role": "appointment",
        "voice": { "language": "en-US" }
      }'
  3. 03

    Read your calls

    Fetch the list of calls, then the details and transcript of each one.

    bash
    curl "https://callpme.com/api/v1/calls" \
      -H "Authorization: Bearer $CALLPME_KEY"

Reference

Complete API v1 documentation.

Every endpoint with its parameters and a sample response. All requests are scoped to the organization of the key used.

Base URL & authentication

Every public API request goes through the base URL below and authenticates with a secret key in the Authorization header.

http
https://callpme.com/api/v1
http
Authorization: Bearer cpk_live_your_secret_key

Conventions

Responses always wrap the result in a data key. Errors return an error object (and, optionally, details).

json
{ "data": { /* … or an array */ } }

Status codes: 200 OK · 201 Created · 400 Bad request · 401 Invalid key · 403 Plan limit reached · 404 Not found · 409 Conflict (slot taken, idempotency key) · 429 Too many requests.

List agents

GET/api/v1/agents

Returns every agent in your organization. Optional filters: role, status (active | paused | draft), search.

bash
curl "https://callpme.com/api/v1/agents?role=receptionist&status=active" \
  -H "Authorization: Bearer $CALLPME_KEY"
json
{
  "data": [
    {
      "id": "agt_8f2c…",
      "name": "Front Desk",
      "role": "receptionist",
      "status": "active",
      "phoneNumber": "+33182880000",
      "config": {
        "voice": { "provider": "elevenlabs", "voiceId": "amelie", "language": "en-US", "speed": 1 },
        "model": { "provider": "anthropic", "modelId": "claude-haiku-5-5", "temperature": 0.4 },
        "systemPrompt": "You are the receptionist for…",
        "firstMessage": "Hello, welcome to Acme…",
        "firstSpeaker": "agent",
        "guardrails": [],
        "tools": [],
        "maxDurationSec": 600
      },
      "callsTotal": 42,
      "callsToday": 5,
      "avgDurationSec": 168,
      "resolutionRate": 78,
      "createdAt": "2026-06-01T09:12:00.000Z",
      "updatedAt": "2026-06-02T10:00:00.000Z"
    }
  ]
}

Retrieve an agent

GET/api/v1/agents/:id

Returns a single agent with its full configuration.

bash
curl https://callpme.com/api/v1/agents/AGENT_ID \
  -H "Authorization: Bearer $CALLPME_KEY"

Create an agent

POST/api/v1/agents

The system prompt, voice and tools are generated from the role, and you can customize them with the fields below.

FieldTypeDescription
name*stringAgent name.
role*enumsupport · appointment · lead_qualification · outbound_sales · receptionist · survey · custom.
statusenumactive · paused · draft (default: draft).
phoneNumberstringE.164 phone number to assign.
firstMessagestringThe agent's opening line.
firstSpeakerenumagent · caller — who speaks first.
guardrailsstring[]Guardrails injected into the prompt.
personastringThe agent's personality.
customRoleobject{ label?, description? } — used when role = custom. All fields optional.
toolsstring[]Names of the enabled tools / functions.
voiceobject{ provider (elevenlabs · azure · playht), voiceId, language, speed 0.5–2 }. All fields optional.
modelobject{ provider (openai · anthropic · mistral), modelId, temperature 0–1 }. All fields optional.
bash
curl -X POST https://callpme.com/api/v1/agents \
  -H "Authorization: Bearer $CALLPME_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "After-Hours Line",
    "role": "receptionist",
    "status": "active",
    "firstMessage": "Hello, thanks for calling Acme. How can I help you today?",
    "voice": { "provider": "elevenlabs", "voiceId": "Adélaïde", "language": "en-US", "speed": 1 },
    "model": { "provider": "openai", "modelId": "gpt-4o", "temperature": 0.4 }
  }'

Update an agent

PATCH/api/v1/agents/:id

Updates the name, status (active / paused / draft) or phone number.

bash
curl -X PATCH https://callpme.com/api/v1/agents/AGENT_ID \
  -H "Authorization: Bearer $CALLPME_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"paused"}'

Delete an agent

DELETE/api/v1/agents/:id

Permanently deletes the agent. Triggers the agent.deleted event.

bash
curl -X DELETE https://callpme.com/api/v1/agents/AGENT_ID \
  -H "Authorization: Bearer $CALLPME_KEY"

List calls

GET/api/v1/calls

Call history. Filters: agentId, status (completed | transferred | failed | missed | in_progress), direction (inbound | outbound), created_after, created_before, limit (default 100, max 500). The response carries next_cursor: send it back as cursor for the next page.

bash
curl "https://callpme.com/api/v1/calls?agentId=AGENT_ID&direction=inbound&limit=50" \
  -H "Authorization: Bearer $CALLPME_KEY"

Place an outbound call

POST/api/v1/calls

The agent (which must be live) calls the number. Variables (up to 10) replace {name}, {product}… in the greeting and are also available to the agent. The same rules as campaigns apply: allowed countries, do-not-call list, plan minutes, and a cap of 300 calls per day. Returns 202 with the call ID; the result is delivered through the call.completed webhook.

bash
curl -X POST "https://callpme.com/api/v1/calls" \
  -H "Authorization: Bearer $CALLPME_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agentId":"AGENT_ID","to":"+22901970000","variables":{"name":"Awa","product":"loan"}}'

Retrieve a call

GET/api/v1/calls/:id

Returns a call with its full transcript, outcome and duration.

json
{
  "data": {
    "id": "call_3a9…",
    "agentId": "agt_8f2c…",
    "agentName": "Front Desk",
    "agentRole": "receptionist",
    "direction": "inbound",
    "fromNumber": "+33600000000",
    "toNumber": "+33182880000",
    "status": "completed",
    "durationSec": 132,
    "outcome": "Appointment booked",
    "summary": "The caller booked an appointment for Tuesday at 9:30 AM.",
    "satisfaction": 5,
    "transcript": [
      { "speaker": "agent", "text": "Hello…", "at": 0 },
      { "speaker": "caller", "text": "I'd like to book an appointment", "at": 3 },
      { "speaker": "tool", "text": "Appointment booked", "at": 8, "toolName": "book_appointment" }
    ],
    "createdAt": "2026-06-01T09:12:00.000Z"
  }
}

Pagination

Every list is sorted from newest to oldest and paginated with a cursor. Pass limit (50 by default, 100 at most); while next_cursor is not null, send it back as cursor to get the next page. The created_after and created_before filters take an ISO 8601 date.

bash
curl "https://callpme.com/api/v1/leads?limit=50&created_after=2026-11-01T00:00:00Z" \
  -H "Authorization: Bearer $CALLPME_KEY"

# page suivante
curl "https://callpme.com/api/v1/leads?limit=50&cursor=NEXT_CURSOR" \
  -H "Authorization: Bearer $CALLPME_KEY"
json
{
  "data": [ { "id": "cmh…", "name": "Awa Diallo", "status": "new", "createdAt": "2026-11-12T09:12:00.000Z" } ],
  "next_cursor": "MjAyNi0xMS0xMlQwOToxMjowMC4wMDBafGNtaC4uLg"
}

Idempotency

On create requests (outbound call, appointment, contacts, document, agent), add an Idempotency-Key header that is unique per operation. If the same key is sent again within 24 hours with the same body, you receive the original response (Idempotent-Replayed: true header) and nothing is created twice. The same key with a different body returns 409.

Limits and headers

Each key is allowed 120 requests per minute. Every response tells you where you stand; beyond the limit the API answers 429 with Retry-After.

HeaderMeaning
X-Request-IdRequest identifier, to quote when contacting us.
X-RateLimit-LimitRequests allowed per minute for this key.
X-RateLimit-RemainingRequests left in the current minute.
X-RateLimit-ResetEnd of the current window (Unix seconds).
Retry-AfterOn a 429 response: seconds to wait before retrying.

All resources

A request only ever sees the data of the account the key belongs to.

MethodPathPurpose
Agents
GET/v1/agentsList agentspaginated
POST/v1/agentsCreate an agentidempotent
GET/v1/agents/{id}Retrieve an agent
PATCH/v1/agents/{id}Update an agent
DELETE/v1/agents/{id}Delete an agentadmin key
Calls
GET/v1/callsList callspaginated
POST/v1/callsPlace an outbound callidempotent
GET/v1/calls/{id}Retrieve a call
GET/v1/calls/{id}/transcriptCall transcript
GET/v1/calls/{id}/recordingCall audio recording
Appointments
GET/v1/appointmentsList appointmentspaginated
POST/v1/appointmentsBook an appointmentidempotent
GET/v1/appointments/{id}Retrieve an appointment
POST/v1/appointments/{id}/cancelCancel an appointment
Leads
GET/v1/leadsList leads and messagespaginated
GET/v1/leads/{id}Retrieve a lead
Written conversations
GET/v1/conversationsList written conversationspaginated
GET/v1/conversations/{id}Retrieve a conversation and its messages
Phone numbers
GET/v1/numbersList the account's phone numberspaginated
Campaigns
GET/v1/campaignsList campaignspaginated
GET/v1/campaigns/{id}Retrieve a campaign
GET/v1/campaigns/{id}/contactsList a campaign's contactspaginated
POST/v1/campaigns/{id}/contactsAdd contacts to a campaignidempotent
Knowledge base
GET/v1/knowledgeList knowledge basespaginated
POST/v1/knowledgeAdd a text or a web page to a knowledge baseidempotent
GET/v1/knowledge/{id}Retrieve a knowledge base and its documents
PaymentPlans
GET/v1/payment-plansList payment planspaginated
POST/v1/payment-plansCreate a payment planidempotent
GET/v1/payment-plans/{id}Retrieve a payment plan, its instalments and reminders
Webhooks
GET/v1/webhooks/deliveriesList webhook deliveriespaginated
POST/v1/webhooks/deliveries/{id}/retryRedeliver a webhook delivery
Usage
GET/v1/usageAccount usage and credit
Specification
GET/v1/openapi.jsonOpenAPI 3.1 specification

Book an appointment

POST/v1/appointments

date and time are expressed in the time zone of the agent's calendar. If the slot is taken or outside opening hours, the 409 response suggests other times on the same day in details.alternatives.

bash
curl -X POST https://callpme.com/api/v1/appointments \
  -H "Authorization: Bearer $CALLPME_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: rdv-2026-12-02-awa-diallo" \
  -d '{"agentId":"AGENT_ID","customerName":"Awa Diallo","date":"2026-12-02","time":"10:00","customerPhone":"+22901970000","notes":"First consultation"}'

Add contacts to a campaign

POST/v1/campaigns/:id/contacts

Up to 1,000 contacts per request and 5,000 per campaign. Invalid numbers, duplicates and numbers on your do-not-call list are left out and counted in skipped. The campaign is started from the dashboard.

bash
curl -X POST https://callpme.com/api/v1/campaigns/CAMPAIGN_ID/contacts \
  -H "Authorization: Bearer $CALLPME_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: import-2026-11-14-lot-1" \
  -d '{"contacts":[{"name":"Awa Diallo","phone":"+22901970000","data":{"ville":"Cotonou"}}]}'
json
{
  "data": {
    "added": 1,
    "skipped": { "invalid": 0, "duplicates": 0, "optedOut": 0, "overLimit": 0 },
    "maxContactsPerCampaign": 5000
  }
}

Feed the knowledge base

POST/v1/knowledge

Add a text or a web page to an agent's knowledge base (agentId) or to a specific base (knowledgeBaseId). The document is indexed right away: the agent uses it from the next call.

bash
curl -X POST https://callpme.com/api/v1/knowledge \
  -H "Authorization: Bearer $CALLPME_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agentId":"AGENT_ID","source":"text","title":"Opening hours and prices","content":"Open Monday to Saturday, 8 am to 6 pm. Consultation: 10,000 FCFA."}'
bash
curl -X POST https://callpme.com/api/v1/knowledge \
  -H "Authorization: Bearer $CALLPME_KEY" \
  -H "Content-Type: application/json" \
  -d '{"knowledgeBaseId":"KB_ID","source":"url","url":"https://www.exemple.com/tarifs"}'

Transcript and recording

GET/v1/calls/:id/transcript

The transcript is returned as JSON; the recording is returned as audio. A call's recordingUrl field tells you whether one exists.

bash
curl https://callpme.com/api/v1/calls/CALL_ID/transcript \
  -H "Authorization: Bearer $CALLPME_KEY"

curl https://callpme.com/api/v1/calls/CALL_ID/recording \
  -H "Authorization: Bearer $CALLPME_KEY" \
  --output appel.mp3

Track usage

GET/v1/usage

Minutes included, used and remaining in the current period, top-up minutes and prepaid credit for outbound calls.

bash
curl https://callpme.com/api/v1/usage \
  -H "Authorization: Bearer $CALLPME_KEY"
json
{
  "data": {
    "plan": "pro",
    "status": "active",
    "billingPeriod": "month",
    "period": { "start": "2026-11-08T00:00:00.000Z", "end": "2026-12-08T00:00:00.000Z" },
    "subscriptionEndsAt": "2026-12-08T00:00:00.000Z",
    "minutes": { "included": 2000, "used": 412, "extra": 60, "remaining": 1648 },
    "outboundCredit": { "amountCents": 1500, "currency": "EUR" }
  }
}

OpenAPI specification

GET/v1/openapi.json

The full description of the API in OpenAPI 3.1, ready to import into Postman, Insomnia or a client generator.

Webhooks — events

Subscribe an endpoint in the Webhooks tab. Each delivery is a signed JSON POST.

agent.created· Agent createdagent.updated· Agent updatedagent.deleted· Agent deletedcall.started· Call answeredcall.completed· Call completedcall.failed· Call failed (technical)call.transferred· Call transferredappointment.booked· Appointment bookedappointment.cancelled· Appointment cancelledlead.created· Lead or message capturedconversation.message.received· Written message receivedcampaign.completed· Campaign completedpayment.completed· Payment collectedpayment_plan.installment_paid· Instalment paidpayment_plan.overdue· Instalment overduepayment_plan.completed· Payment plan paid offworkflow.completed· Workflow completed (reserved)workflow.failed· Workflow failed (reserved)

Delivery body (headers X-Callpme-Event and X-Callpme-Signature):

json
{
  "event": "agent.created",
  "data": { "id": "agt_8f2c…", "name": "After-Hours Line" },
  "timestamp": "2026-06-04T10:00:00.000Z"
}

Verify a webhook signature

X-Callpme-Signature is the HMAC-SHA256 of the raw body, computed with the webhook secret and prefixed with “sha256=”.

javascript
import crypto from "crypto";

// body = raw request body (string)
const expected =
  "sha256=" +
  crypto.createHmac("sha256", WEBHOOK_SECRET).update(body).digest("hex");

if (expected === req.headers["x-callpme-signature"]) {
  // valid signature — process the event
}

Delivery headers

Every delivery carries the headers below. X-Callpme-Signature is unchanged, so existing integrations keep working.

X-Callpme-Event
Event name (e.g. call.completed).
X-Callpme-Delivery
Unique delivery ID. Store it to ignore duplicates: a retry keeps the same ID.
X-Callpme-Attempt
Attempt number (1 to 6).
X-Callpme-Timestamp
Send time, in Unix seconds (UTC).
X-Callpme-Signature-V2
Recommended timestamped signature: t=<timestamp>,v1=<hex HMAC-SHA256 of “<timestamp>.<raw body>”>.
X-Callpme-Signature
Legacy signature: “sha256=” + hex HMAC-SHA256 of the raw body.

Verify the timestamped signature (recommended)

Compute the HMAC-SHA256 of “timestamp.raw body” with the webhook secret and compare it with v1 in constant time. Reject the request if the timestamp is more than 5 minutes away from your clock, so an intercepted request cannot be replayed later. Always use the raw body, never re-serialized JSON.

javascript
import crypto from "node:crypto";

function verifyCallpmeSignature(rawBody, headers, secret, toleranceSec = 300) {
  const header = headers["x-callpme-signature-v2"] ?? "";
  const parts = Object.fromEntries(header.split(",").map((p) => p.trim().split("=", 2)));
  const t = Number(parts.t);
  if (!Number.isInteger(t) || !/^[0-9a-f]{64}$/.test(parts.v1 ?? "")) return false;
  // Anti-rejeu / replay protection : horodatage trop ancien ou dans le futur.
  if (Math.abs(Math.floor(Date.now() / 1000) - t) > toleranceSec) return false;
  const expected = crypto.createHmac("sha256", secret).update(t + "." + rawBody).digest("hex");
  return crypto.timingSafeEqual(Buffer.from(parts.v1, "hex"), Buffer.from(expected, "hex"));
}

// verifyCallpmeSignature(rawBody, req.headers, process.env.CALLPME_WEBHOOK_SECRET)

Retries, delivery log and redelivery

A delivery succeeds when your server responds with a 2xx status within 8 seconds. Otherwise Callpme retries after 1 min, 5 min, 30 min, 2 h and 6 h (6 attempts in total). After 15 consecutive failures the webhook is disabled and its creator is notified by email; re-enable it in the Webhooks tab once the issue is fixed. Deliveries are kept for 30 days in the log, where you can redeliver them, or through the API:

http
GET  /api/v1/webhooks/deliveries?status=failed&limit=50
POST /api/v1/webhooks/deliveries/{id}/retry

API key rotation

“Rotate” generates a new key with the same settings. The previous key stays valid for the grace period you choose (0 to 30 days), then stops working: deploy the new key, check your calls, then let the old one expire. Each key can also have an expiry date, a list of allowed IP addresses (403 otherwise) and a monthly request quota (429 once reached). The per-day request history over 30 days is shown for each key.

Webhooks

Get every event in real time.

Every delivery is signed with your webhook secret. Verify the signature before you process the payload.

  • call.completedA call has ended
  • call.transferredA call was transferred to a human
  • agent.createdAn agent was created
  • agent.updatedAn agent was updated
  • agent.deletedAn agent was deleted

Verify the X-Callpme-Signature header before processing an event:

typescript
import { createHmac, timingSafeEqual } from "node:crypto";

// rawBody: the raw request body, before any JSON.parse
export function verifyCallpmeSignature(rawBody: string, header: string, secret: string) {
  const expected = "sha256=" + createHmac("sha256", secret).update(rawBody).digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(header ?? "");
  return a.length === b.length && timingSafeEqual(a, b);
}

Your first API key in two minutes.

Create an account, choose a plan, generate a key and make your first call.