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:
https://centers.xoloip.com/api/v1That'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:
curl https://centers.xoloip.com/api/v1/me \
-H "Authorization: Bearer $API_KEY"{
"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.
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
| Field | type | description |
|---|---|---|
| calls:read | Read | List and read calls, list dispositions. |
| calls:write | Write | Place calls for an agent and hang them up. |
| recordings:read | Read | Download call recordings. |
| contacts:read | Read | List and read contacts. |
| contacts:write | Write | Create, update, delete and erase contacts. |
| callbacks:read | Read | List callbacks. |
| callbacks:write | Write | Schedule callbacks. |
| campaigns:read | Read | List campaigns with lead counts. |
| campaigns:write | Write | Add leads to a campaign. |
| users:read | Read | List users with their role, status and live agent state. |
| dnc:write | Write | Add and remove numbers on your DNC list. |
GET /api/v1/me works with any valid key.
Conventions
- JSON only, with
snake_casefield names. Send request bodies as JSON withContent-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
sincetake 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": [ … ], "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:
{
"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.
| Field | type | description |
|---|---|---|
| VALIDATION | 422 | The request body or query is invalid. fieldErrors says which field. A body that is too large gets 413 with this code. |
| UNAUTHORIZED | 401 | Missing, unknown, revoked or expired key. |
| FORBIDDEN | 403 | The key lacks the scope this endpoint needs. |
| TENANT_SUSPENDED | 403 | The workspace is suspended or canceled. |
| NOT_FOUND | 404 | No such resource, agent or endpoint in your workspace. |
| PLAN_FEATURE | 402 | Your plan doesn't include API access. |
| BILLING_PAST_DUE | 402 | An 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_LIMIT | 402 | Outbound only: your plan or usage doesn't allow this call right now. See Place a call. |
| TRIAL_LIMIT | 402 | The 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_PAUSED | 403 | Outbound calling is paused for the workspace. Contact support. |
| TERMS_REQUIRED | 403 | The workspace owner hasn't accepted the Terms of Service yet. |
| RATE_LIMITED | 429 | Too many requests. Wait for Retry-After seconds. |
| AGENT_NOT_READY | 409 | The agent isn't active, isn't Available, their softphone isn't running, or they're already on a call. |
| AGENT_BUSY | 409 | The agent still has a call in progress. |
| DNC | 409 | The number is on your DNC list or the platform's list. |
| CALLING_HOURS | 409 | Outside calling hours in one of the contact's time zones. details lists the zones, their local times and nextOpenAt. |
| CALL_STATE | 409 | The call has already ended. |
| CONFLICT | 409 | The 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_NUMBER | 422 | Not a valid phone number. |
| EMERGENCY_NUMBER | 422 | Emergency numbers can't be called or stored as contact numbers. |
| COUNTRY_NOT_ALLOWED | 422 | Calls to that country aren't enabled for your workspace. |
| PROVIDER_ERROR | 502 | The phone system couldn't place the call or fetch the recording. Retry later. |
| INTERNAL | 500 | Something 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
| Field | type | description |
|---|---|---|
| GET /me | any key | Your workspace (id, name, slug) and the key (id, name, scopes). |
| GET /users | users:read | All 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
| Field | type | description |
|---|---|---|
| GET /calls | calls:read | Paginated 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:read | One Call object. |
| POST /calls | calls:write | Place a call from an agent's softphone (click-to-call). 202 with the call id. See Place a call. |
| POST /calls/{id}/hangup | calls:write | End a live call. 202. 409 CALL_STATE if it has already ended. |
| GET /calls/{id}/recording | recordings:read | The call's recording as a WAV file. Supports Range requests. 404 when the call has no recording. |
| GET /dispositions | calls:read | Your active dispositions: id, code, name, category, is_success. |
Contacts
| Field | type | description |
|---|---|---|
| GET /contacts | contacts:read | Paginated contacts, newest first. Filters: q (searches name, company, email and phone digits), phone (main or alternate number), external_id, updated_since. |
| POST /contacts | contacts:write | Create or update a contact: matched by external_id, else by phone. 201 when created, 200 when updated. |
| GET /contacts/{id} | contacts:read | One Contact object. |
| PATCH /contacts/{id} | contacts:write | Update only the fields you send. 200 with the Contact object. |
| DELETE /contacts/{id} | contacts:write | Delete the contact. 204. Add ?erase=1 to erase it with its personal data, recordings and voicemails; returns the counts. |
Callbacks
| Field | type | description |
|---|---|---|
| GET /callbacks | callbacks:read | Paginated callbacks, newest first. Filters: status (one or more, comma-separated), assigned_user_id, since and until (the scheduled time). |
| POST /callbacks | callbacks:write | Schedule a callback for a contact or a phone number. 201 with the Callback object. |
Campaigns
| Field | type | description |
|---|---|---|
| GET /campaigns | campaigns:read | Campaigns that aren't archived: id, name, status, dial_mode, leads_total, leads_remaining. |
| POST /campaigns/{id}/leads | campaigns:write | Add up to 1,000 leads. Contacts are created or updated and put on the campaign's API list. |
DNC
| Field | type | description |
|---|---|---|
| POST /dnc | dnc:write | Add a number to your workspace's DNC list, with an optional reason. 201 with the number in E.164. |
| DELETE /dnc/{phone} | dnc:write | Remove 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.
| Field | type | description |
|---|---|---|
| agent_id | uuid | The agent who makes the call. Send exactly one of agent_id, agent_email or agent_username. |
| agent_email | string | Or the agent's sign-in email. |
| agent_username | string | Or the agent's username. |
| to | string, required | The number to call, in any common format. |
| contact_id | uuid | Attach the call to this contact. Otherwise the contact is matched by number. |
| caller_id | E.164 | One of your approved workspace numbers with outbound caller ID on. Otherwise the usual caller-ID rules apply. |
| metadata | object | Up to 10 string keys (up to 40 characters each) with string values up to 200 characters. Returned on the Call object and in webhooks. |
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" }
}'{ "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 return422 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_NUMBERorCOUNTRY_NOT_ALLOWED. - A
caller_idthat isn't one of your approved outbound numbers returns422 VALIDATION. With no number to call from at all, you get409 CONFLICT. - A paused workspace returns
403 OUTBOUND_PAUSED; missing terms return403 TERMS_REQUIRED. 402 USAGE_LIMITmeans the call isn't allowed under your plan's usage rules right now.details.blockedBysays 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) orlimit(a usage limit set by our team).detailsalso 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
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
| Field | type | description |
|---|---|---|
| id | uuid | |
| direction | string | inbound, outbound or internal. |
| origin | string | inbound, manual, click_to_call, api, campaign, callback or transfer. |
| status | string | initiated, queued, ringing, in_progress, on_hold, completed, busy, no_answer, failed, canceled, abandoned, voicemail or machine. |
| from, to, customer_number | E.164 or null | Null after the contact was erased. |
| agent | object or null | id, name, email. |
| contact_id, campaign_id, queue_id | uuid or null | |
| disposition | object or null | id, code, name, category. |
| notes | string or null | The agent's notes. |
| created_at, answered_at, ended_at | timestamp | answered_at and ended_at can be null. |
| wait_sec, talk_sec, hold_sec, wrap_sec, duration_sec | integer | Seconds. |
| recording | object or null | id, duration_sec and url (the path of the recording endpoint). |
| metadata | object | What 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.
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_fieldsmust be a custom field that already exists in your workspace. Owners and admins create them under Fields on the Contacts page. Unknown keys return422 VALIDATION. Sendnullto clear a value. - Another contact using the same
external_idreturns409 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:
curl -X DELETE "https://centers.xoloip.com/api/v1/contacts/0192f6c3-…?erase=1" \
-H "Authorization: Bearer $API_KEY"{ "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
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
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" }
]
}'{ "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
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.