Exotel

Exotel API

Click-to-call, IVR flows, call records and DLT-compliant SMS from Indian cloud telephony provider Exotel.

CommunicationGuided#voice#sms#telephony#india#click-to-call#ivr

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Exotel is an Indian cloud telephony and customer-communication platform. Businesses rent virtual numbers (ExoPhones) from it and use its REST API for click-to-call between agents and customers, outbound IVR calls into a call flow built in the dashboard, call records and recordings, and transactional or bulk SMS under India's DLT rules. This guided collection covers those core pieces of the Voice v1 and SMS APIs plus the newer CCM call record.

Get credentials

  1. Create an account at my.exotel.com/auth/register (a trial gives limited credit; KYC is required for production use).
  2. In the Exotel dashboard open Settings > API Settings. The API credentials page shows your API Key, API Token and Account SID.
  3. Note your account's region: Singapore-cluster accounts use api.exotel.com, Mumbai-cluster accounts use api.in.exotel.com. The wrong host fails authentication.
  4. Buy or note an ExoPhone (virtual number) for callerId. For SMS in India, register your entity, headers (sender IDs) and templates on a DLT portal and keep the DLT Entity ID and template IDs ready.

Authentication

HTTP Basic auth on every request: username = API Key, password = API Token (Authorization: Basic base64(key:token)). The same key and token work on the classic API host and the CCM host. The Account SID is part of every path. Request bodies are form-urlencoded with capitalised field names (From, To, CallerId, Body).

Base URLs

UseSingaporeMumbai
Calls, SMS, balance, numbers (v1)https://api.exotel.com/v1/Accounts/<sid>https://api.in.exotel.com/v1/Accounts/<sid>
CCM call records (v3)https://ccm-api.exotel.com/v3/accounts/<sid>https://ccm-api.in.exotel.com/v3/accounts/<sid>

There is no separate sandbox host: test on a trial account with your own numbers. v1 resources return XML unless the path ends in .json; this collection uses the .json form so responses are JSON.

Variables and run order

Fill apiKey, apiToken, accountSid, subdomain (and ccmSubdomain), callerId, fromNumber (agent phone, rung first) and toNumber (customer). Run 1. Start here (balance, ExoPhones, number lookup), then 2. Calls (Connect two numbers saves callSid for the detail requests) and 3. SMS (set dltEntityId, senderId and a DLT-approved Body; Send SMS saves smsSid).

Limits and pricing

Calls are billed per pulse/minute and SMS per unit according to your plan; recordings and URL shortening may cost extra. See the pricing pages on exotel.com or your plan in the dashboard. Exotel's error guide cites a limit of about 200 requests per minute for most endpoints; Connect Two Numbers is throttled per account too. Bulk dynamic SMS takes at most 100 messages per request. Handle 429 with exponential backoff.

Common errors

HTTPMeaningWhat to do
400Missing or invalid parameter (RestException.Message names it), or no DLT template matches the SMS bodyFix the field; for SMS check From, DltEntityId and the template text.
401Wrong key or token, or wrong regional hostCheck credentials and subdomain.
402Insufficient balance or plan limitTop up the account.
403Account inactive or not permittedContact Exotel support.
404Unknown SID or numberCheck the id in the path.
429Rate limitedBack off and retry.

Errors come as {"RestException": {"Status", "Message"}}. SMS delivery outcomes are in DetailedStatusCode / DetailedStatus (for example DELIVERED_TO_HANDSET, FAILED_INVALID_DESTINATION_NUMBER).

Links

Endpoints 12

1. Start here

  • GETGet account balancehttps://{{subdomain}}/v1/Accounts/{{accountSid}}/Balance.jsonReturns the wallet balance shared by voice, SMS and WhatsApp, plus currency and pricing plan. It is the simplest authenticated call, so run it first to prove…
  • GETList ExoPhoneshttps://{{subdomain}}/v2_beta/Accounts/{{accountSid}}/IncomingPhoneNumbersLists the virtual numbers (ExoPhones) on the account with their capabilities. Pick one with voice capability for callerId; for SMS the ExoPhone or an approved…
  • GETLook up a numberhttps://{{subdomain}}/v1/Accounts/{{accountSid}}/Numbers/{{toNumber}}.jsonReturns telecom metadata for an Indian phone number: whether it is mobile or landline, its telecom circle, operator and DND (Do Not Disturb) registration. Use…

