Last updated 1 year ago
Was this helpful?
Hangup call command can be used in two situation:
Hangup an ongoing call.
ongoing
Reject an inbound call that is starting or ringing
starting
ringing
type: object title: HangupCalls additionalProperties: false properties: cause: type: "string" enum: - rejected - busy
curl -X POST "https://nest.messagebird.one/workspaces/8bc02f53-87ac-48d2-b4fd-c2cf856a305f/channels/880d8171-cbab-47bb-81b6-b1a0902da136/calls/4fc2edf7-68f5-437a-89eb-3ce0095409d6 /hangup" \ -H 'Authorization: Bearer {Token}'
// N/A
{ "id": "db35bd0e-b5ed-4a6a-a01f-e12c2489059a", "callId": "c47724eb-978c-46a4-96f7-fbb061ba969a", "command": "hangup", "status": "accepted" }
Hangup a channel call
The ID of the workspace
The ID for a call
The ID for a channel
rejected
busy
curl -L \ --request POST \ --url '/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/hangup' \ --header 'Authorization: Bearer jwt' \ --header 'Content-Type: application/json' \ --data '{ "cause": "rejected" }'
{ "id": "123e4567-e89b-12d3-a456-426614174000", "callId": "123e4567-e89b-12d3-a456-426614174000", "callFlowId": "123e4567-e89b-12d3-a456-426614174000", "status": "text", "command": "text", "conditions": [ { "variable": "keys", "operator": "eq", "value": "text" } ] }