Call control
Programmable human calling: dial, read, and command browser + PSTN call legs by controlId.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
{
"call": {
"id": "string",
"direction": "inbound",
"status": "initiating",
"answeredAt": "2019-08-24T14:15:22Z",
"endedAt": "2019-08-24T14:15:22Z",
"endReason": "string",
"legs": [
{
"id": "string",
"controlId": "string",
"callId": "string",
"kind": "browser",
"direction": "inbound",
"status": "initiating",
"brokerId": "string",
"phoneNumber": "string",
"muted": true,
"onHold": true,
"answeredAt": "2019-08-24T14:15:22Z",
"endedAt": "2019-08-24T14:15:22Z",
"endReason": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
],
"createdAt": "2019-08-24T14:15:22Z"
},
"join": {
"token": "string",
"url": "string",
"identity": "string",
"roomName": "string",
"expiresAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Invalid request body",
"code": "VALIDATION_ERROR"
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "human calling is not enabled for this organization",
"code": "HUMAN_CALLING_DISABLED"
}Authorization
bearerAuth In: header
Query Parameters
"initiating" | "ringing" | "active" | "ended" | "declined" | "missed" | "cancelled" | "failed""inbound" | "outbound" | "internal"Calls with a browser leg owned by this broker.
1 <= value <= 200Response Body
application/json
application/json
application/json
application/json
{
"calls": [
{
"id": "string",
"direction": "inbound",
"status": "initiating",
"answeredAt": "2019-08-24T14:15:22Z",
"endedAt": "2019-08-24T14:15:22Z",
"endReason": "string",
"legs": [
{
"id": "string",
"controlId": "string",
"callId": "string",
"kind": "browser",
"direction": "inbound",
"status": "initiating",
"brokerId": "string",
"phoneNumber": "string",
"muted": true,
"onHold": true,
"answeredAt": "2019-08-24T14:15:22Z",
"endedAt": "2019-08-24T14:15:22Z",
"endReason": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
],
"createdAt": "2019-08-24T14:15:22Z"
}
]
}{
"error": "Invalid request body",
"code": "VALIDATION_ERROR"
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "human calling is not enabled for this organization",
"code": "HUMAN_CALLING_DISABLED"
}Authorization
bearerAuth In: header
Path Parameters
Call id.
Response Body
application/json
application/json
application/json
application/json
{
"id": "string",
"direction": "inbound",
"status": "initiating",
"answeredAt": "2019-08-24T14:15:22Z",
"endedAt": "2019-08-24T14:15:22Z",
"endReason": "string",
"legs": [
{
"id": "string",
"controlId": "string",
"callId": "string",
"kind": "browser",
"direction": "inbound",
"status": "initiating",
"brokerId": "string",
"phoneNumber": "string",
"muted": true,
"onHold": true,
"answeredAt": "2019-08-24T14:15:22Z",
"endedAt": "2019-08-24T14:15:22Z",
"endReason": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
],
"createdAt": "2019-08-24T14:15:22Z"
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "not found",
"code": "NOT_FOUND"
}{
"error": "human calling is not enabled for this organization",
"code": "HUMAN_CALLING_DISABLED"
}Authorization
bearerAuth In: header
Path Parameters
Call id.
Response Body
application/json
application/json
application/json
application/json
{
"events": [
{
"id": "string",
"type": "call.initiated",
"callId": "string",
"controlId": "string",
"payload": {},
"occurredAt": "2019-08-24T14:15:22Z"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "not found",
"code": "NOT_FOUND"
}{
"error": "human calling is not enabled for this organization",
"code": "HUMAN_CALLING_DISABLED"
}Authorization
bearerAuth In: header
Path Parameters
Leg control id — the opaque command handle returned on every leg (the Telnyx call_control_id equivalent).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
{
"token": "string",
"url": "string",
"identity": "string",
"roomName": "string",
"expiresAt": "2019-08-24T14:15:22Z"
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "not found",
"code": "NOT_FOUND"
}{
"error": "human calling is not enabled for this organization",
"code": "HUMAN_CALLING_DISABLED"
}Authorization
bearerAuth In: header
Path Parameters
Leg control id — the opaque command handle returned on every leg (the Telnyx call_control_id equivalent).
"answer" | "hangup" | "bridge" | "hold" | "unhold" | "mute" | "unmute" | "dtmf" | "transfer"Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
{
"leg": {
"id": "string",
"controlId": "string",
"callId": "string",
"kind": "browser",
"direction": "inbound",
"status": "initiating",
"brokerId": "string",
"phoneNumber": "string",
"muted": true,
"onHold": true,
"answeredAt": "2019-08-24T14:15:22Z",
"endedAt": "2019-08-24T14:15:22Z",
"endReason": "string",
"createdAt": "2019-08-24T14:15:22Z"
},
"noop": true
}{
"error": "DTMF is only meaningful towards a PSTN leg",
"code": "UNSUPPORTED_COMMAND"
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "not found",
"code": "NOT_FOUND"
}{
"error": "leg is not live",
"code": "LEG_NOT_LIVE"
}{
"error": "human calling is not enabled for this organization",
"code": "HUMAN_CALLING_DISABLED"
}