Page messages oldest or newest first with GET /api/v1/inbox/conversations/{conversationId}/messages. Requires an API key with the read scope or a signed-in workspace member.
Request
| Parameter | In | Type | Required |
|---|---|---|---|
conversationId |
path | UUID | Yes |
workspaceId |
query | UUID | Yes |
order |
query | "oldest", "newest" |
No |
cursor |
query | string | No |
limit |
query | string | No |
Response
- HTTP 200:
InboxMessageListwithdata,hasMore,nextCursor.
The OpenAPI document has each field’s type.
Examples
const messages = await workspace.inbox.messages(conversationId, {
order: "newest",
});messages = workspace.inbox.list_messages(conversation_id)curl "https://pubnio.com/api/v1/inbox/conversations/$CONVERSATION_ID/messages?workspaceId=$WORKSPACE_ID" \
-H "Authorization: Bearer $PUBNIO_API_KEY"pnio inbox messages list "$CONVERSATION_ID" --order newestasync () => {
const conversationId = "<conversationId>";
const response = await codemode.request({
method: "GET",
path: `/api/v1/inbox/conversations/${conversationId}/messages`,
query: { workspaceId: codemode.workspaceId },
});
return response.data;
};Errors
It declares no problem of its own.
It declares the problems every Inbox operation and most operations declare.
Idempotency
None needed: a read is safe to retry.
Limits
- Up to 100 items a page; pass
nextCursorback ascursor. See Pagination.