Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

call_sid
string
required

The CallSid that identifies the call to update.

account_sid
string
required

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.

Example:

"f5586561-8ff0-4291-a51b-c7dfe4139ff9"

Body

application/x-www-form-urlencoded

Update Call request object

Status
string

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

Example:

"completed"

Url
string

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

Example:

"https://www.example.com/intruction-b.xml"

Method
enum<string>

HTTP request type used for Url.

Available options:
GET,
POST
Example:

"GET"

FallbackUrl
string

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

Example:

"https://www.example.com/intruction-c.xml"

FallbackMethod
enum<string>

HTTP request type used for FallbackUrl.

Available options:
GET,
POST
Example:

"GET"

StatusCallback
string

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

Example:

"https://www.example.com/callback"

StatusCallbackMethod
enum<string>

HTTP request type used for StatusCallback.

Available options:
GET,
POST
Example:

"GET"

Texml
string

TeXML to replace the current one with.

Example:

"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response><Say>Hello</Say></Response>"

Response

Call resource.

account_sid
string

The id of the account the resource belongs to.

Example:

"61bf923e-5e4d-4595-a110-56190ea18a1b"

answered_by
enum<string>

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

Available options:
human,
machine,
not_sure
Example:

"human"

caller_name
string

Caller ID, if present.

Example:

"CALLER"

date_created
string

The timestamp of when the resource was created.

Example:

"Thu, 15 Jun 2023 09:56:45 +0000"

date_updated
string

The timestamp of when the resource was last updated.

Example:

"Thu, 15 Jun 2023 09:56:45 +0000"

direction
enum<string>

The direction of this call.

Available options:
inbound,
outbound
Example:

"inbound"

duration
string

The duration of this call, given in seconds.

Example:

"12"

end_time
string

The end time of this call.

Example:

"Thu, 15 Jun 2023 09:56:45 +0000"

from
string

The phone number or SIP address that made this call.

Example:

"+13123456789"

from_formatted
string

The from number formatted for display.

Example:

"(312) 345-6789"

price
string

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.

Example:

"0.10"

price_unit
string

The unit in which the price is given.

Example:

"USD"

sid
string

The identifier of this call.

Example:

"v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA"

start_time
string

The start time of this call.

Example:

"Thu, 15 Jun 2023 09:56:45 +0000"

status
enum<string>

The status of this call.

Available options:
ringing,
in-progress,
canceled,
completed,
failed,
busy,
no-answer
Example:

"completed"

to
string

The phone number or SIP address that received this call.

Example:

"+13987654321"

to_formatted
string

The to number formatted for display.

Example:

"(398) 765-4321"

uri
string

The relative URI for this call.

Example:

"/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA.json"