Browse the docs

API reference

Notifications

In-app notifications, preferences and web push (P3-21).

Paths are relative to /api/v1 on your server.

GET/notifications#

List my notifications

Authorisation
Bearer token or API key · Session cookie
ParameterInTypeDescription
unreadquerystring
cursorquerystring
limitqueryinteger
  • 200Success. application/json · NotificationPage
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. application/json · ErrorEnvelope
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks library:view, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
DELETE/notifications/{id}#

Dismiss a notification

Authorisation
Bearer token or API key · Session cookie
ParameterInTypeDescription
id requiredpathstring (uuid)
  • 204Done; no body.
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks library:view, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
  • 404NOT_FOUND: no such thing, or not one the caller may see. application/json · ErrorEnvelope
GET/notifications/preferences#

Read my notification preferences

Authorisation
Bearer token or API key · Session cookie
  • 200Success. application/json · NotificationPreferences
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks library:view, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
PUT/notifications/preferences#

Update my notification preferences

Authorisation
Bearer token or API key · Session cookie
Body
application/json · object
  • 200Success. application/json · NotificationPreferences
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. application/json · ErrorEnvelope
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks library:view, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
GET/notifications/push/key#

The server’s VAPID public key

Authorisation
Bearer token or API key · Session cookie
  • 200Success. application/json · object
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks library:view, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
  • 409CONFLICT: Push is switched off on this server (notifications.push_enabled; details.reason is push-off). application/json · ErrorEnvelope
POST/notifications/push/subscriptions#

Subscribe this browser to push

Authorisation
Bearer token or API key · Session cookie
Body
application/json · object
  • 204Done; no body.
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. application/json · ErrorEnvelope
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks library:view, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
  • 409CONFLICT: Push is switched off on this server (notifications.push_enabled; details.reason is push-off). application/json · ErrorEnvelope
DELETE/notifications/push/subscriptions#

Unsubscribe from push

Authorisation
Bearer token or API key · Session cookie
Body
application/json · object
  • 204Done; no body.
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. application/json · ErrorEnvelope
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks library:view, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
POST/notifications/read#

Mark notifications read

Authorisation
Bearer token or API key · Session cookie
Body
application/json · object
  • 200Success. application/json · object
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. application/json · ErrorEnvelope
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks library:view, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope