Skip to main content

Stop a conversational AI agent

Use this endpoint to stop the specified Conversational AI agent instance.

API endpoint

  • Method: POST
  • Endpoint: https://api.agora.io/api/conversational-ai-agent/v2/projects/{appid}/agents/{agentId}/leave
  • Authorization: Basic Auth

Path parameters

ParameterTypeRequiredDescription
appidstringYesThe App ID of the project
agentIdstringYesThe agent instance ID you obtained after successfully calling join to start the conversational agent.

Request examples

Use one of the following request examples as a starting point:

Sample request:

curl --request post \
--url https://api.agora.io/api/conversational-ai-agent/v2/projects/:appid/agents/:agentid/leave \
--header 'Authorization: Basic <your_base64_encoded_credentials>'

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.

vundefined