2. Calls

  • POSTConnect two numbers (click-to-call)https://{{subdomain}}/v1/Accounts/{{accountSid}}/Calls/connect.jsonPlaces an outbound call that rings From first (usually your agent) and, once answered, dials To (the customer) and bridges them, showing CallerId (your…
  • POSTConnect a number to a call flowhttps://{{subdomain}}/v1/Accounts/{{accountSid}}/Calls/connect.jsonCalls one number and connects it to a call flow (an IVR or app built in the Exotel App Bazaar / flow builder) instead of a second person. Use it for automated…
  • GETGet call detailshttps://{{subdomain}}/v1/Accounts/{{accountSid}}/Calls/{{callSid}}.jsonReturns one call by its SID, with the final status, duration, price and recording URL once the call has ended. Add details=true for leg-level data (each leg's…
  • GETList calls (bulk call details)https://{{subdomain}}/v1/Accounts/{{accountSid}}/Calls.jsonSearches call records with filters and cursor paging; use it for daily reports and reconciliation. What comes back: Metadata (Total, PageSize, page URIs) and…
  • GETGet CCM call record (v3)https://{{ccmSubdomain}}/v3/accounts/{{accountSid}}/calls/{{callSid}}Returns the enriched Contact Center Management (CCM) record of a call: direction, virtual number, state (active or terminal), timings, total talk time, the…

3. SMS

  • POSTSend SMShttps://{{subdomain}}/v1/Accounts/{{accountSid}}/Sms/send.jsonSends one SMS from your ExoPhone or approved sender ID. In India DltEntityId is mandatory and the text must match a DLT-approved template (send DltTemplateId…
  • POSTSend the same SMS to many numbershttps://{{subdomain}}/v1/Accounts/{{accountSid}}/Sms/send.jsonSends one identical message to several recipients in a single call by repeating To[] (same endpoint as Send SMS). Use it for broadcast notices; for…
  • POSTSend personalised SMS in bulkhttps://{{subdomain}}/v1/Accounts/{{accountSid}}/Sms/bulksend.jsonSends up to 100 different messages in one request through the bulksend endpoint; each Messages[N] entry has its own To and Body (and optionally its own From,…
  • GETGet SMS detailshttps://{{subdomain}}/v1/Accounts/{{accountSid}}/SMS/Messages/{{smsSid}}.jsonReturns the current delivery state of one message by its SID (smsSid). Poll it when you do not use a StatusCallback, or to debug a failure; decide on…

API details

Base URL
https://api.exotel.com/v1
https://api.in.exotel.com/v1
https://ccm-api.exotel.com/v3
Authentication
HTTP Basic authentication (username and password)
Operations
12 operations on 12 pathsGET 7POST 5
Main resources
1. Start here 32. Calls 53. SMS 4
Description format
Swastik Codes guided collection, API version checked against the docs on 2026-11-18

How to test the Exotel API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Exotel API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses HTTP Basic authentication (username and password). Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Get account balance” (GET https://{{subdomain}}/v1/Accounts/{{accountSid}}/Balance.json), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Exotel API?

Click-to-call, IVR flows, call records and DLT-compliant SMS from Indian cloud telephony provider Exotel. It is listed under Communication and has 12 endpoints.

Who publishes the Exotel API?

It is listed from Exotel's public API description (an OpenAPI document), not published by Exotel on Swastik Codes. Anyone who controls exotel.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Exotel API?

Its description lists 3 base URLs: https://api.exotel.com/v1, https://api.in.exotel.com/v1, https://ccm-api.exotel.com/v3. The first is the usual one; the others are typically sandbox or regional servers.

How do I authenticate with the Exotel API?

With HTTP Basic authentication (username and password).

How many endpoints does the Exotel API have?

12 operations on 12 paths (7 GET, 5 POST). The largest groups are 1. Start here, 2. Calls, 3. SMS.

Is forking the Exotel API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.