Notifications
9 routes. Paths are relative to https://api.intersink.com/v1.
- GET/notificationsThe signed-in account's notifications, newest first
- PATCH/notifications/{id}/readMark as read
- POST/notifications/broadcastBroadcast
- GET/notifications/preferencesYour notification preferences: flat per-type push switches and `delivery: { <type>: { in_app, push, email } }` for like, comment, repost, donation, follow, campaign, connection, share, mention, group, event, listing and safety
- PATCH/notifications/preferencesChange preferences: flat `{ <type>: boolean }` (push) and/or `{ delivery: { <type>: { in_app?, push?, email? } } }`. Unknown types, channels or non-boolean values answer 400.
- POST/notifications/push-tokenRegister push token
- DELETE/notifications/push-tokenRemove push token
- PATCH/notifications/read-allMark all as read
- GET/notifications/unread-countGet unread count
The signed-in account's notifications, newest first
GET/notifications
Needs a signed-in user (Bearer token or access_token cookie).
Each row carries the stable type and target ({ kind, id, ...ids }, ids as strings), the same as the SSE notification.created event and the push data. security.device_added rows carry target.device_id: the e2ee device id of the device that was added.
Parameters
| Name | Type | Description |
|---|---|---|
| limitrequired | string, query | |
| offsetrequired | string, query | |
| active_profile_idrequired | string, query |
Response
200. data is object[].
| Field | Type | Description |
|---|---|---|
| idrequired | integer or string | |
| typerequired | string | The kind. New kinds are only added; a kind is never renamed. Example: "security.device_added" |
| titlerequired | string | Example: "New device added" |
| messagerequired | string | Example: "A new device was added: Firefox on macOS." |
| readrequired | boolean | |
| post_idrequired | integer or string | |
| campaign_idrequired | integer or string | |
| event_idrequired | integer or string | |
| thumbnail_urlrequired | string | |
| comment_idrequired | integer or string | |
| routerequired | object | |
| route.screenrequired | string | Example: "security" |
| route.idrequired | string | Example: "" |
| targetrequired | object | |
| target.kindrequired | string | What the notification is about: post, comment, story, profile, group, event, listing, report, account (new-place sign-in alert), or an older kind's screen such as security (other security alerts, including security.device_added). Some kinds add more string ids next to the ones listed here (interest_id, outcome, source, decision, content_kind, action). Example: "post" |
| target.idrequired | string | Example: "42" |
| target.post_id | string | Comment targets: the post the comment is on. |
| target.device_id | string | security.device_added only: the e2ee device id (1 to 127, as a decimal string) of the device that was just added, so that device can tell its own alert from one about another device. Example: "2" |
| target.listing_kind | string | Listing targets. One of: "post", "product". |
| recipient_profile_idrequired | string | |
| created_atrequired | string (date-time) | |
| actorrequired | object | |
| actor.idrequired | string | |
| actor.namerequired | string | |
| actor.avatarrequired | string | |
| actor.image_urlrequired | string |
Mark as read
PATCH/notifications/{id}/read
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | number, path |
Response
200. The payload in data is not described in the spec yet.
Broadcast
POST/notifications/broadcast
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| x-admin-key | string, header |
Response
201. The payload in data is not described in the spec yet.
Your notification preferences: flat per-type push switches and `delivery: { <type>: { in_app, push, email } }` for like, comment, repost, donation, follow, campaign, connection, share, mention, group, event, listing and safety
GET/notifications/preferences
Needs a signed-in user (Bearer token or access_token cookie).
Response
200. The payload in data is not described in the spec yet.
Change preferences: flat `{ <type>: boolean }` (push) and/or `{ delivery: { <type>: { in_app?, push?, email? } } }`. Unknown types, channels or non-boolean values answer 400.
PATCH/notifications/preferences
Needs a signed-in user (Bearer token or access_token cookie).
Response
200. The payload in data is not described in the spec yet.
Register push token
POST/notifications/push-token
Needs a signed-in user (Bearer token or access_token cookie).
Response
201. The payload in data is not described in the spec yet.
Remove push token
DELETE/notifications/push-token
Needs a signed-in user (Bearer token or access_token cookie).
Response
200. The payload in data is not described in the spec yet.
Mark all as read
PATCH/notifications/read-all
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| active_profile_idrequired | string, query |
Response
200. The payload in data is not described in the spec yet.
Get unread count
GET/notifications/unread-count
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| active_profile_idrequired | string, query |
Response
200. The payload in data is not described in the spec yet.