Incantory
Sign in

Notifications API

5 operations. Authentication, errors and pagination work as described in the REST API overview.

Your notifications

GET/api/v1/notificationsToken required

Newest first (keyset cursor), each with text, snippet, href and kind; unread is the unread count.

listNotifications parameters
NameTypeDescription
cursor querystring
unread query"0" | "1" | "true" | "false"
kind query"conversation" | "social" | "content" | "moderation" | "system"
limit queryinteger (1–100)

Responses: 200 OK400, 401, 403, 404, 429

Response fields
listNotifications response fields
NameTypeDescription
itemsrequiredobject[]
nextCursorrequiredstring | nullOpaque cursor for the next page; null at the end
unreadrequiredinteger (-9007199254740991–9007199254740991)
Example
curl 'https://incantory.ai/api/v1/notifications' \
  -H "Authorization: Bearer $INCANTORY_TOKEN"

Unread count (0 when signed out)

GET/api/v1/notifications/countToken optional

Responses: 200 OK400, 404, 429

Response fields
notificationCount response fields
NameTypeDescription
unreadrequiredinteger (-9007199254740991–9007199254740991)
Example
curl 'https://incantory.ai/api/v1/notifications/count' \
  -H "Authorization: Bearer $INCANTORY_TOKEN"

Mark notifications read (or unread)

POST/api/v1/notifications/readToken required

Request body

Type: object

Responses: 200 OK400, 401, 403, 404, 429

Response fields
markNotifications response fields
NameTypeDescription
updatedrequiredinteger (-9007199254740991–9007199254740991)
unreadrequiredinteger (-9007199254740991–9007199254740991)
Example
curl -X POST 'https://incantory.ai/api/v1/notifications/read' \
  -H "Authorization: Bearer $INCANTORY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"all":true}'

Unsubscribe confirmation page (HTML)

GET/api/v1/notifications/unsubscribePublic

unsubscribePage parameters
NameTypeDescription
u queryrequiredstring
t queryrequiredstring

Responses: 200 OK400, 404, 429

Example
curl 'https://incantory.ai/api/v1/notifications/unsubscribe'

One-click unsubscribe from notification email (RFC 8058)

POST/api/v1/notifications/unsubscribePublic

Authenticated by the signed link from the digest email.

unsubscribe parameters
NameTypeDescription
u queryrequiredstring
t queryrequiredstring

Responses: 200 OK400, 403, 404, 429

Response fields
unsubscribe response fields
NameTypeDescription
unsubscribedrequiredtrue
Example
curl -X POST 'https://incantory.ai/api/v1/notifications/unsubscribe'