Messages
List messages for this site. Rules:
- Always provide conversation_id when you have it - site-wide queries are slower and return less context.
- Use role=“user” to see only visitor/lead messages; role=“assistant” for bot replies.
- Default limit is 50 (max 100). Check pagination.has_more before paginating further.
- Stop paginating when has_more=false or when you have found the information you need - do NOT blindly paginate through hundreds of records.
- If you get an error, do NOT retry with a higher offset. Instead, try a narrower filter (e.g. add conversation_id or lead_id).
Input Schema
| Parameter | Type | Description |
|---|---|---|
| action | string | Action to perform (only “list” is supported). Enum: list |
| conversation_id | string | Preferred. Filter to a single conversation UUID. Omit only when you need site-wide results. |
| lead_id | string | Filter by lead UUID. |
| role | string | Filter by message role. Enum: user, assistant, system, team_member |
| interaction | string | Filter by interaction type (e.g. opened, clicked - for email tracking). |
| custom_data_status | string | Filter by custom_data.status (JSONB field). |
| limit | number | Max results per page. Default 50, max 100. |
| offset | number | Pagination offset. Only increment if has_more=true in the previous response. |
REST Endpoint
GET /api/agents/customerSupport/conversations/messagesAll parameters are passed as query string. site_id is required.
GET /api/agents/customerSupport/conversations/messages?site_id=YOUR_SITE_ID&conversation_id=CONVERSATION_UUID&limit=50
Authorization: Bearer YOUR_API_KEYResponse:
{
"success": true,
"data": {
"messages": [...],
"pagination": { "total": 120, "page": 1, "limit": 50, "pages": 3 }
}
}Last updated on