Skip to main content
POST
/
v1
/
regions
/
global
/
notifications
/
inbox
/
bulk
Bulk operations
const options = {
  method: 'POST',
  headers: {cookie: 'session=', 'Content-Type': 'application/json'},
  body: JSON.stringify({action: 'mark_read', ids: ['<string>'], dryRun: false})
};

fetch('https://api.example.com/v1/regions/global/notifications/inbox/bulk', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "data": {
    "action": "<string>",
    "requested": 123,
    "succeeded": 123,
    "failed": 123,
    "dryRun": true,
    "wouldAffect": 123,
    "preview": [
      {
        "id": "<string>",
        "category": "system",
        "priority": "low",
        "title": "<string>",
        "message": "<string>",
        "read": true,
        "createdAt": "2023-11-07T05:31:56Z",
        "resourceType": "<string>",
        "resourceId": "<string>",
        "actionUrl": "<string>",
        "clickActionUrl": "<string>",
        "primaryActionLabel": "<string>",
        "primaryActionUrl": "<string>",
        "secondaryActionLabel": "<string>",
        "secondaryActionUrl": "<string>",
        "readAt": "2023-11-07T05:31:56Z"
      }
    ],
    "results": [
      {
        "id": "<string>",
        "status": "success",
        "error": {}
      }
    ]
  },
  "meta": {}
}

Authorizations

session
string
cookie
required

Session-based authentication via HTTP-only cookie

Body

application/json
action
enum<string>
required

Action to perform

Available options:
mark_read,
mark_unread,
delete,
archive
ids
string[]
required

Notification IDs

Required array length: 1 - 1000 elements
dryRun
boolean
default:false

Preview mode

Response

Bulk operation results (Multi-Status)

success
enum<boolean>
Available options:
true
data
object
meta
object