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.
List
/api/v1/notifications
Scope: Scalar360.notifications.READ
| Parameter | In | Type | Required |
|---|---|---|---|
limit | query | integer (default 30) | No |
before | query | string (date-time) | No |
beforeId | query | string (uuid) | No |
unread | query | boolean (default false) | No |
curl -X GET "https://api.scalar360.com/api/v1/notifications" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"Dismiss all
/api/v1/notifications
Scope: Scalar360.notifications.DELETE
curl -X DELETE "https://api.scalar360.com/api/v1/notifications" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"Dismiss
/api/v1/notifications/{id}
Scope: Scalar360.notifications.DELETE
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
curl -X DELETE "https://api.scalar360.com/api/v1/notifications/{id}" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"Mark read
/api/v1/notifications/{id}/read
Scope: Scalar360.notifications.UPDATE
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
curl -X PATCH "https://api.scalar360.com/api/v1/notifications/{id}/read" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"Page
/api/v1/notifications/page
Scope: Scalar360.notifications.READ
| Parameter | In | Type | Required |
|---|---|---|---|
limit | query | integer (default 30) | No |
before | query | string (date-time) | No |
beforeId | query | string (uuid) | No |
unread | query | boolean (default false) | No |
curl -X GET "https://api.scalar360.com/api/v1/notifications/page" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"Preferences
/api/v1/notifications/preferences
Scope: Scalar360.notifications.READ
curl -X GET "https://api.scalar360.com/api/v1/notifications/preferences" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"Update preferences
/api/v1/notifications/preferences
Scope: Scalar360.notifications.UPDATE
| Body field | Type | Required | Notes |
|---|---|---|---|
preferences | map of object | Yes | required |
curl -X PUT "https://api.scalar360.com/api/v1/notifications/preferences" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"preferences":{}}'Subscribe push
/api/v1/notifications/push/subscribe
Scope: Scalar360.notifications.CREATE
| Body field | Type | Required | Notes |
|---|---|---|---|
endpoint | string | Yes | required, not blank |
keys | object | Yes | required |
keys.p256dh | string | Yes | required, not blank |
keys.auth | string | Yes | required, not blank |
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"}}'Unsubscribe push
/api/v1/notifications/push/unsubscribe
Scope: Scalar360.notifications.CREATE
| Body field | Type | Required | Notes |
|---|---|---|---|
endpoint | string | Yes | required, not blank |
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"}'Vapid public key
/api/v1/notifications/push/vapid-public-key
Scope: Scalar360.notifications.READ
curl -X GET "https://api.scalar360.com/api/v1/notifications/push/vapid-public-key" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"Mark all read
/api/v1/notifications/read-all
Scope: Scalar360.notifications.CREATE
curl -X POST "https://api.scalar360.com/api/v1/notifications/read-all" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"Unread count
/api/v1/notifications/unread-count
Scope: Scalar360.notifications.READ
curl -X GET "https://api.scalar360.com/api/v1/notifications/unread-count" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"