Bulk operations
const options = {
method: 'POST',
headers: {cookie: 'session=', 'Content-Type': 'application/json'},
body: JSON.stringify({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));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/notifications/inbox/bulk"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ],\n \"dryRun\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "session=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request POST \
--url https://api.example.com/v1/regions/global/notifications/inbox/bulk \
--header 'Content-Type: application/json' \
--cookie session= \
--data '
{
"ids": [
"<string>"
],
"dryRun": false
}
'import requests
url = "https://api.example.com/v1/regions/global/notifications/inbox/bulk"
payload = {
"ids": ["<string>"],
"dryRun": False
}
headers = {
"cookie": "session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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": {}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body",
"details": {
"fields": {
"name": "Name is required",
"slug": "Slug must be lowercase alphanumeric"
}
}
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2024-01-15T10:30:00Z"
}
}Inbox
Bulk operations
Execute bulk operations on notifications (mark_read, mark_unread, delete, archive)
POST
/
v1
/
regions
/
global
/
notifications
/
inbox
/
bulk
Bulk operations
const options = {
method: 'POST',
headers: {cookie: 'session=', 'Content-Type': 'application/json'},
body: JSON.stringify({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));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/notifications/inbox/bulk"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ],\n \"dryRun\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "session=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request POST \
--url https://api.example.com/v1/regions/global/notifications/inbox/bulk \
--header 'Content-Type: application/json' \
--cookie session= \
--data '
{
"ids": [
"<string>"
],
"dryRun": false
}
'import requests
url = "https://api.example.com/v1/regions/global/notifications/inbox/bulk"
payload = {
"ids": ["<string>"],
"dryRun": False
}
headers = {
"cookie": "session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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": {}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body",
"details": {
"fields": {
"name": "Name is required",
"slug": "Slug must be lowercase alphanumeric"
}
}
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2024-01-15T10:30:00Z"
}
}Authorizations
Session-based authentication via HTTP-only cookie
Body
application/json
Was this page helpful?