Skip to main content

Retrieve call status

Retrieve call status

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

Use this endpoint to retrieve the call status and related information of a specified agent.

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.

Response

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

    Response Body
    • to_number string

      The number called.

    • from_number string

      Caller ID.

    • pipeline_id string

      The unique ID of a published project in AI Studio. Can be obtained in AI Studio - Project - Release Management.

    • type string

      Possible values: inbound, outbound

      Call type:

      • inbound: Inbound call.
      • outbound: Outbound call.
    • agent_id string

      A unique identifier for the call session.

    • channel string

      RTC channel name.

    • reason string

      Possible values: request, hangup, failed

      Reason for call ending:

      • request: Actively hung up.
      • hangup: The other party hung up.
      • failed: Call failed.
    • create_ts integer

      Call creation timestamp (in seconds).

    • state string

      Possible values: answered, hangup

      Call status:

      • answered: The call was answered.
      • hangup: The call was disconnected.
    • stop_ts integer

      Call end timestamp (in seconds). Returns 0 or null if the call has not ended.

  • 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


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

Response example


_12
{
_12
"to_number": "1300000000",
_12
"from_number": "1330000000",
_12
"pipeline_id": "28",
_12
"type": "inbound",
_12
"agent_id": "A42AA22AT45xxxxxxRH76AM92W",
_12
"channel": "channel_1111",
_12
"reason": "request",
_12
"create_ts": 1758498988,
_12
"state": "hangup",
_12
"stop_ts": 1758498995
_12
}