Skip to main content
GET
/
v1
/
{account_id}
/
{project_id}
/
conversations
cURL
curl --request GET \
  --url https://api.us-1.platform.polyai.app/v1/{account_id}/{project_id}/conversations \
  --header 'x-api-key: <api-key>'
{
  "conversations": [
    {
      "id": "CAabcd1234567abcdef1250065d4fc7389",
      "account_id": "<string>",
      "project_id": "<string>",
      "environment": "<string>",
      "started_at": "2023-11-07T05:31:56Z",
      "channel": "<string>",
      "in_progress": true,
      "variant_id": "<string>",
      "variant_name": "<string>",
      "from_number": "<string>",
      "to_number": "<string>",
      "num_turns": 123,
      "total_duration": 123,
      "polyai_duration": 123,
      "handoff": true,
      "handoff_reason": "<string>",
      "handoff_destination": "<string>",
      "num_silences": 123,
      "num_ood": 123,
      "metrics": {
        "CALL_DURATION": "30",
        "CALL_TURN": [
          "2022-02-18T12:09:05.12677Z",
          "2022-02-18T12:09:17.90602Z",
          "2022-02-18T12:09:29.57732Z",
          "2022-02-18T12:09:35.36996Z"
        ]
      },
      "state": {},
      "turns": [
        {
          "user_input": "<string>",
          "user_input_dtmf": "<string>",
          "user_input_datetime": "2023-11-07T05:31:56Z",
          "agent_response": "<string>",
          "agent_response_datetime": "2023-11-07T05:31:56Z",
          "latency": 123,
          "translated_user_input": "<string>",
          "english_agent_response": "<string>",
          "intents": [
            "<string>"
          ],
          "entities": [
            {}
          ],
          "is_ood": true,
          "is_silence": true
        }
      ]
    }
  ],
  "descriptions": {
    "conversations": {}
  },
  "next_offset": 123
}

Authorizations

x-api-key
string
header
required

Path Parameters

account_id
string
required

Account ID.

project_id
string
required

Project ID.

Query Parameters

client_env
enum<string>
default:live

Client environment – sandbox, pre-release or live.

Available options:
sandbox,
pre-release,
live
start_time
string<date-time>

Start of the time range of the conversations to get, in ISO8601 format.

end_time
string<date-time>

End of the time range of the conversations to get, in ISO8601 format.

limit
integer
default:5

Max number of conversations to return per API call. If the result set is larger than this, it will be paginated.

Required range: 1 <= x <= 5000
offset
integer
default:0

Offset within the result set to fetch.

Required range: x >= 0
variant_id
string

Return all conversations under this variant_id. You may specify either variant_id or variant_name, not both.

variant_name
string

Return all conversations under this variant_name. You may specify either variant_id or variant_name. Encode spaces as "%20".

in_progress
boolean

If false, only return finished conversations. If true, only return conversations still in progress. If omitted, return all conversations.

Response

OK.

conversations
object[]

Array of conversations returned in ascending chronological order.

descriptions
object

Dictionary of response keys and their descriptions.

next_offset
integer

If present, the result is paginated. Pass this value as offset in the next request to fetch the next page.