List Messages
const url = 'https://api.aymaragents.com/public/v1/conversations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages?limit=50';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.aymaragents.com/public/v1/conversations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages?limit=50' \ --header 'X-API-Key: <X-API-Key>'Cursor-paginated page of a conversation’s messages – SAME codec as the internal GET /inbox/conversations/{id}/messages (PAGIN-1 Lote 0, SPEC_API_PUBLICA.md §2.3): newest window
first, older pages via pagination.nextCursor.
Foreign/unknown conversationId -> 404, resolved BEFORE the cursor is even parsed (same
guard order as the internal endpoint).
Permiso necesario: tenant:conversations.read
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Path Parameters
Sección titulada «Path Parameters»Query Parameters
Sección titulada «Query Parameters»Responses
Sección titulada «Responses»Successful Response
GET /public/v1/conversations/{id}/messages response envelope – SAME cursor codec as
the internal GET /inbox/conversations/{id}/messages (SPEC_API_PUBLICA.md §2.3).
object
A single message, curated subset of the internal InboxMessageOut.
role is the RAW Message.role domain value ('user'/'assistant'/'operator'/
'system') – never the internal _map_role UI relabeling ('user' -> 'customer'):
same reasoning as PublicConversationOut.status above. Drops authorName (an operator’s
display name, Platform-only presentation) and attachments (ADJ-4/ADJ-13, out of scope for
this endpoint – SPEC_API_PUBLICA.md §2.3 names no attachment capability for the public
surface; a real caller can still read attachment-bearing message text/metadata via
content).
12-api-contract.md §3.2 cursor-based pagination metadata, verbatim shape.
next_cursor is None once the feed’s start (oldest end) is reached — a HONEST
exhaustion signal, never a stale/offset-disguised value (contrast with the
leads/customers/tickets next_cursor=str(offset+limit) pattern
invest-pagin.md §3 flags as dishonest). prev_cursor stays None on every endpoint
of THIS lote: none of them implement direction=after yet (only before — see
GET /inbox/conversations/{id}/messages), so there is nothing honest to put there.
Examplegenerated
{ "items": [ { "id": "example", "conversationId": "example", "role": "example", "content": "example", "deliveryStatus": "example", "createdAt": "example" } ], "pagination": { "nextCursor": "example", "prevCursor": "example", "hasMore": true }}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}