Developers

REST API.

API keys, scopes, pagination, errors and rate limits, and every endpoint of the v1 REST API with examples.

The REST API lets your CRM or back office place calls for an agent, read calls and recordings, and keep contacts, callbacks, campaign leads and DNC entries in sync. It works when your plan includes API access. If it doesn't, the Developers page says so and requests return 402 PLAN_FEATURE. To add it to your plan, contact us.

Base URL

Every endpoint is under:

text
https://centers.xoloip.com/api/v1

That's the address you sign in to, plus /api/v1. The Quick start panel in Workspace › Developers shows it with two ready-to-copy commands.

API keys

Owners and admins create keys in Workspace › Developers. Press Create API key, give it a name (up to 100 characters), tick the scopes it may use, and choose when it expires: never, 30 days, 90 days or 1 year.

  • Keys look like dk_live_ followed by 32 random characters.
  • The full key is shown once, when you create it. Store it in your secret manager; Meridian keeps only a hash.
  • The keys table shows each key's name and prefix, its scopes, when it was created and last used, when it expires, and its status: Active, Revoked or Expired.
  • Revoke stops a key straight away and can't be undone. Expired keys stop working too.
  • A key acts for the whole workspace, not for one person. Give each integration its own key.

Send the key as a bearer token on every request:

Shell
curl https://centers.xoloip.com/api/v1/me \
  -H "Authorization: Bearer $API_KEY"
Data
{
  "tenant": { "id": "0192f6c0-…", "name": "Example Support", "slug": "example" },
  "key": { "id": "0192f6c1-…", "name": "CRM integration", "scopes": ["calls:read", "calls:write"] }
}

In these examples, $API_KEY holds your key.

Caution

Keep keys secret. Call the API from your own server. Never put an API key in a web page, a browser script or a mobile app.

Scopes

Fieldtypedescription
calls:readReadList and read calls, list dispositions.
calls:writeWritePlace calls for an agent and hang them up.
recordings:readReadDownload call recordings.
contacts:readReadList and read contacts.
contacts:writeWriteCreate, update, delete and erase contacts.
callbacks:readReadList callbacks.
callbacks:writeWriteSchedule callbacks.
campaigns:readReadList campaigns with lead counts.
campaigns:writeWriteAdd leads to a campaign.
users:readReadList users with their role, status and live agent state.
dnc:writeWriteAdd and remove numbers on your DNC list.

GET /api/v1/me works with any valid key.

Conventions

  • JSON only, with snake_case field names. Send request bodies as JSON with Content-Type: application/json.
  • Body size: up to 1 MB, or 4 MB when adding campaign leads. Larger bodies are refused with status 413.
  • Timestamps are returned in ISO-8601, in UTC. Date filters such as since take a date (2026-09-01) or a date-time with an offset (2026-09-01T00:00:00Z).
  • Phone numbers are returned in E.164 (+14155550148). Where you send a number, any common format works: numbers without a country code use your workspace's country.
  • IDs are UUIDs.

Pagination

GET /calls, GET /contacts and GET /callbacks return a page and a cursor:

Data
{ "data": [ … ], "next_cursor": "eyJjcmVhdGVkQXQiOi…" }

Pass ?limit= (1–100, default 50) and, for the next page, ?cursor= with the next_cursor you received. Results are newest first, by when the record was created. next_cursor is null on the last page. Treat the cursor as opaque.

GET /users, GET /campaigns and GET /dispositions return everything in one data array, without a cursor.

Errors

Errors use HTTP status codes and a JSON body:

Data
{
  "error": {
    "code": "CALLING_HOURS",
    "message": "It's outside calling hours for this contact.",
    "details": { "zones": ["America/Chicago"], "nextOpenAt": "2026-09-29T13:00:00.000Z" }
  }
}

The example is shortened. details is optional. Validation errors add fieldErrors, a list of messages for each field, for example { "to": ["Required."] }. Branch on code, not on message.

