/v1/client/inbox/countsAuthGet the inbox counts
Unseen and unread counts for the badge, cheap enough to poll every 30 seconds or more when the real-time stream is not available. Send the last `ETag` as `If-None-Match` to get `304` while nothing changed.
Headers
if-none-matchstringThe `ETag` of a previous response.
Response · 200 The counts (with an `ETag`).
unseen*integerItems not yet seen.
unread*integerItems not yet read.
Example
Request
GET https://api.notify.productcraft.co/v1/client/inbox/counts
Authorization: Bearer YOUR_TOKENimport { Notify } from "@productcraft/notify";
// Reads PRODUCTCRAFT_API_KEY and PRODUCTCRAFT_WORKSPACE_ID from the environment;
// client routes take a recipient token: notify.client({ token })
const notify = new Notify();
const inboxCounts = await notify.client({ token: "rt_example_recipient_token" }).inbox.counts();notify.client({ token }).inbox.counts(options?): Notify.InboxCounts
Response
{
"unseen": 0,
"unread": 0
}