Authentication & Base URL
9 min
Introduction
ExoML provides developers with APIs that give low-level control over call legs, media, and bridges.
These APIs are designed for advanced voice orchestration, real-time call control, and custom contact center or voice workflows.
Base URL
All ExoML Aare served from the Exotel CPaaS API host.
Base URL format
https://cpaas-api.in.exotel.com/v2/accounts/{account_sid}
Example
https://cpaas-api.in.exotel.com/v2/accounts/ameyo5m
Important
- ameyo5m is an example Account SID
- Always use {account_sid} as a placeholder
How to get your API credentials
To use the ExoML, developers must generate API credentials from the Exotel dashboard.
Steps
- Log in to https://my.exotel.com
- Go to Developer Settings → API Settings
- Copy:
- Account SID
- API Key
- API Token
These credentials are required for all Call Control API requests.
Authentication
All ExoML use HTTP Basic Authentication.
- Username: API Key
- Password: API Token
Example
curl -u "<API_KEY>:<API_TOKEN>" \
https://cpaas-api.in.exotel.com/v2/accounts/<account_sid>/legs
Notes
- Credentials are not embedded in the URL
- Credentials are not passed in request bodies
- Every request must include Basic Authentication
Request Format
Required headers
Content-Type: application/json
Authorization: Basic <base64(API_KEY:API_TOKEN)>
URL structure
/v2/accounts/{account_sid}/{resource}
Common resources
- /legs
- /legs/{leg_sid}
- /legs/{leg_sid}/actions
- /bridges
- /bridges/{bridge_sid}
- /bridges/{bridge_sid}/actions
Example: Create a Leg
Endpoint
POST /legs
Full URL
https://cpaas-api.in.exotel.com/v2/accounts/{account_sid}/legs
Example request
curl -u "<API_KEY>:<API_TOKEN>" \
-H "Content-Type: application/json" \
-X POST \
https://cpaas-api.in.exotel.com/v2/accounts/<account_sid>/legs \
-d '{
"contact_uri": "09163816621",
"exophone": "08030752400",
"leg_event_endpoint": "grpc://127.0.0.1:9001"
}'
Next Steps
Once authentication is set up, you can:
- Create and manage call legs
- Bridge multiple legs
- Control media (play, say, record, stream)
- Receive real-time call events via HTTPs event endpoint.
Proceed to the ExoML Introduction section to explore individual endpoints.