Get Message History

Retrieves thread message analytics data as a streamed JSONL file. The response includes message history with input, output, and metadata for each message. - If the start date is not provided, returns all messages on and before the end date (UTC 23:59:59). - If the end date is not provided, returns all messages on and after the start date (UTC 00:00:00). - If both dates are not provided, returns all messages. The file is streamed as JSONL (JSON Lines) format with filename message_history_{current_timestamp}.jsonl See the [message history](/alfa-preview/analytics/message-history) documentation for more details.

Authentication

Authorizationstring

Enter your JWT Token here in the format: Bearer {token}, where the token is a Service Account Token

Query parameters

start_datedate or nullOptional

Start date (UTC 00:00:00 inclusive).

end_datedate or nullOptional

End date (UTC 23:59:59 inclusive).

Response

JSONL stream of message history. Each line is a JSON object with Input, Response, Message ID, Message Time, Thread ID, and User ID fields. <div style="border-left: 4px solid #FFC107; padding: 12px; margin: 16px 0; border-radius: 4px;"> <strong>Important:</strong> The 200 Response example displays sample JSON for a single line, but is not indicative of a valid JSONL file. A valid JSONL file contains multiple JSON objects separated by newlines. </div>
Inputstring
The user's input message.
Responsestring
The assistant's response message.
Message IDstring
Unique identifier for the message.
Message Timestring
ISO 8601 timestamp of the message.
Thread IDstring
Unique identifier for the thread.
User IDstring
Unique identifier for the user.

Errors