Fieldtypedescription
VALIDATION422The request body or query is invalid. fieldErrors says which field. A body that is too large gets 413 with this code.
UNAUTHORIZED401Missing, unknown, revoked or expired key.
FORBIDDEN403The key lacks the scope this endpoint needs.
TENANT_SUSPENDED403The workspace is suspended or canceled.
NOT_FOUND404No such resource, agent or endpoint in your workspace.
PLAN_FEATURE402Your plan doesn't include API access.
BILLING_PAST_DUE402An invoice is overdue and its grace period is over. Read requests still work; write requests and outbound calls are blocked until it's paid.
USAGE_LIMIT402Outbound only: your plan or usage doesn't allow this call right now. See Place a call.
TRIAL_LIMIT402The workspace is on a trial and the call is outside the trial's limits, for example the trial minutes are used up or the number is in another country.
OUTBOUND_PAUSED403Outbound calling is paused for the workspace. Contact support.
TERMS_REQUIRED403The workspace owner hasn't accepted the Terms of Service yet.
RATE_LIMITED429Too many requests. Wait for Retry-After seconds.
AGENT_NOT_READY409The agent isn't active, isn't Available, their softphone isn't running, or they're already on a call.
AGENT_BUSY409The agent still has a call in progress.
DNC409The number is on your DNC list or the platform's list.
CALLING_HOURS409Outside calling hours in one of the contact's time zones. details lists the zones, their local times and nextOpenAt.
CALL_STATE409The call has already ended.
CONFLICT409The request clashes with the current state. For example, the workspace has no approved number to use as caller ID, another contact already uses the external_id, or the campaign is completed.
INVALID_NUMBER422Not a valid phone number.
EMERGENCY_NUMBER422Emergency numbers can't be called or stored as contact numbers.
COUNTRY_NOT_ALLOWED422Calls to that country aren't enabled for your workspace.
PROVIDER_ERROR502The phone system couldn't place the call or fetch the recording. Retry later.
INTERNAL500Something went wrong on our side. Retry later.

Rate limits

Each key can make a set number of requests a minute. The number comes from your plan: 600 a minute unless your plan sets a different limit. Placing calls (POST /calls) has an extra limit of 60 a minute per key. Over a limit, you get 429 RATE_LIMITED with a Retry-After header: the number of seconds until the next minute starts.

Workspace status

  • If an invoice is overdue and its grace period is over, read requests keep working, but write requests return 402 BILLING_PAST_DUE. They work again once the invoice is paid from your wallet.
  • If the workspace is suspended or canceled, every request returns 403 TENANT_SUSPENDED.

Endpoints

All paths are under https://centers.xoloip.com/api/v1. Unknown paths return 404 NOT_FOUND.

Account and users

Fieldtypedescription
GET /meany keyYour workspace (id, name, slug) and the key (id, name, scopes).
GET /usersusers:readAll users, sorted by name: id, name, email, username, role, status and state (their live agent state, or null). Filters: role (owner, admin, supervisor, agent), status (invited, active, disabled).

The agent state is one of offline, available, reserved, ringing, on_call, wrap_up or break.

Calls

Fieldtypedescription
GET /callscalls:readPaginated Call objects, newest first. Filters: since and until (when the call was created; until is exclusive), direction, status (one or more, comma-separated), agent_id, campaign_id, contact_id, customer_number.
GET /calls/{id}calls:readOne Call object.
POST /callscalls:writePlace a call from an agent's softphone (click-to-call). 202 with the call id. See Place a call.
POST /calls/{id}/hangupcalls:writeEnd a live call. 202. 409 CALL_STATE if it has already ended.
GET /calls/{id}/recordingrecordings:readThe call's recording as a WAV file. Supports Range requests. 404 when the call has no recording.
GET /dispositionscalls:readYour active dispositions: id, code, name, category, is_success.

Contacts

Fieldtypedescription
GET /contactscontacts:readPaginated contacts, newest first. Filters: q (searches name, company, email and phone digits), phone (main or alternate number), external_id, updated_since.
POST /contactscontacts:writeCreate or update a contact: matched by external_id, else by phone. 201 when created, 200 when updated.
GET /contacts/{id}contacts:readOne Contact object.
PATCH /contacts/{id}contacts:writeUpdate only the fields you send. 200 with the Contact object.
DELETE /contacts/{id}contacts:writeDelete the contact. 204. Add ?erase=1 to erase it with its personal data, recordings and voicemails; returns the counts.

Callbacks

