Skip to content

Page messages oldest or newest first

PubNio API inbox.messages.list: page messages oldest or newest first. Request fields, examples in five clients, errors, and idempotency.

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: InboxMessageList with data, 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 newest
async () => {
  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 nextCursor back as cursor. See Pagination.

Type to search…

↑↓ navigate↵ selectEsc close