import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const call = await client.texml.calls.update('call_sid');
console.log(call.data);{
"data": {
"sid": "c46e06d7-b78f-4b13-96b6-c576af9640ff",
"status": "accepted"
}
}Update TeXML call. Please note that the keys present in the payload MUST BE formatted in CamelCase as specified in the example.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const call = await client.texml.calls.update('call_sid');
console.log(call.data);{
"data": {
"sid": "c46e06d7-b78f-4b13-96b6-c576af9640ff",
"status": "accepted"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The CallSid that identifies the call to update.
Update Call request object
The value to set the call status to. Setting the status to completed ends the call.
"completed"
The URL where TeXML will make a request to retrieve a new set of TeXML instructions to continue the call flow.
"https://www.example.com/intruction-b.xml"
HTTP request type used for Url.
GET, POST "GET"
A failover URL for which Telnyx will retrieve the TeXML call instructions if the Url is not responding.
"https://www.example.com/intruction-c.xml"
HTTP request type used for FallbackUrl.
GET, POST "GET"
URL destination for Telnyx to send status callback events to for the call.
"https://www.example.com/callback"
HTTP request type used for StatusCallback.
GET, POST "GET"
TeXML to replace the current one with.
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response><Say>Hello</Say></Response>"
Successful response upon updating a TeXML call.
Was this page helpful?