/v1/client/inbox/markAuthMark inbox items
Marks up to 100 items (`ids`), or every item up to and including `before_id` ("mark all as read"), as `seen`, `read`, `unread`, `archived` or `unarchived`, and returns the new counts. Marking `read` also marks seen. Open streams get `item.updated` and `counts`. Safe to repeat: items already in that state do not change.
Request body
action*objectWhat to mark the items as.
idsarrayThe items (at most 100). Give `ids` or `before_id`, not both.
before_idstring · uuidEvery item up to and including this one (item ids sort by time): "mark all as read" for what the user has loaded. Give `ids` or `before_id`, not both.
Response · 200 How many items changed, and the counts after.
updated*integerItems that changed (an item already in that state is not counted).
counts*objectThe counts after the change.
Example
Request
POST https://api.notify.productcraft.co/v1/client/inbox/mark
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"action": {},
"ids": [
"00000000-0000-0000-0000-000000000000"
],
"before_id": "00000000-0000-0000-0000-000000000000"
}import { 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 markInboxResult = await notify.client({ token: "rt_example_recipient_token" }).inbox.mark({ action: "seen" });notify.client({ token }).inbox.mark(params, options?): Notify.MarkInboxResult
Response
{
"updated": 0,
"counts": {}
}