For AI agents: markdown of this page — /docs-content-en/notifications/read.md documentation index — /llms.txt

Mark as read

POST /v1/notifications/read

Marks the recipient's notifications as read or unread. By default it marks the notification with the given id and all with a greater identifier.

Request fields (body)

Field Type Required Description
id number no Notification identifier from the POST /v1/notifications response. This notification and all with a greater id are marked. Without the id field the statuses do not change
action string no Y — mark as read, N — as unread. Defaults to Y
onlyCurrent boolean no true marks only the notification with the given id. Otherwise — all with an identifier not less than id

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/notifications/read" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "id": 37421, "onlyCurrent": true }'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/notifications/read" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "id": 37421, "onlyCurrent": true }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/notifications/read', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ id: 37421, onlyCurrent: true }),
})

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/notifications/read', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ id: 37421, onlyCurrent: true }),
})

Response fields

Field Type Description
success boolean true on success
data boolean Always true. The success indicator is the HTTP code 200, not the value

Response example

HTTP 200:

JSON
{
  "success": true,
  "data": true
}

Error response example

403 — no im scope:

JSON
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'im' scope"
  }
}

Errors

HTTP Code Description
403 SCOPE_DENIED The key lacks the im scope
401 TOKEN_MISSING The key has no configured tokens

Full list of common API errors — Errors.

Known specifics

  • A request body is required — send at least {}. Without the id field inside the body the request succeeds but notification statuses do not change. Pass id to actually mark notifications.

See also