# Docs - **Get started** - [Introduction](/index.md): Run AI voice calling from your own systems — leads in, calls out, results back by webhook. - [Quickstart](/quickstart.md): Create an API key, make your first request, and start a campaign that calls your leads. - [Authentication & API keys](/authentication.md): Create API keys, send them on every request, and limit what each key can do. - **API basics** - Errors - [Errors](/errors.md): One error envelope for every endpoint, with a stable code you can branch on. - [agent_not_found](/errors/agent_not_found.md): Agent not found. - [agent_state_blocked](/errors/agent_state_blocked.md): The agent cannot make this change yet. - [agent_test_call_failed](/errors/agent_test_call_failed.md): The test call could not be placed. - [api_key_expired](/errors/api_key_expired.md): The API key has expired. - [api_key_limit_reached](/errors/api_key_limit_reached.md): This workspace already has the maximum number of active API keys. - [api_key_route_forbidden](/errors/api_key_route_forbidden.md): This endpoint cannot be called with an API key. - [api_key_scope_denied](/errors/api_key_scope_denied.md): The API key does not have the scope required for this request. - [bad_request](/errors/bad_request.md): The request could not be processed. - [call_not_found](/errors/call_not_found.md): Call not found. - [call_recording_deleted](/errors/call_recording_deleted.md): This recording was deleted under the data retention policy. - [call_recording_not_found](/errors/call_recording_not_found.md): No recording is available for this call. - [campaign_call_limit_reached](/errors/campaign_call_limit_reached.md): Campaign already has an active call in progress. - [campaign_daily_cap_reached](/errors/campaign_daily_cap_reached.md): Daily call limit reached for this campaign. - [campaign_default_inbound_exists](/errors/campaign_default_inbound_exists.md): Another default inbound campaign already exists for this phone number. - [campaign_dial_busy](/errors/campaign_dial_busy.md): Campaign dial in progress. - [campaign_has_no_agent](/errors/campaign_has_no_agent.md): Campaign has no agent assigned. - [campaign_leads_need_confirmation](/errors/campaign_leads_need_confirmation.md): Some leads were already contacted in this campaign. - [campaign_no_eligible_leads](/errors/campaign_no_eligible_leads.md): No leads available for calling. - [campaign_not_found](/errors/campaign_not_found.md): Campaign not found. - [campaign_not_ready](/errors/campaign_not_ready.md): The campaign is not ready to start. - [campaign_not_running](/errors/campaign_not_running.md): Campaign is not active. - [carrier_capacity_reached](/errors/carrier_capacity_reached.md): The phone number or carrier account is at its call limit. - [concurrent_call_limit_reached](/errors/concurrent_call_limit_reached.md): Merchant concurrent call limit reached. - [conflict](/errors/conflict.md): The request conflicts with the current state of the resource. - [daily_call_limit_reached](/errors/daily_call_limit_reached.md): Your workspace reached its daily limit for calls placed through the API. - [destination_not_allowed](/errors/destination_not_allowed.md): Calls to this country are not enabled for your workspace. - [dial_failed](/errors/dial_failed.md): Failed to place outbound call. - [dial_rejected](/errors/dial_rejected.md): The carrier rejected the call. - [dnc_no_valid_numbers](/errors/dnc_no_valid_numbers.md): Add at least one Indian mobile number. - [idempotency_key_reused](/errors/idempotency_key_reused.md): This Idempotency-Key was already used with a different request body. - [idempotency_request_in_progress](/errors/idempotency_request_in_progress.md): A request with this Idempotency-Key is still being processed. - [internal_error](/errors/internal_error.md): Something went wrong on our side. - [invalid_api_key](/errors/invalid_api_key.md): The API key is invalid or has been revoked. - [invalid_phone_number](/errors/invalid_phone_number.md): The phone number is not valid. - [lead_call_in_progress](/errors/lead_call_in_progress.md): Lead already has an active call. - [lead_changed](/errors/lead_changed.md): This lead changed since you opened it. - [lead_has_no_campaign](/errors/lead_has_no_campaign.md): Lead is not on a campaign. - [lead_not_found](/errors/lead_not_found.md): Lead not found. - [lead_not_on_campaign](/errors/lead_not_on_campaign.md): Lead is not on this campaign. - [lead_note_changed](/errors/lead_note_changed.md): This note was changed by someone else. - [lead_note_not_found](/errors/lead_note_not_found.md): Note not found. - [lead_note_pin_limit](/errors/lead_note_pin_limit.md): A lead can have at most 3 pinned notes. - [method_not_allowed](/errors/method_not_allowed.md): This HTTP method is not allowed on this endpoint. - [number_on_dnc](/errors/number_on_dnc.md): This number is on the DNC list and will not be dialed. - [parameter_invalid](/errors/parameter_invalid.md): One or more parameters are invalid. - [payload_too_large](/errors/payload_too_large.md): The request body is too large. - [payment_required](/errors/payment_required.md): Your account does not have enough balance or an active plan for this request. - [permission_denied](/errors/permission_denied.md): You do not have permission to perform this action. - [phone_number_not_dialable](/errors/phone_number_not_dialable.md): This phone number cannot place calls. - [phone_number_not_found](/errors/phone_number_not_found.md): Phone number not found. - [rate_limit_exceeded](/errors/rate_limit_exceeded.md): Too many requests. Slow down and retry later. - [resource_not_found](/errors/resource_not_found.md): The requested resource was not found. - [service_unavailable](/errors/service_unavailable.md): The service is temporarily unavailable. - [sip_trunk_not_found](/errors/sip_trunk_not_found.md): SIP trunk not found. - [ticket_attachment_unavailable](/errors/ticket_attachment_unavailable.md): An attachment was already sent or removed. - [ticket_edit_forbidden](/errors/ticket_edit_forbidden.md): You can only update tickets assigned to you or unassigned. - [ticket_merged](/errors/ticket_merged.md): The ticket was merged into another ticket. - [ticket_reopen_forbidden](/errors/ticket_reopen_forbidden.md): Only a manager can reopen a closed ticket. - [ticket_reply_blocked](/errors/ticket_reply_blocked.md): The reply cannot be sent to the customer. - [ticket_version_conflict](/errors/ticket_version_conflict.md): The ticket was changed since you read it. - [tool_not_found](/errors/tool_not_found.md): Tool not found. - [unauthenticated](/errors/unauthenticated.md): Authentication required. - [webhook_delivery_not_found](/errors/webhook_delivery_not_found.md): Webhook delivery not found. - [webhook_endpoint_disabled](/errors/webhook_endpoint_disabled.md): The webhook endpoint is disabled. - [webhook_endpoint_limit_reached](/errors/webhook_endpoint_limit_reached.md): This workspace already has the maximum number of webhook endpoints. - [webhook_endpoint_not_found](/errors/webhook_endpoint_not_found.md): Webhook endpoint not found. - [webhook_event_type_unknown](/errors/webhook_event_type_unknown.md): One or more event types are not recognised. - [webhook_https_required](/errors/webhook_https_required.md): The webhook URL must use https. - [webhook_url_invalid](/errors/webhook_url_invalid.md): The webhook URL is not a valid public URL. - [webhook_workspace_required](/errors/webhook_workspace_required.md): Webhooks are managed inside a workspace. - [whatsapp_client_message_id_reused](/errors/whatsapp_client_message_id_reused.md): This message id was already used for a different conversation. - [whatsapp_marketing_opted_out](/errors/whatsapp_marketing_opted_out.md): The recipient stopped marketing messages. - [whatsapp_number_not_connected](/errors/whatsapp_number_not_connected.md): No connected WhatsApp number. - [whatsapp_opt_in_required](/errors/whatsapp_opt_in_required.md): Marketing templates need a recorded opt-in. - [whatsapp_recipient_opted_out](/errors/whatsapp_recipient_opted_out.md): The recipient opted out of WhatsApp messages. - [whatsapp_template_not_approved](/errors/whatsapp_template_not_approved.md): The template is not approved. - [whatsapp_template_not_found](/errors/whatsapp_template_not_found.md): Template not found. - [whatsapp_upstream_throttled](/errors/whatsapp_upstream_throttled.md): WhatsApp is limiting messages from this number right now. - [whatsapp_upstream_unavailable](/errors/whatsapp_upstream_unavailable.md): WhatsApp could not take the message right now. - [whatsapp_window_closed](/errors/whatsapp_window_closed.md): The 24-hour customer service window is closed. - [workspace_required](/errors/workspace_required.md): Merchant workspace required - [Rate limits](/rate-limits.md): Each API key can make 300 requests per minute. Read the RateLimit headers and back off on 429. - [Idempotency](/idempotency.md): Retry POST requests safely with the Idempotency-Key header. - [Pagination](/pagination.md): Page through list endpoints with page numbers, a cursor, or an offset. - [Request IDs](/request-ids.md): Every response carries an X-Request-ID. Log it, send your own, and quote it to support. - [Versioning](/versioning.md): How the v1 API changes, what counts as breaking, and how deprecations are announced. - [Changelog](/changelog.md): Dated changes to the public API, with what to update in your integration. - **Guides** - [Build agents with the API](/guides/agents.md): Create, configure, publish, test and run voice agents with the CallMitra API. - [Campaigns & bulk calling](/guides/campaigns.md): Create a campaign with its leads, control dialing, and follow results. - [Place and read calls](/guides/direct-calls.md): Call any number with an agent in one request, then read the call, its transcript, recording and reports. - [Leads and callbacks](/guides/leads.md): Create and update leads, store your own fields, push leads from forms, and follow the callbacks your agents book. - [WhatsApp messages](/guides/whatsapp.md): Send WhatsApp template and session messages from your systems, track delivery, and list your templates. - [Tickets](/guides/tickets.md): Create, update and follow support tickets, add team notes, and reply to customers on WhatsApp. - [Workspace and usage](/guides/workspace-usage.md): Check which workspace and key a request runs as, and read calls, billed minutes and balance for a period. - [Calling in India](/guides/india-calling.md): Calling windows, do-not-call handling, retries, phone number formats and disclosure for Indian campaigns. - [Indian carriers](/guides/indian-carriers.md): Connect phone numbers from Plivo, Vobiz, Twilio or your own SIP trunk, and see how inbound and outbound calls use them. - [Agencies & client workspaces](/guides/agencies.md): Use one agency API key to work in every client workspace with the X-Workspace-Id header. - [Web calls](/guides/web-calls.md): Browser (web) calls from your own site or app are not yet available through the public API. - **Webhooks** - [Webhooks overview](/webhooks.md): Receive calls, leads, campaigns, tickets and WhatsApp messages in your system as signed HTTPS POST requests, with retries. - [Managing endpoints](/webhooks/endpoints.md): Create, update and delete webhook endpoints, rotate signing secrets, send test events, and use the delivery log to inspect and redeliver events. - [Event types](/webhooks/events.md): Every webhook event CallMitra sends, when it fires, the fields in its data, and a sample body. - [Verify signatures](/webhooks/verify-signatures.md): Check the webhook-signature header and timestamp in Node.js, Python, PHP or Go, so you only trust webhooks that CallMitra sent. - [Campaign and agent webhooks](/webhooks/campaign-agent-webhooks.md): How the per-campaign and per-agent webhook URLs work, how to verify X-Signature-SHA256, and how to move to webhook endpoints. - **Migrate** - [Migrate to CallMitra](/migrate.md): One guide for moving from Vapi, Retell, Bland, ElevenLabs, Bolna or a similar platform. Covers the concept map, a step-by-step checklist, webhook field mapping and error handling. - [Import agents](/migrate/import-agents.md): Bring an agent from Vapi, Retell, Bland or another CallMitra workspace into CallMitra with one API call. - **Reference** - API reference - [API reference](/api-reference.md): Every public endpoint, generated from the CallMitra OpenAPI spec, with all responses and examples. - Agents - [Create an agent](/api-reference/agents/createAgent.md): Creates an agent from a `config` (see the AgentConfig schema). It starts as a `draft`; publish it with publishAgent, or send `status: published`. Values outside the documented range or list, and a language, voice or model that is not available, are refused with `parameter_invalid` naming the field (for example `config.voice`). - [Delete an agent](/api-reference/agents/deleteAgent.md): Deletes the agent permanently. Past calls keep their records. To keep the agent but stop it, use pauseAgent. - [Get an agent](/api-reference/agents/getAgent.md): The agent with its published `config`, working `draftConfig`, status and phone numbers. - [Get a tool](/api-reference/agents/getTool.md): One tool by id. Credentials are never returned (`authSecretSet` says whether one is stored). - [Import an agent from another platform](/api-reference/agents/importAgent.md): Creates a **draft** agent from JSON exported from another platform. Review it, then publish with publishAgent. Fields that have no equivalent, and values that had to be approximated, are listed in `warnings` instead of failing the import. | Our field | Vapi | Retell | Bland | | --- | --- | --- | --- | | name | `name` | `agent_name` | `name` | | system prompt | system entries of `model.messages` | `llm.general_prompt` | `task` (or `prompt`) | | greeting | `firstMessage` | `llm.begin_message` | `first_sentence` | | language model | `model.model` | `llm.model` | `model` (Bland tiers map to the default) | | temperature | `model.temperature` | `llm.model_temperature` | `temperature` | | voice | `voice.provider` + `voice.voiceId` | `voice_id` | `voice` | | transcriber | `transcriber.provider` | - | - | | language | `transcriber.language` | `language` | `language` | | speaking speed | `voice.speed` | `voice_speed` | - | | call time limit | `maxDurationSeconds` | `max_call_duration_ms` | `max_duration` (minutes) | | background sound | `backgroundSound` | `ambient_sound` | `background_track` | | recording | `recordingEnabled` | - | `record` | A voice or language that is not available here is replaced: first by a voice with the same id or name, then by the language's default voice, with a warning. Tools, knowledge bases, webhooks and multi-state flows are not imported. `callmitra` copies another workspace's agent config (signing secrets are not copied). - [List agents](/api-reference/agents/listAgents.md): Every agent in the workspace, newest first, with its published `config` and working `draftConfig`. - [List tools](/api-reference/agents/listTools.md): Actions your agents can take on a call (HTTP requests, functions, tools from connected MCP servers), newest first. Credentials are never returned. - [List voices](/api-reference/agents/listVoices.md): Voices you can put on an agent, with the providers and languages they belong to. Set `config.tts` to a voice's `provider` and `config.voice` to its `voiceId`. Filters narrow `voices` only; `providers` and `languages` always list the full catalog. - [Stop taking calls](/api-reference/agents/pauseAgent.md): Switches the agent off (`takingCalls: false`). Its configuration is kept; start it again with startAgent. - [Publish the agent's draft](/api-reference/agents/publishAgent.md): Makes the saved draft the version used on calls and clears `unpublishedChanges`. Refused with `agent_state_blocked` when the draft breaks a rule (script too long, voice not available for the language, no usable language-model key, archived agent). - [Start taking calls](/api-reference/agents/startAgent.md): Switches the agent on (`takingCalls: true`, `rosterState: live`). It needs a phone number assigned to the agent. A waiting draft (or a never-published agent) is published first, with the same checks as publishAgent. When a rule fails (no phone number, archived agent, draft breaks a publish rule) the call is refused with `agent_state_blocked` and a message naming what is missing. - [Place a test call](/api-reference/agents/testCallAgent.md): Calls `destination` from one of your numbers so you can hear the agent. Not a campaign call and not billed; free plans have a test-call allowance. - [Update an agent](/api-reference/agents/updateAgent.md): Saves the change as the agent's draft; calls keep using the published version until you call publishAgent. Only the `config` keys you send change; a nested object you send (for example `script`) replaces the stored one. Bad values are refused with `parameter_invalid` naming the field. - Calls - [Call a lead now](/api-reference/calls/callLeadNow.md): Calls the lead right away through the first running campaign it belongs to, using that campaign's agent and caller ID. The lead's do-not-call flag, the campaign's daily cap and your concurrent call limit still apply; each refusal has its own error code. - [Call a lead in a campaign now](/api-reference/calls/callNow.md): Places the call immediately, outside the dial schedule, with the campaign's agent and numbers. Numbers on do-not-call are never dialed. To call any number without a campaign, use `POST /calls`. - [Place a call](/api-reference/calls/createCall.md): Calls `to` now with the agent, outside any campaign schedule. The number is saved as a lead (or matched to an existing one) and dialed through the agent's instant campaign, one call at a time per agent. Numbers on your do-not-call list are never dialed. The response means the carrier accepted the dial; follow the call with `GET /calls/{callId}` or call webhooks. Send an `Idempotency-Key` header so a retried request does not call twice. Each request dials once. A call that is not answered, is busy or times out is not redialed, and a refused dial is not queued for later: place another call if you want a second attempt. The one exception is a callback the callee asks for and the agent books during the call; that scheduled callback is placed at the agreed time. Toll-fraud limits: `to` must be in your workspace's home country (from your billing address; India when none is set) unless support enabled more countries, and each workspace may place a fixed number of calls per UTC day through this endpoint (`daily_call_limit_reached` with `Retry-After` until 00:00 UTC). Calling hours (TRAI / local quiet hours) are not enforced on direct calls: checking the time of day at the callee is your responsibility. Campaigns apply their own calling windows. - [Get a call](/api-reference/calls/getCall.md): Status, transcript, summary, outcome, cost and the details the agent collected. - [Calls per day](/api-reference/calls/getCallDailyCounts.md): Calls per calendar day for the last `days` days (India Standard Time): total, completed, failed, not answered and average length, plus totals. Days without calls are zeros. - [Call performance](/api-reference/calls/getCallPerformance.md): Totals, connect rate, conversion, outcome and channel split, calls per hour and an agent leaderboard for the last 7, 30 or 90 days, with the range before it for comparison. - [Download a call recording](/api-reference/calls/getCallRecording.md): The call's audio (MP3, or WAV for a call that is still being converted). Check `hasRecording` on the call first. - [Get a call transcript](/api-reference/calls/getCallTranscript.md): The conversation as text and as ordered turns, plus the tools the agent called. Empty while nothing has been said; final once the call has ended. - [List calls](/api-reference/calls/listCalls.md): Newest first. For deep lists pass `cursor` (empty for the first page, then the `nextCursor` you got back): cursor pages skip the total count and stay fast. Without `cursor` the list pages by `page` and counts matches up to 10,000. - Campaigns - [Create an empty campaign](/api-reference/campaigns/createCampaign.md): Add leads later with `PUT /campaigns/{campaign_id}/leads`. Without `phoneNumberId` the agent's assigned number is used. - [Create a campaign with its leads](/api-reference/campaigns/createCampaignWithLeads.md): The usual way to start: one request creates the campaign and adds or creates its leads. Start it with `POST /campaigns/{campaign_id}/start`, or send `campaignData.isActive: true` to start it right away (the same checks as start apply). - [Delete a campaign](/api-reference/campaigns/deleteCampaign.md): Cancels its scheduled dialing. Its calls are kept and no longer point at the campaign. - [Get a campaign](/api-reference/campaigns/getCampaign.md) - [Dialing status](/api-reference/campaigns/getCampaignDialStatus.md): Whether the campaign is placing calls right now and, if not, why and when it will. - [List scheduled callbacks](/api-reference/campaigns/listCallbacks.md): Callbacks your agents booked during calls and reminder calls from your rules, soonest first. Use `leadId` to see what is booked for one lead. - [List a campaign's leads](/api-reference/campaigns/listCampaignLeads.md): Active leads of the campaign, newest first, with their per-campaign dialing state. Send `page` to get one page of `limit` leads; without `page` every matching lead is returned in one response, so always send it for large campaigns. - [List campaigns](/api-reference/campaigns/listCampaigns.md): Campaigns you can see, page by page. Running campaigns include `dialHealth`. - [Pause automatic dialing](/api-reference/campaigns/pauseCampaignDialing.md): The campaign stays active; resume to continue where it left off. Calls in progress finish. - [Resume automatic dialing](/api-reference/campaigns/resumeCampaignDialing.md): Only for a running campaign whose dialing was paused; a stopped campaign needs `POST /campaigns/{campaign_id}/start`. - [Start a campaign](/api-reference/campaigns/startCampaign.md): Starts dialing. Calls are placed only inside the dial window and up to the daily limit. The campaign must have an agent whose prompt the leads can fill and a number that can place calls; otherwise nothing changes and the error says what to fix. - [Stop a campaign](/api-reference/campaigns/stopCampaign.md): Stops the campaign and cancels calls waiting to be placed. A call in progress finishes. Stopping a stopped campaign is allowed and changes nothing. - [Update a campaign](/api-reference/campaigns/updateCampaign.md): Send only the fields to change. `settings` is merged into the current settings. Changing dialing rules on a running campaign re-plans its next dial round. - [Add or remove leads](/api-reference/campaigns/updateCampaignLeads.md): New leads are dialed automatically if the campaign is running. Removed leads keep their call history. A lead already on the campaign, or a number already on it, is skipped. - Do not call - [Add numbers to do-not-call](/api-reference/do-not-call/addDoNotCall.md): Marks existing leads with these numbers as do-not-call and creates entries for new numbers. Numbers that are not Indian mobiles are skipped; if none is valid the request fails with `dnc_no_valid_numbers`. - [List do-not-call numbers](/api-reference/do-not-call/listDoNotCall.md): The 500 most recently changed leads marked do-not-call, newest first. The list stops at 500 entries; `hasMore` is true when older entries were left out. The dialer never calls these numbers. - [Remove a number from do-not-call](/api-reference/do-not-call/removeDoNotCall.md): Clears the do-not-call flag on the lead so campaigns may call it again. - Lead intake webhook - [Push a lead](/api-reference/lead-intake-webhook/pushLead.md): Send the integration key in `X-Lead-Webhook-Key` (or as `?key=`). Limited to 300 requests per minute per IP. Errors return `{"success": false, "error": "..."}`. - Lead notes - [Add a note](/api-reference/lead-notes/createLeadNote.md): A note added with an API key is authored `api` and is kept like a note a person wrote. - [Delete a note](/api-reference/lead-notes/deleteLeadNote.md): Only the author or a workspace manager can delete a person's note. - [List a lead's notes](/api-reference/lead-notes/listLeadNotes.md): The first page carries the lead's summary note (`brief`) and pinned notes; `items` are the other notes, newest first. Follow `nextCursor` for older notes. Replaces the deprecated `notes` text field. - [Pin a note](/api-reference/lead-notes/pinLeadNote.md): At most three notes per lead can be pinned; a fourth returns 409 `lead_note_pin_limit`. - [Unpin a note](/api-reference/lead-notes/unpinLeadNote.md) - [Edit a note](/api-reference/lead-notes/updateLeadNote.md): Send the `version` you read. If someone changed the note since, you get 409 `lead_note_changed` with the current note in `detail.note`. Only the author or a workspace manager can edit a person's note. - Leads - [Act on many leads](/api-reference/leads/bulkLeadAction.md): Change status, assignee, tags or do-not-call for up to 500 leads, or delete them. IDs outside your workspace are skipped, not reported. `updated` counts the leads that changed. - [Create a lead](/api-reference/leads/createLead.md): Creates one lead and optionally adds it to campaigns. The phone is stored in E.164 form (a 10-digit number gets `+91`, as in a CSV upload); a number that cannot be read is refused with `invalid_phone_number`. The number is not checked for duplicates. Values that could not be saved as sent (an unknown status, a mistyped field) come back in `warnings`. - [Delete a lead](/api-reference/leads/deleteLead.md): Permanently deletes the lead. Past calls stay in call history. - [Get a lead](/api-reference/leads/getLead.md): One lead with its campaigns, owner and the text of its latest notes. - [Lead timeline](/api-reference/leads/getLeadTimeline.md): Calls, WhatsApp messages and orders, tickets, notes, lead changes and callbacks for one lead, newest first. Page with `cursor`; the first page also lists open callbacks. - [List custom lead fields](/api-reference/leads/listLeadFields.md): Every custom field defined in the workspace. Send values for these keys in a lead's `attributes` object on createLead and updateLead; pushLead takes them as top-level fields. `valueType` says how they are stored and compared in audience rules. - [List leads](/api-reference/leads/listLeads.md): Newest first by default. Page with `page` and `limit`, or for deep lists pass `cursor` (empty first, then `nextCursor`): cursor pages skip the count and stay fast. Without `cursor` matches are counted up to 10,000 unless `includeTotal=true`. - [Update a lead](/api-reference/leads/updateLead.md): Changes only the fields you send. Send `If-Match` with the lead's `updatedAt` to refuse the write (`lead_changed`) when someone changed the lead after you read it. A new `phone` is stored in E.164 form like on create. Campaign IDs you cannot access are skipped. - Phone numbers - [Get a phone number](/api-reference/phone-numbers/getPhoneNumber.md): One number with its carrier, call capacity and the agent using it. - [Get a SIP trunk](/api-reference/phone-numbers/getSipTrunk.md): One SIP trunk with its settings, sync status and numbers. The password is never returned. - [List phone numbers](/api-reference/phone-numbers/listPhoneNumbers.md): Every number in your workspace with its carrier, call capacity and the agent using it. Credentials are never returned, only whether each one is saved. - [List SIP trunks](/api-reference/phone-numbers/listSipTrunks.md): Your own SIP providers connected to the calling gateway, the numbers on each, and the gateway address to give your provider. Passwords are never returned. - Tickets - [Add a note to a ticket](/api-reference/tickets/addTicketNote.md): A note your team sees on the ticket; the customer does not. Optionally moves the ticket's status. - [Create a ticket](/api-reference/tickets/createTicket.md): Opens a ticket for `leadId` (or the lead behind `waConversationId`). Category and source decide its team; the team's rules may assign it automatically. - [Get a ticket](/api-reference/tickets/getTicket.md): The ticket with its latest activities (notes, replies and changes). - [List ticket activities](/api-reference/tickets/listTicketActivities.md): Older activities of a ticket, page by page: pass the previous page's `activitiesCursor` as `before`. - [List ticket categories](/api-reference/tickets/listTicketCategories.md): Categories to file tickets under (`categoryId`), in display order. - [List tickets](/api-reference/tickets/listTickets.md): Newest change first by default. Filter by status, type, priority, lead, category, team or tag. - [List ticket teams](/api-reference/tickets/listTicketTeams.md): Teams tickets are routed to (`teamId`), sorted by name. - [Reply to the customer](/api-reference/tickets/replyToTicket.md): Sends a reply to the ticket's customer on WhatsApp. Within 24 hours of the customer's last message send `text`; after that send `templateEvent` to use the approved template set up for that ticket event. The reply is queued and recorded on the ticket. Retrying with the same `clientId` returns the first reply (with `replayed: true`) instead of sending again. - [Update a ticket](/api-reference/tickets/updateTicket.md): Changes only the fields you send. Send `version` to make sure you do not overwrite someone's change. - Webhooks - [Create a webhook endpoint](/api-reference/webhooks/createWebhookEndpoint.md): Registers a URL that receives the event types in `events` (empty means all). The response carries the signing `secret` (`whsec_...`) once; store it to verify deliveries. - [Delete a webhook endpoint](/api-reference/webhooks/deleteWebhookEndpoint.md): Stops deliveries at once and deletes the endpoint's delivery history. - [Get a webhook delivery](/api-reference/webhooks/getWebhookDelivery.md): Includes the exact event `payload` that was signed and sent. - [Get a webhook endpoint](/api-reference/webhooks/getWebhookEndpoint.md) - [List webhook deliveries](/api-reference/webhooks/listWebhookDeliveries.md): Newest first. Deliveries are kept for 30 days. - [List webhook endpoints](/api-reference/webhooks/listWebhookEndpoints.md) - [List event types](/api-reference/webhooks/listWebhookEventTypes.md) - [callback.completed: a booked callback was made](/api-reference/webhooks/onCallbackCompleted.md): Sent to webhook endpoints subscribed to this event (or to every event). A webhook URL set on a campaign or an agent receives the fields of `data` at the top level instead, plus `event` (the type) and `timestamp` (Unix seconds), signed with `X-Signature-SHA256` only. - [callback.failed: a booked callback did not reach the lead](/api-reference/webhooks/onCallbackFailed.md): Sent to webhook endpoints subscribed to this event (or to every event). A webhook URL set on a campaign or an agent receives the fields of `data` at the top level instead, plus `event` (the type) and `timestamp` (Unix seconds), signed with `X-Signature-SHA256` only. - [callback.scheduled: a callback was booked](/api-reference/webhooks/onCallbackScheduled.md): Sent to webhook endpoints subscribed to this event (or to every event). A webhook URL set on a campaign or an agent receives the fields of `data` at the top level instead, plus `event` (the type) and `timestamp` (Unix seconds), signed with `X-Signature-SHA256` only. - [call.completed: a call finished](/api-reference/webhooks/onCallCompleted.md): Sent to webhook endpoints subscribed to this event (or to every event). A webhook URL set on a campaign or an agent receives the fields of `data` at the top level instead, plus `event` (the type) and `timestamp` (Unix seconds), signed with `X-Signature-SHA256` only. - [call.escalated: a call was transferred to a person](/api-reference/webhooks/onCallEscalated.md): Sent to webhook endpoints subscribed to this event (or to every event). A webhook URL set on a campaign or an agent receives the fields of `data` at the top level instead, plus `event` (the type) and `timestamp` (Unix seconds), signed with `X-Signature-SHA256` only. - [call.failed: a call ended without connecting](/api-reference/webhooks/onCallFailed.md): Sent to webhook endpoints subscribed to this event (or to every event). - [campaign.completed: a campaign dialled every lead](/api-reference/webhooks/onCampaignCompleted.md): Sent to webhook endpoints subscribed to this event (or to every event). - [campaign.started: a campaign was started](/api-reference/webhooks/onCampaignStarted.md): Sent to webhook endpoints subscribed to this event (or to every event). - [lead.created: a lead was created](/api-reference/webhooks/onLeadCreated.md): Sent to webhook endpoints subscribed to this event (or to every event). Sent for leads added one at a time: `createLead`, the console's add-lead form, and each lead a connected lead source delivers (Meta lead ads, Google Ads lead forms, lead-source webhooks). It is not sent for spreadsheet imports, campaign lead uploads or campaigns created with leads, nor for leads made automatically for WhatsApp contacts, unknown inbound callers, outbound calls to a new number or do-not-call entries. - [lead.updated: a lead was edited](/api-reference/webhooks/onLeadUpdated.md): Sent to webhook endpoints subscribed to this event (or to every event). - [ticket.created: a support ticket was opened](/api-reference/webhooks/onTicketCreated.md): Sent to webhook endpoints subscribed to this event (or to every event). - [ticket.rated: a customer rated a support ticket](/api-reference/webhooks/onTicketRated.md): Sent to webhook endpoints subscribed to this event (or to every event). - [ticket.reopened: a support ticket opened again](/api-reference/webhooks/onTicketReopened.md): Sent to webhook endpoints subscribed to this event (or to every event). - [ticket.resolved: a support ticket was resolved](/api-reference/webhooks/onTicketResolved.md): Sent to webhook endpoints subscribed to this event (or to every event). - [ticket.updated: a support ticket changed](/api-reference/webhooks/onTicketUpdated.md): Sent to webhook endpoints subscribed to this event (or to every event). - [transfer.failed: a transfer to a person did not connect](/api-reference/webhooks/onTransferFailed.md): Sent to webhook endpoints subscribed to this event (or to every event). A webhook URL set on a campaign or an agent receives the fields of `data` at the top level instead, plus `event` (the type) and `timestamp` (Unix seconds), signed with `X-Signature-SHA256` only. - [webhook.test: sent by the send test event operation](/api-reference/webhooks/onWebhookTest.md): Sent to webhook endpoints subscribed to this event (or to every event). - [whatsapp.message.received: a customer sent a WhatsApp message](/api-reference/webhooks/onWhatsappMessageReceived.md): Sent to webhook endpoints subscribed to this event (or to every event). - [Redeliver an event](/api-reference/webhooks/redeliverWebhook.md): Queues the same event (same `id` and `webhook-id`) to the same endpoint again, due now. Returns the new delivery. Tests and redeliveries share a cap of 10 per endpoint per minute (429 with `Retry-After`). - [Rotate an endpoint's signing secret](/api-reference/webhooks/rotateWebhookEndpointSecret.md): Returns a new `secret` once. For the next 24 hours deliveries carry signatures from both the new and the old secret in `webhook-signature`, so you can switch without dropping events. - [Send a test event](/api-reference/webhooks/sendTestWebhook.md): Sends a signed `webhook.test` event to the endpoint now, whatever its event filter, and returns the delivery with the endpoint's answer. A failed test is retried like any other delivery. Tests and redeliveries share a cap of 10 per endpoint per minute (429 with `Retry-After`). - [Set an agent's post-call webhook](/api-reference/webhooks/setAgentPostCallWebhook.md): After each of this agent's calls, a summary is POSTed to `url` (used when the campaign has no webhook of its own). `trigger` picks which calls are sent: `every`, `completed` or `voicemail`. Send an empty `url` to turn it off. Omit `secret` to keep the stored one; the secret is never returned (`hasSecret` says whether one is set). The change applies to the live agent at once. A URL that does not point at a public internet address is refused with `agent_state_blocked`. - [Update a webhook endpoint](/api-reference/webhooks/updateWebhookEndpoint.md): Changes only the fields you send. Re-enabling a disabled endpoint clears its failure count. - Whatsapp - [Get a WhatsApp message](/api-reference/whatsapp/getWhatsAppMessage.md): Current delivery status of a message you sent. Poll it to follow `queued` → `sent` → `delivered` → `read` (or `failed`). - [List WhatsApp templates](/api-reference/whatsapp/listWhatsAppTemplates.md): Templates of your WhatsApp Business accounts, to pick `template.name` and `template.language`. - [Send a WhatsApp message](/api-reference/whatsapp/sendWhatsAppMessage.md): Sends a template, text, media, interactive, location or contacts message to `to` (or `contactId`) from `phoneId` or your default number. Templates can be sent any time; every other type needs the customer to have messaged you in the last 24 hours. A refusal by WhatsApp after the message was created returns 200 with `status: failed` and `error`; a temporary refusal returns 429 or 503 with `Retry-After`, and nothing was delivered. - Workspace - [Get usage and balance](/api-reference/workspace/getUsage.md): Calls, talk time, billed minutes and wallet charges for a period, plus the current plan period and wallet balance. Defaults to the current billing period (or the last 30 days). `balance` is null when billing is not enabled on the deployment. - [Check an API key](/api-reference/workspace/getWorkspace.md): Returns the workspace the request runs in, the key that sent it (access, resources, expiry) and its rate limit. Every key can call this, including read-only keys and keys limited to other resources. With `X-Workspace-Id`, an agency key sees the client workspace. - [List client workspaces](/api-reference/workspace/listAgencyClients.md): For an agency: every client workspace it manages, oldest first. Send a client's `id` as `X-Workspace-Id` on any other request to run it inside that workspace. Every key of the agency can call this, whatever its resources; the key's user must be a manager. The workspace needs the agency add-on; without it, or from a client workspace, the call gets `permission_denied`.