Docs·Notifications

POST/api/v1/spreelytics/notifications/read

Mark 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

PropInTypeNotes
contactListIdquerystringThe audience id, a UUID. With an audience key it must be that key's own audience.

Request body

PropTypeNotes
ids?string[]Optional. The ids of the notifications to mark read. Leave it out to mark them all.

Response

PropTypeNotes
updatednumberHow 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
}

See your own numbers today.

Free up to 100k events a month · no credit card

Contact

Tell us what you need.

A real person reads these. We usually reply within one working day.

Or email us directly at contact@spreelytics.com.