Docs·Notifications
POST
/api/v1/spreelytics/notifications/readMark notifications read
Marks notifications read, for everyone in the workspace. Send ids to mark those, or leave ids out to mark every notification in the audience read.
Every role can call it, Viewer included.
Keys: an account key. Getting started explains both kinds.
Parameters
| Prop | In | Type | Notes |
|---|---|---|---|
contactListId | query | string | The audience id, a UUID. With an audience key it must be that key's own audience. |
Request body
| Prop | Type | Notes |
|---|---|---|
ids? | string[] | Optional. The ids of the notifications to mark read. Leave it out to mark them all. |
Response
| Prop | Type | Notes |
|---|---|---|
updated | number | How many notifications went from unread to read. Ones that were already read are not counted. |
Request
curl -X POST 'https://app.spreelytics.com/api/v1/spreelytics/notifications/read?contactListId=…' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ … }'
const res = await fetch('https://app.spreelytics.com/api/v1/spreelytics/notifications/read', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ /* see Request body above */ }),
});
const data = await res.json();
import requests
res = requests.post(
"https://app.spreelytics.com/api/v1/spreelytics/notifications/read",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={}, # see Request body above
)
data = res.json()
Response
{
"updated": 0
}