iotoms Docs

Mark all notifications as read

POST
/api/v1/notifications/read-all

Marks every unread notification for the signed-in user as read and returns how many were updated in updated.

How to use it

  1. Call it for the signed-in user; no body is needed.
  2. All of their unread notifications are marked read and the response says how many changed; List notifications then shows an unread count of 0.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when it worked, ERROR when it failed.

message*string

Short human-readable message describing the outcome, for example "Vendor created". Do not parse it.

data?|

Object with a single key, updated: the number of notifications that changed from unread to read.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/notifications/read-all'
Example Response
{  "status": "string",  "message": "string",  "data": {    "property1": 0,    "property2": 0  }}