Skip to main content

Hang-up a call

Hang-up a call

POST
https://api.agora.io/api/conversational-ai-agent/v2/projects/{appid}/calls/{agent_id}/hangup

Use this endpoint to instruct the agent to proactively hang up an ongoing call and leave the RTC channel.

Request

Path parameters

appid stringrequired

The App ID of the project.

agent_id stringrequired

The agent ID you obtained after successfully calling the API to Initiate an outbound call.

Request body

APPLICATION/JSON

The request body is empty.

Response

  • If the returned status code is 200, the request was successful. The response body is empty.

  • If the returned status code is not 200, the request failed. The response body includes the error code and description. Refer to status codes to understand the possible reasons for failure.

    Error Response
    • error_type string

      The type of error that occurred.

    • description string

      A detailed description of the error.

Authorization

This endpoint requires Basic Auth.

Request example


_4
curl --request post \
_4
--url https://api.agora.io/api/conversational-ai-agent/v2/projects/:appid/calls/:agent_id/hangup \
_4
--header 'Authorization: Basic <credentials>' \
_4
--data '{}'

Response example


_1
{}