Fieldtypedescription
GET /callbackscallbacks:readPaginated callbacks, newest first. Filters: status (one or more, comma-separated), assigned_user_id, since and until (the scheduled time).
POST /callbackscallbacks:writeSchedule a callback for a contact or a phone number. 201 with the Callback object.

Campaigns

Fieldtypedescription
GET /campaignscampaigns:readCampaigns that aren't archived: id, name, status, dial_mode, leads_total, leads_remaining.
POST /campaigns/{id}/leadscampaigns:writeAdd up to 1,000 leads. Contacts are created or updated and put on the campaign's API list.

DNC

Fieldtypedescription
POST /dncdnc:writeAdd a number to your workspace's DNC list, with an optional reason. 201 with the number in E.164.
DELETE /dnc/{phone}dnc:writeRemove a number from your workspace's DNC list. URL-encode the plus sign as %2B. 204, or 404 if the number isn't on the list.

Place a call

POST /api/v1/calls rings the customer from an agent's softphone, as if the agent had clicked the number. The agent's browser softphone connects first, on its own, with no click; then the customer is dialed.

Fieldtypedescription
agent_iduuidThe agent who makes the call. Send exactly one of agent_id, agent_email or agent_username.
agent_emailstringOr the agent's sign-in email.
agent_usernamestringOr the agent's username.
tostring, requiredThe number to call, in any common format.
contact_iduuidAttach the call to this contact. Otherwise the contact is matched by number.
caller_idE.164One of your approved workspace numbers with outbound caller ID on. Otherwise the usual caller-ID rules apply.
metadataobjectUp to 10 string keys (up to 40 characters each) with string values up to 200 characters. Returned on the Call object and in webhooks.
Shell
curl -X POST https://centers.xoloip.com/api/v1/calls \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_email": "agent@example.com",
    "to": "+1 415 555 0148",
    "metadata": { "crm_ticket": "T-1042" }
  }'
Data
{ "id": "0192f6c2-…", "status": "initiated" }
  • The agent must be an active user who is Available, with the softphone running and no call in progress. Otherwise you get 409 AGENT_NOT_READY.
  • Agents are looked up only inside your workspace; email and username ignore upper and lower case. An unknown agent returns 404; none or several agent fields return 422 VALIDATION.
  • DNC and calling hours always block over the API (409 DNC, 409 CALLING_HOURS). There's no override.
  • A number that isn't valid, an emergency number or a country your workspace can't call returns 422 INVALID_NUMBER, EMERGENCY_NUMBER or COUNTRY_NOT_ALLOWED.
  • A caller_id that isn't one of your approved outbound numbers returns 422 VALIDATION. With no number to call from at all, you get 409 CONFLICT.
  • A paused workspace returns 403 OUTBOUND_PAUSED; missing terms return 403 TERMS_REQUIRED.
  • 402 USAGE_LIMIT means the call isn't allowed under your plan's usage rules right now. details.blockedBy says why: outbound_minutes (this month's included outbound minutes are used up), destination (your plan doesn't include this destination), usage_wallet (your wallet balance is too low for calls beyond your included minutes), usage_limit (your monthly usage limit is reached) or limit (a usage limit set by our team). details also carries this month's usage.
  • If the agent's softphone doesn't connect within about 60 seconds, the call is canceled and the agent is free again.

Follow the call with GET /api/v1/calls/{id} or the call.* webhooks.

List calls

Shell
curl -G https://centers.xoloip.com/api/v1/calls \
  -H "Authorization: Bearer $API_KEY" \
  --data-urlencode "since=2026-09-01T00:00:00Z" \
  --data-urlencode "direction=outbound" \
  --data-urlencode "status=completed,no_answer" \
  --data-urlencode "limit=100"

The Call object

Fieldtypedescription
iduuid
directionstringinbound, outbound or internal.
originstringinbound, manual, click_to_call, api, campaign, callback or transfer.
statusstringinitiated, queued, ringing, in_progress, on_hold, completed, busy, no_answer, failed, canceled, abandoned, voicemail or machine.
from, to, customer_numberE.164 or nullNull after the contact was erased.
agentobject or nullid, name, email.
contact_id, campaign_id, queue_iduuid or null
dispositionobject or nullid, code, name, category.
notesstring or nullThe agent's notes.
created_at, answered_at, ended_attimestampanswered_at and ended_at can be null.
wait_sec, talk_sec, hold_sec, wrap_sec, duration_secintegerSeconds.
recordingobject or nullid, duration_sec and url (the path of the recording endpoint).
metadataobjectWhat you sent when placing the call. Empty after the contact was erased.

