TeXML REST Commands

Create a connection-scoped TeXML call

Initiate an outbound TeXML call using a TeXML application connection ID, not an account SID. Request parameter names are case-sensitive. From and To are required; Texml supplies inline instructions and Url overrides the application XML request URL. When neither is supplied, the application configuration supplies the instructions. The response is a flat call object without a data wrapper.

post/texml/calls/{connection_id}

Path parameters

connection_idstring required

The ID of the connection holding the TeXML application to call from.

Request body

Fromstring required

The E.164-formatted phone number or SIP URI to present as the caller.

Tostring required

The E.164-formatted phone number or SIP URI to call.

Texmlstring

Inline TeXML instructions to execute when the call is answered.

Urlstring

The URL from which to retrieve TeXML instructions. Overrides the TeXML application XML request URL.

Method'GET' | 'POST'

HTTP method used to retrieve TeXML instructions from Url.

Example request

{
  "From": "+13120001234",
  "To": "+13121230000",
  "Texml": "<Response><Say>Hello</Say></Response>",
  "Url": "https://example.com/instructions.xml",
  "Method": "POST"
}

Response

The outbound call was queued.

call_sidstring required

The call control ID of the created call.

fromstring required

The caller address.

tostring required

The called address.

status'queued' required

The initial status of the outbound call.

Example response

{
  "call_sid": "v3:call-control-id",
  "from": "+13120001234",
  "to": "+13121230000",
  "status": "queued"
}

Changes

Changed in 1 of the 99 revisions of this API.1

Of the 99 revisions, 1 has no diff computed.