iotoms Docs

Mark a notification as read

POST
/api/v1/notifications/{id}/read

Marks one of the signed-in user's notifications as read. Always returns success; the message says "Notification not found" when the ID does not belong to this user.

How to use it

  1. Take the notification id from List notifications.
  2. Mark it read; it then shows read: true with a readAt time and no longer counts towards unreadCount. Repeating the call changes nothing.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request worked, ERROR when it did not.

message*string

Short human-readable message describing the result, for logs or display; do not parse it.

data?

Always empty; the status and message confirm the action.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/notifications/497f6eca-6276-4993-bfeb-53cbbbba6f08/read'
Example Response
{  "status": "string",  "message": "string",  "data": null}