Skip to main content
GET
/
v2
/
agents
/
{agent_id}
/
convos
/
export
cURL
curl --request GET \
  --url https://eu-vg-edge.moeaymandev.workers.dev/v2/agents/{agent_id}/convos/export \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "message": "Agent conversations exported successfully",
  "data": [
    {
      "metadata": {
        "ID": "<string>",
        "userID": "<string>",
        "userName": "<string>",
        "userEmail": "[email protected]",
        "userImage": "<string>",
        "userPhone": "<string>",
        "userBrowser": "<string>",
        "userProfilePic": "<string>",
        "origin": "web-chat",
        "messagesNum": 123,
        "interactionsNum": 123,
        "ts": 123,
        "tags": [
          "<string>"
        ],
        "convoTimeSeconds": 123,
        "firstMessageTS": 123,
        "lastMessageTS": 123,
        "userPlatform": "<string>",
        "state": "requested_chat",
        "chatAssignedTo": "<string>",
        "lastModified": 123,
        "sessionsNum": 123
      },
      "turns": [
        {
          "from": "human",
          "messages": [
            {
              "type": "launch",
              "payload": {},
              "ts": "<string>"
            }
          ]
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Agent/Workspace secret API key as bearer token.

Path Parameters

agent_id
string
required

The ID of the agent to export its conversations

Query Parameters

page
integer<int32>

Page of the results to return, default is 1, query per page is 20

convo_ids
string

The ids of the conversations to export (comma separated)

Example:

test_id_1,test_id_2,test_id_3

Response

Agent conversations exported

success
boolean
Example:

true

message
string
Example:

"Agent conversations exported successfully"

data
object[]

Array of conversations objects