Skip to content
Skip to Content
Full reference

Notifications

GET
/v1/notifications

A page of notifications (50 by default, at most 200) and the count of all unread ones. Notifications are kept 90 days, at most 500 per user. An invitation that was answered or withdrawn, or whose list was deleted, is left out.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Query Parameters

unread?boolean

Only notifications not read yet

Defaultfalse
cursor?string

next_cursor from the previous page

Length26 <= length <= 26
limit?integer
Range1 <= value <= 200
Default50

Response Body

A page of the inbox

application/json
  1. response
notifications*array<>
next_cursor*|

Pass as cursor for the next page; null on the last

unread_count*integer

All unread notifications

Range0 <= value
Example Request
curl -X GET 'https://example.com/v1/notifications'
Example Response
{  "notifications": [    {      "id": "string",      "kind": "reminder",      "item_id": "string",      "data": {        "property1": "string",        "property2": "string"      },      "read_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "item": null    }  ],  "next_cursor": "string",  "unread_count": 0}
GET
/v1/notifications/unread-count

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Response Body

The count

application/json
  1. response
unread_count*integer
Range0 <= value
Example Request
curl -X GET 'https://example.com/v1/notifications/unread-count'
Example Response
{  "unread_count": 0}
POST
/v1/notifications/read-all

With up_to, only notifications up to and including that id are marked, so one that arrived after the client loaded its list stays unread.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Request Body

application/json
  1. body
up_to?string

The newest notification id the user has seen

Length26 <= length <= 26

Response Body

Done

application/json
  1. response
marked*integer

How many were marked read

Range0 <= value
unread_count*integer
Range0 <= value
Example Request
curl -X POST 'https://example.com/v1/notifications/read-all' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "marked": 0,  "unread_count": 0}

One notification

GET
/v1/notifications/{id}

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Response Body

The notification

application/json
  1. response
id*string
kind*string

reminder: a reminder went off (item_id, data.reminder_id). export.ready / export.failed: a data export finished or gave up (data.export_id). import.done / import.failed: a bookmarks import ended, including one stopped at the plan's item limit (data.import_id). list.invited: someone invited the user to a list (data.list_id, data.invitation_id; answer it under /v1/invitations). New kinds may be added: show unknown ones generically.

Value in"reminder""export.ready""export.failed""import.done""import.failed""list.invited"
item_id*|

The item it is about

data*

The other ids the kind needs. Never titles, URLs or notes.

read_at*|
Formatdate-time
created_at*string
Formatdate-time
item*|

The item, added when read; null when there is none or it was deleted

Example Request
curl -X GET 'https://example.com/v1/notifications/string'
Example Response
{  "id": "string",  "kind": "reminder",  "item_id": "string",  "data": {    "property1": "string",    "property2": "string"  },  "read_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "item": null}
PATCH
/v1/notifications/{id}

Marking a read notification read again keeps its first read_at.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Request Body

application/json
  1. body
read*boolean

Response Body

The notification

application/json
  1. response
id*string
kind*string

reminder: a reminder went off (item_id, data.reminder_id). export.ready / export.failed: a data export finished or gave up (data.export_id). import.done / import.failed: a bookmarks import ended, including one stopped at the plan's item limit (data.import_id). list.invited: someone invited the user to a list (data.list_id, data.invitation_id; answer it under /v1/invitations). New kinds may be added: show unknown ones generically.

Value in"reminder""export.ready""export.failed""import.done""import.failed""list.invited"
item_id*|

The item it is about

data*

The other ids the kind needs. Never titles, URLs or notes.

read_at*|
Formatdate-time
created_at*string
Formatdate-time
item*|

The item, added when read; null when there is none or it was deleted

Example Request
curl -X PATCH 'https://example.com/v1/notifications/string' \  -H 'Content-Type: application/json' \  -d '{  "read": true}'
Example Response
{  "id": "string",  "kind": "reminder",  "item_id": "string",  "data": {    "property1": "string",    "property2": "string"  },  "read_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "item": null}

Remove a notification

DELETE
/v1/notifications/{id}

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Response Body

Deleted

Example Request
curl -X DELETE 'https://example.com/v1/notifications/string'
Example Response
Empty