Push
bearerAuthorizationBearer <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.
Devices. The token is never returned.
application/json- response
devices*array<>curl -X GET 'https://example.com/v1/devices'{ "devices": [ { "id": "string", "platform": "ios", "last_seen_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}Call after sign-in and whenever Firebase gives the app a new token. A token already registered is refreshed; one that belonged to another account on the same phone moves to this user. A user can have at most 10 devices.
bearerAuthorizationBearer <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.
application/json- body
token*stringlength <= 1024platform*string"ios""android"The device
application/json- response
id*stringplatform*string"ios""android"last_seen_at*stringdate-timecreated_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://example.com/v1/devices' \ -H 'Content-Type: application/json' \ -d '{ "token": "string", "platform": "ios"}'{ "id": "string", "platform": "ios", "last_seen_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}bearerAuthorizationBearer <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.
id*stringRemoved
curl -X DELETE 'https://example.com/v1/devices/string'bearerAuthorizationBearer <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.
Settings
application/json- response
push_enriched*booleanA quiet event when the AI finishes an item (phones and open web apps)
push_daily*booleanThe daily Serendipity reminder (phones)
daily_hour*integer0 <= value <= 23timezone*stringIANA name
curl -X GET 'https://example.com/v1/push/settings'{ "push_enriched": true, "push_daily": true, "daily_hour": 0, "timezone": "string"}Turning push_enriched off also turns off the realtime web event. Fields you leave out are not changed.
bearerAuthorizationBearer <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.
application/json- body
push_enriched?booleanpush_daily?booleandaily_hour?integer0 <= value <= 23timezone?stringSettings
application/json- response
push_enriched*booleanA quiet event when the AI finishes an item (phones and open web apps)
push_daily*booleanThe daily Serendipity reminder (phones)
daily_hour*integer0 <= value <= 23timezone*stringIANA name
curl -X PATCH 'https://example.com/v1/push/settings' \ -H 'Content-Type: application/json' \ -d '{}'{ "push_enriched": true, "push_daily": true, "daily_hour": 0, "timezone": "string"}enabled is false when no Pusher-protocol server is configured. Otherwise connect with pusher-js, using
ws_host, ws_port and tls as its wsHost, wsPort and forceTLS, and key as the app key. Hosted
Pusher Channels returns cluster instead of a host. Authorise through auth_endpoint, sending the session
token as a bearer header, and subscribe to channel. See docs/PUSH.md.
events lists every event name the channel can carry. Payloads:
| Event | Payload | Fires when |
|---|---|---|
item.created | {item_id, change_seq} | an item is saved |
item.updated | {item_id, change_seq} | any change to an item, whoever made it: an edit, a rule, enrichment, a thumbnail swap, a list add or remove, a shared item's state |
item.enriched | {item_id, change_seq} | AI enrichment finished (not for imports) |
item.deleted | {item_id, change_seq} | an item is deleted (item_id always set) |
list.items_changed | {list_id} | an item is added to or removed from a list the user owns or is a member of |
list.members_changed | {list_id} | a member is invited, joins, changes role or leaves |
asset.attached | {item_id, kind} | a screenshot, archive or pdf copy finishes |
import.progress | {import_id, done, total} | an import starts, advances or ends |
notification.created | {notification_id} | a notification reached the inbox (includes list invitations, import and export results) |
reminder | {item_id, reminder_id} | a reminder went off |
export.ready | {export_id} | a data export finished |
change_seq is a number: the item's change sequence when the event was sent, comparable with the
change_seq of items from /v1/sync. Events for one item are merged when they come close together, so
expect fewer events than writes. Delivery is best effort: poll GET /v1/sync/head as a fallback.
Send X-Socket-Id: <pusher.connection.socket_id> on a write and the events it causes skip that
connection. Changes made later by rules or enrichment still reach it.
bearerAuthorizationBearer <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.
Connection settings
application/json- response
enabled*booleankey?stringThe public app key
ws_host?stringcluster?stringHosted Pusher Channels only. Use it as pusher-js's cluster.
ws_port?integertls*booleanchannel?stringauth_endpoint?stringevents?array<string>curl -X GET 'https://example.com/v1/realtime'{ "enabled": true, "key": "string", "ws_host": "string", "cluster": "string", "ws_port": 0, "tls": true, "channel": "string", "auth_endpoint": "string", "events": [ "string" ]}The endpoint pusher-js calls. Accepts a form body or JSON. Only private-user-<your id> is ever signed.
bearerAuthorizationBearer <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.
- body
socket_id*stringchannel_name*stringThe signature pusher-js expects
application/json- response
auth*stringcurl -X POST 'https://example.com/v1/realtime/auth' \ -H 'Content-Type: application/json' \ -d '{ "socket_id": "1234.5678", "channel_name": "private-user-01J..."}'{ "auth": "app-key:signature"}