Skip to content

Count conversations with at least one unread inbound message

PubNio API inbox.unread.count: count conversations with at least one unread inbound message. Request fields, examples in five clients, errors, and idempotency.

Count conversations with at least one unread inbound message with GET /api/v1/inbox/unread-count. Requires an API key with the read scope or a signed-in workspace member.

Request

Parameter In Type Required
workspaceId query UUID Yes

Response

  • HTTP 200: InboxUnreadCount with unreadCount.

The OpenAPI document has each field’s type.

Examples

const unread = await workspace.inbox.unreadCount();
unread = workspace.inbox.count_unread()
curl "https://pubnio.com/api/v1/inbox/unread-count?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
pnio inbox unread-count
async () => {
  const response = await codemode.request({
    method: "GET",
    path: "/api/v1/inbox/unread-count",
    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

Type to search…

↑↓ navigate↵ selectEsc close