Ir al contenido

List Messages

Ver como Markdown
GET
/public/v1/conversations/{conversation_id}/messages
curl --request GET \
--url 'https://api.nuntius.chat/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

conversation_id
required
Conversation Id
string format: uuid
cursor
Any of:
string
limit
Limit
integer
default: 50 >= 1 <= 200

Successful Response

Media typeapplication/json
PublicMessagesResponse

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
items
required
Items
Array<object>
PublicMessageOut

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).

object
id
required
Id
string
conversationId
required
Conversationid
string
role
required
Role
string
content
required
Content
string
deliveryStatus
Any of:
string
createdAt
required
Createdat
string
pagination
required
CursorPaginationMeta

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.

object
nextCursor
required
Any of:
string
prevCursor
required
Any of:
string
hasMore
required
Hasmore
boolean

Examplegenerated

{
"items": [
{
"id": "example",
"conversationId": "example",
"role": "example",
"content": "example",
"deliveryStatus": "example",
"createdAt": "example"
}
],
"pagination": {
"nextCursor": "example",
"prevCursor": "example",
"hasMore": true
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Examplegenerated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}