GET
/api/v1/public/threads/{thread_id}/historyGet Conversation History
Retrieve the complete conversation history for a thread. This includes all messages exchanged between you and the AI agent.
Request
curl -X GET \
"https://api.he2.ai/api/v1/public/threads/thread_456/history?project_id=proj_123" \
-H "X-API-Key: he-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Path Parameters
| Parameter | Type | Description |
|---|---|---|
thread_id | string (required) | The thread ID |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | string (required) | Project ID |
page | integer (optional) | Page number (default: 1) |
page_size | integer (optional) | Messages per page (1-1000, default: 100) |
include_file_content | boolean (optional) | Include file content (default: false) |
include_status_messages | boolean (optional) | Include status messages (default: false) |
compact | boolean (optional) | Return minimal fields (default: false) |
Response
200
{
"success": true,
"thread_id": "thread_456",
"messages": [
{
"message_id": "msg_1",
"role": "user",
"content": "Create a website",
"created_at": "2024-01-01T10:00:00Z"
},
{
"message_id": "msg_2",
"role": "assistant",
"content": "Here is your website...",
"created_at": "2024-01-01T10:00:30Z",
"has_code": true,
"has_files": true
}
],
"pagination": {
"current_page": 1,
"total_pages": 1,
"has_next": false
}
}