import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.calls.actions.enqueue('call_control_id', { queue_name: 'support' });
console.log(response.data);{
"data": {
"result": "ok"
}
}Put the call in a queue.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.calls.actions.enqueue('call_control_id', { queue_name: 'support' });
console.log(response.data);{
"data": {
"result": "ok"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique identifier and token for controlling the call
Enqueue call request
The name of the queue the call should be put in. If a queue with a given name doesn't exist yet it will be created.
"tier_1_support"
Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.
"aGF2ZSBhIG5pY2UgZGF5ID1d"
Use this field to avoid duplicate commands. Telnyx will ignore any command with the same command_id for the same call_control_id.
"891510ac-f3e4-11e8-af5b-de00688a4901"
The number of seconds after which the call will be removed from the queue.
600
The maximum number of calls allowed in the queue at a given time. Can't be modified for an existing queue.
200
If set to true, the call will remain in the queue after hangup. In this case bridging to such call will fail with necessary information needed to re-establish the call.
true
Was this page helpful?