Legs API
Legs APIs — Introduction
Leg Actions
10 min
description leg actions allow you to control an existing leg after it has been created using these actions, you can answer, hang up, play audio, record, gather dtmf, stream audio, bridge calls, and more all leg actions are executed via a single actions api using an exoml payload authentication type http basic authentication username api key password api token request headers content type application/json authorization basic \<base64(api key\ api token)> request body structure field type required description exoml string yes xml describing the action action custom param string no custom value echoed back in events base url https //cpaas api in exotel com/v2/accounts/{account sid} example https //cpaas api in exotel com/v2/accounts/ameyo5m common endpoint all leg actions are executed using post /v2/accounts/{account sid}/legs/{leg sid}/actions full url https //cpaas api in exotel com/v2/accounts/{account sid}/legs/{leg sid}/actions common request body parameter type required description action custom param string no custom value echoed back in external events exoml string yes exoml xml defining the action common response http 202 – accepted { "request id" "abc123", "http code" 202, "response" { "data" { "leg sid" "leg sid" } } } common error responses (applies to all actions) http code description 400 invalid exoml or parameters 401 authentication failed 403 not authorized 404 leg not found 429 rate limit exceeded 500 internal server error external events (general) events are delivered asynchronously to the configured leg event endpoint (grpc) each action emits one or more action specific events (listed in child pages)
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.
