Documentation Index
Fetch the complete documentation index at: https://docs.topyappers.com/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/v1/agent/messages
Returns saved agent email messages. Use this endpoint to retrieve the full conversation history for a creator email or Gmail thread before writing a customized reply.
Query parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Filter to one agent project. |
creatorEmail / email | string | Case-insensitive exact creator email match. |
creatorEmailContains | string | Case-insensitive partial creator email match. Ignored when creatorEmail is present. |
creatorId | string | Filter by creator ID. |
threadId | string | Filter by Gmail thread ID. |
gmailAccountId | string | Filter by connected Gmail account ID. |
direction | string | all, outbound, or inbound. Default: all. Use outbound to list messages sent by the agent. |
status | string | Filter by stored message status, such as sent, received, replied, or failed. |
isFollowUp | boolean | Filter follow-up emails. |
page | integer | Page number. Default: 1. |
perPage | integer | Results per page. Default: 50, maximum: 100. |
Response fields
Each item inresponse.data includes:
| Field | Description |
|---|---|
id | Message record ID. |
project_id, conversation_id | Agent project and conversation IDs. |
gmail_account_id, sender_email | Connected Gmail account context. |
direction | outbound for agent-sent messages, inbound for creator replies. |
creator_id, creator_name, creator_email, creator_platform | Creator context saved with the message. |
subject, body, body_preview | Plain-text message content. HTML is converted to readable text when no plain body is saved. |
status | Stored message status. |
sent_at, replied_at, failed_at, date_created, date_updated | ISO timestamp fields. |
thread_id, message_id, parent_message_id | Gmail thread and message identifiers. |
is_follow_up, follow_up_number | Follow-up metadata. |
metadata | Extra transport or workflow metadata. |
