v1

latestOpenAPI 3.0.32026-07-24106305257.4 KB
Chats Export

Create chat logs

Create a chat log export for agent_id containing all of the Agent's chats.

Use the export_id in the GET chat logs endpoint to get the result of the create chat logs request (zipped JSON files).

(The chat log export will be deleted from the database after 7 days from the export creation date)

post/agents/chats/exports

Request body

agent_idstring required

The id of the agent that the export will run for

fromstring

The start of the time range for the export. If not provided, the export will start from the beginning of the agent's data

tostring

The end of the time range for the export. If not provided, the export will run until the current time

persistent_chatsboolean

Determines if the export should fetch persistent chats. Defaults to true.

tokenstring

Pagination - used to continue the creation of the chat log using this same endpoint

Example request

{
  "from": "2024-05-15T12:00:00Z",
  "to": "2024-05-15T12:00:00Z"
}

Response

OK

export_idstring required