TeXML REST Commands

Update call

Update TeXML call. Please note that the keys present in the payload MUST BE formatted in CamelCase as specified in the example.

post/texml/Accounts/{account_sid}/Calls/{call_sid}

Request

  • Base URL: https://api.telnyx.com/v2
  • URL: https://api.telnyx.com/v2/texml/Accounts/{account_sid}/Calls/{call_sid}
  • Auth: HTTP bearer

Path parameters

call_sidstring required

The CallSid that identifies the call to update.

account_sidstring required
Example:f5586561-8ff0-4291-a51b-c7dfe4139ff9

The UUID of the Telnyx account that owns the resource, for example f5586561-8ff0-4291-a51b-c7dfe4139ff9. The account_sid path segment is kept for Twilio API compatibility, but the value is a Telnyx account UUID, not a Twilio AC... SID. It must match the account that owns the API key used to authenticate the request, otherwise the endpoint returns 404. The same value is sent as AccountSid in TeXML webhooks.

Request body application/x-www-form-urlencoded

Statusstring

The value to set the call status to. Setting the status to completed ends the call.

Urlstring

The URL where TeXML will make a request to retrieve a new set of TeXML instructions to continue the call flow.

Method'GET' | 'POST'

HTTP request type used for Url.

FallbackUrlstring

A failover URL for which Telnyx will retrieve the TeXML call instructions if the Url is not responding.

FallbackMethod'GET' | 'POST'

HTTP request type used for FallbackUrl.

StatusCallbackstring

URL destination for Telnyx to send status callback events to for the call.

StatusCallbackMethod'GET' | 'POST'

HTTP request type used for StatusCallback.

Texmlstring

TeXML to replace the current one with.

Example request

{
  "Status": "completed"
}

Response

Call resource.

account_sidstring

The id of the account the resource belongs to.

answered_by'human' | 'machine' | 'not_sure'

The value of the answering machine detection result, if this feature was enabled for the call.

caller_namestring

Caller ID, if present.

date_createdstring

The timestamp of when the resource was created.

date_updatedstring

The timestamp of when the resource was last updated.

direction'inbound' | 'outbound'

The direction of this call.

durationstring

The duration of this call, given in seconds.

end_timestring

The end time of this call.

fromstring

The phone number or SIP address that made this call.

from_formattedstring

The from number formatted for display.

pricestring

The price of this call, the currency is specified in the price_unit field. Only populated when the call cost feature is enabled for the account.

price_unitstring

The unit in which the price is given.

sidstring

The identifier of this call.

start_timestring

The start time of this call.

status'ringing' | 'in-progress' | 'canceled' | 'completed' | 'failed' | 'busy' | 'no-answer'

The status of this call.

tostring

The phone number or SIP address that received this call.

to_formattedstring

The to number formatted for display.

uristring

The relative URI for this call.

Example response

{
  "account_sid": "61bf923e-5e4d-4595-a110-56190ea18a1b",
  "answered_by": "human",
  "caller_name": "+13122010094",
  "date_created": "Thu, 15 Jun 2023 09:56:45 +0000",
  "date_updated": "Thu, 15 Jun 2023 09:56:56 +0000",
  "direction": "inbound",
  "duration": "11",
  "end_time": "Thu, 15 Jun 2023 09:56:56 +0000",
  "from": "+13123456789",
  "from_formatted": "(312) 345-6789",
  "sid": "v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA",
  "start_time": "Thu, 15 Jun 2023 09:56:45 +0000",
  "status": "completed",
  "to": "+13987654321",
  "to_formatted": "(398) 765-4321",
  "uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA.json"
}

Changes

No operation changes recorded.