Messages

List Messages

Lists the messages of a conversation, newest first. Supported on Bluesky, Instagram and Facebook.

GET
/v1/accounts/{id}/conversations/{conversationId}/messages

Authorization

Bearer
headerAuthorizationBearer <op_>

Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.

Path Parameters

id*string
Length1 <= length
conversationId*string

A conversation id from List Conversations, Create Conversation or an inbox webhook. It only works in the workspace that received it.

Length1 <= length <= 512

Query Parameters

limit?integer

Items per page. Defaults to 50. Maximum 100.

Range1 <= value <= 100
Default50
cursor?string

The nextCursor of the previous page. Omit it for the first page.

Length1 <= length

Response Body

Messages

application/json
  1. response
data*array<>
nextCursor*|

Cursor for the next page, or null on the last page.

hasMore*boolean

True when another page follows this one.

Example Request
import { Configuration, InboxApi } from "@onepostly/sdk";const inboxApi = new InboxApi(  new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await inboxApi.listMessages({  id: "acc_YOUR_INSTAGRAM_ACCOUNT_ID",  conversationId: "cnv_YOUR_CONVERSATION_ID",});console.log(response);
Example Response
{  "data": [    {      "id": "aWdfZAG1faXRlbToxOklHTWVzc2FnZAUlEOjE3ODQxNDAxMjM0NTY3ODk6MzQwMjgyMzY2ODQxNzEwMzAwOTQ5MTI4MTM2NDEyOTg3NjU0MzIxMDk4NzY1NDMy",      "conversationId": "cnv_YOUR_CONVERSATION_ID",      "text": "Do you ship to Canada?",      "senderId": "6873452198765432",      "sentAt": "2027-03-15T11:42:08.000Z",      "attachments": []    },    {      "id": "aWdfZAG1faXRlbToxOklHTWVzc2FnZAUlEOjE3ODQxNDAxMjM0NTY3ODk6MzQwMjgyMzY2ODQxNzEwMzAwOTQ5MTI4MTM2NDEyOTg3NjU0MzIxMDk4NzY1NDE5",      "conversationId": "cnv_YOUR_CONVERSATION_ID",      "text": "Yes, it is in stock in every size.",      "senderId": "17841401234567890",      "sentAt": "2027-03-15T11:40:02.000Z",      "attachments": []    },    {      "id": "aWdfZAG1faXRlbToxOklHTWVzc2FnZAUlEOjE3ODQxNDAxMjM0NTY3ODk6MzQwMjgyMzY2ODQxNzEwMzAwOTQ5MTI4MTM2NDEyOTg3NjU0MzIxMDk4NzY1NDA3",      "conversationId": "cnv_YOUR_CONVERSATION_ID",      "text": "Hi! Is this jacket still available?",      "senderId": "6873452198765432",      "sentAt": "2027-03-15T11:38:40.000Z",      "attachments": []    },    {      "id": "aWdfZAG1faXRlbToxOklHTWVzc2FnZAUlEOjE3ODQxNDAxMjM0NTY3ODk6MzQwMjgyMzY2ODQxNzEwMzAwOTQ5MTI4MTM2NDEyOTg3NjU0MzIxMDk4NzY1Mzk1",      "conversationId": "cnv_YOUR_CONVERSATION_ID",      "text": null,      "senderId": "6873452198765432",      "sentAt": "2027-03-15T11:38:15.000Z",      "attachments": [        {          "type": "image",          "url": "https://lookaside.fbsbx.com/ig_messaging_cdn/?asset_id=18043219876543210&signature=AbxQ3kLm9pRtYv2WcZ8sN1"        }      ]    }  ],  "nextCursor": null,  "hasMore": false}