Messages
Get Conversation
Supported on Bluesky, Instagram and Facebook.
GET
Bearerheader
AuthorizationBearer <op_>Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.
id*stringLength
1 <= lengthconversationId*stringA conversation id from List Conversations, Create Conversation or an inbox webhook. It only works in the workspace that received it.
Length
1 <= length <= 512Conversation
application/json- response
id*stringA conversation id from List Conversations, Create Conversation or an inbox webhook.
accountId*stringmembers*array<>The people in the conversation.
muted*booleanBluesky: true when the account muted the conversation. Always false on Instagram and Facebook.
unreadCount*integerMessages the account has not read yet. 0 when the platform does not report it.
lastMessage*|The newest message. Null when the platform does not include it in the list.
Example Request
import { Configuration, InboxApi } from "@onepostly/sdk";const inboxApi = new InboxApi( new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await inboxApi.getConversation({ id: "acc_YOUR_BLUESKY_ACCOUNT_ID", conversationId: "cnv_HEjYFMpANOkmDhP6W8cF57AbClWN8VKQgwy7yAKwY6vYtBIXoNSC44JrQldArbYX7qJPs",});console.log(response);Example Response
{ "id": "cnv_HEjYFMpANOkmDhP6W8cF57AbClWN8VKQgwy7yAKwY6vYtBIXoNSC44JrQldArbYX7qJPs", "accountId": "acc_YOUR_BLUESKY_ACCOUNT_ID", "members": [ { "id": "did:plc:4kq7n2xhv3wbzmd5ltc6jy2e", "username": "yourbrand.bsky.social", "displayName": "Your Brand" }, { "id": "did:plc:r2vx6hzk3m7nqa4yc5dwtb8j", "username": "alice.bsky.social", "displayName": "Alice" } ], "muted": false, "unreadCount": 1, "lastMessage": { "id": "3lkr4w2m7xs2c", "text": "Hey, loved your latest post!", "sentAt": "2027-03-15T15:20:41.000Z" }}