Contacts

Create or update a contact. With an external_id, the contact with that ID is updated; otherwise the phone number decides. phone is required when you create a contact.

Shell
curl -X POST https://centers.xoloip.com/api/v1/contacts \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_id": "crm-58213",
    "first_name": "Alex",
    "last_name": "Morgan",
    "company": "Example Co",
    "phone": "+14155550148",
    "timezone": "America/Los_Angeles",
    "tags": ["renewal"],
    "custom_fields": { "plan": "Pro" }
  }'

You can send first_name, last_name (up to 100 characters each), company, external_id (up to 200), email, phone, alt_phone, timezone (an IANA time zone such as America/Chicago), tags (up to 50) and custom_fields.

  • Each key in custom_fields must be a custom field that already exists in your workspace. Owners and admins create them under Fields on the Contacts page. Unknown keys return 422 VALIDATION. Send null to clear a value.
  • Another contact using the same external_id returns 409 CONFLICT.

The Contact object has id, first_name, last_name, company, email, phone, alt_phone, timezone, tags, custom_fields, external_id, created_at, updated_at and last_contacted_at. Creating a contact fires the contact.created webhook.

To handle a data-subject erasure request:

Shell
curl -X DELETE "https://centers.xoloip.com/api/v1/contacts/0192f6c3-…?erase=1" \
  -H "Authorization: Bearer $API_KEY"
Data
{ "calls": 3, "recordings": 1, "voicemails": 0 }

Erasing deletes the contact with its callbacks, campaign leads and list memberships. Its calls stay in your reports but lose their numbers, notes and metadata, and their recordings and voicemails are deleted. DNC entries are kept, so the person isn't called again. While the contact is on a live call, erasing returns 409 CONFLICT. This can't be undone.

Callbacks

Shell
curl -X POST https://centers.xoloip.com/api/v1/callbacks \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+14155550148",
    "scheduled_at": "2026-09-28T15:00:00Z",
    "assigned_user_id": "0192f6c4-…",
    "notes": "Wants a quote for 20 seats"
  }'

Send a contact_id or a phone (the contact is looked up, or created if there's none), and scheduled_at as a date-time with an offset. Leave out assigned_user_id and set queue_id to let the queue's agents claim it. A disabled user can't be assigned. The Callback object has id, contact_id, phone, scheduled_at, status, origin (api for these), assigned_user_id, queue_id, campaign_id, notes, created_at and completed_at. The callback.scheduled webhook fires.

Campaign leads

Shell
curl -X POST https://centers.xoloip.com/api/v1/campaigns/0192f6c5-…/leads \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "leads": [
      { "phone": "+14155550148", "first_name": "Alex", "external_id": "crm-58213" },
      { "phone": "+13125550199", "first_name": "Riley", "timezone": "America/Chicago" }
    ]
  }'
Data
{ "created": 1, "updated": 1, "skipped": [] }

Send 1 to 1,000 leads per request. Each lead takes the same fields as a contact, and phone is required. Contacts are created or updated and added to a list named "API leads · " plus the campaign name, which is created and attached to the campaign the first time. The dialer turns them into leads on its next sync, applying DNC, consent and calling-hours rules as usual. Rows that fail validation, such as a missing or invalid phone number, come back in skipped with their index and reason; the other rows are still saved.

An archived or unknown campaign returns 404. A completed campaign returns 409 CONFLICT: reopen it before adding leads.

DNC

Shell
curl -X POST https://centers.xoloip.com/api/v1/dnc \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "+14155550148", "reason": "Asked on a call" }'

curl -X DELETE https://centers.xoloip.com/api/v1/dnc/%2B14155550148 \
  -H "Authorization: Bearer $API_KEY"

Adding returns 201 with { "phone": "+14155550148" }, also when the number was already on the list. Removing returns 204. Both only change your workspace's list, not the platform's list.

Next: get notified as calls happen with webhooks.