Developer docs menu

API reference / Notifications

Notifications API

12 endpoints. Scopes: Scalar360.notifications.READ, .CREATE, .UPDATE, .DELETE or .ALL. All calls need Authorization: Scalar360-oauthtoken <access_token> — see Authentication.

GET

List

/api/v1/notifications

Scope: Scalar360.notifications.READ

ParameterInTypeRequired
limitqueryinteger (default 30)No
beforequerystring (date-time)No
beforeIdquerystring (uuid)No
unreadqueryboolean (default false)No
Example request
curl -X GET "https://api.scalar360.com/api/v1/notifications" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
DELETE

Dismiss all

/api/v1/notifications

Scope: Scalar360.notifications.DELETE

Example request
curl -X DELETE "https://api.scalar360.com/api/v1/notifications" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
DELETE

Dismiss

/api/v1/notifications/{id}

Scope: Scalar360.notifications.DELETE

ParameterInTypeRequired
idpathstring (uuid)Yes
Example request
curl -X DELETE "https://api.scalar360.com/api/v1/notifications/{id}" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
PATCH

Mark read

/api/v1/notifications/{id}/read

Scope: Scalar360.notifications.UPDATE

ParameterInTypeRequired
idpathstring (uuid)Yes
Example request
curl -X PATCH "https://api.scalar360.com/api/v1/notifications/{id}/read" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
GET

Page

/api/v1/notifications/page

Scope: Scalar360.notifications.READ

ParameterInTypeRequired
limitqueryinteger (default 30)No
beforequerystring (date-time)No
beforeIdquerystring (uuid)No
unreadqueryboolean (default false)No
Example request
curl -X GET "https://api.scalar360.com/api/v1/notifications/page" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
GET

Preferences

/api/v1/notifications/preferences

Scope: Scalar360.notifications.READ

Example request
curl -X GET "https://api.scalar360.com/api/v1/notifications/preferences" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
PUT

Update preferences

/api/v1/notifications/preferences

Scope: Scalar360.notifications.UPDATE

Body fieldTypeRequiredNotes
preferencesmap of objectYesrequired
Example request
curl -X PUT "https://api.scalar360.com/api/v1/notifications/preferences" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"preferences":{}}'
POST

Subscribe push

/api/v1/notifications/push/subscribe

Scope: Scalar360.notifications.CREATE

Body fieldTypeRequiredNotes
endpointstringYesrequired, not blank
keysobjectYesrequired
keys.p256dhstringYesrequired, not blank
keys.authstringYesrequired, not blank
Example request
curl -X POST "https://api.scalar360.com/api/v1/notifications/push/subscribe" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"endpoint":"string","keys":{"p256dh":"string","auth":"string"}}'
POST

Unsubscribe push

/api/v1/notifications/push/unsubscribe

Scope: Scalar360.notifications.CREATE

Body fieldTypeRequiredNotes
endpointstringYesrequired, not blank
Example request
curl -X POST "https://api.scalar360.com/api/v1/notifications/push/unsubscribe" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"endpoint":"string"}'
GET

Vapid public key

/api/v1/notifications/push/vapid-public-key

Scope: Scalar360.notifications.READ

Example request
curl -X GET "https://api.scalar360.com/api/v1/notifications/push/vapid-public-key" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
POST

Mark all read

/api/v1/notifications/read-all

Scope: Scalar360.notifications.CREATE

Example request
curl -X POST "https://api.scalar360.com/api/v1/notifications/read-all" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"
GET

Unread count

/api/v1/notifications/unread-count

Scope: Scalar360.notifications.READ

Example request
curl -X GET "https://api.scalar360.com/api/v1/notifications/unread-count" \
  -H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"