Skip to main content
PUT
/
calls
/
{call_control_id}
/
actions
/
client_state_update
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.calls.actions.updateClientState('call_control_id', {
  client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d',
});

console.log(response.data);
{
  "data": {
    "result": "ok"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

call_control_id
string
required

Unique identifier and token for controlling the call

Body

application/json

Updates client state for every subsequent webhook

client_state
string
required

Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.

Example:

"aGF2ZSBhIG5pY2UgZGF5ID1d"

Response

Successful response upon making a call control command.

data
Call Control Command Result · object
Example:
{ "result": "ok" }