Skip to content

Mark read or archive a conversation

PubNio API inbox.conversations.update: mark read or archive a conversation. Request fields, examples in five clients, errors, and idempotency.

Mark read or archive a conversation with PATCH /api/v1/inbox/conversations/{conversationId}. Requires an API key with the read scope or a signed-in workspace member.

Request

Local, workspace-shared, and idempotent. The provider is not called.

Parameter In Type Required
conversationId path UUID Yes
workspaceId query UUID Yes
Body field Type Required
status "active", "archived" No
read boolean No

Response

  • HTTP 200: InboxConversation with id, workspaceId, accountId, provider, participant, folder, status, unreadCount, lastMessageAt, lastInboundAt, lastOutboundAt, lastMessagePreview, providerUrl, lastReadAt, archivedAt, replyWindow, freshness, createdAt.
    • provider: bluesky, facebook, instagram, linkedin, pinterest, reddit, snapchat, tiktok, threads, x, youtube, google_business, meta_ads, google_ads, reddit_ads, pinterest_ads, tiktok_ads, linkedin_ads, snapchat_ads, amazon_ads, openai_ads
    • folder: inbox, message_request, spam, other
    • status: active, archived

The OpenAPI document has each field’s type.

Examples

const conversation = await workspace.inbox.updateConversation(conversationId, {
  read: true,
});
conversation = workspace.inbox.update_conversation(conversation_id, read=True)
curl -X PATCH "https://pubnio.com/api/v1/inbox/conversations/$CONVERSATION_ID?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"read":true}'
pnio inbox conversations update "$CONVERSATION_ID" --read
async () => {
  const conversationId = "<conversationId>";
  const response = await codemode.request({
    method: "PATCH",
    path: `/api/v1/inbox/conversations/${conversationId}`,
    query: { workspaceId: codemode.workspaceId },
    body: { read: true },
  });
  return response.data;
};

Errors

It declares no problem of its own.

It declares the problems every Inbox operation and most operations declare.

Idempotency

No key, so a retried PATCH is not deduplicated. Read the current state before you retry.

Limits

Type to search…

↑↓ navigate↵ selectEsc close