Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Notifications

List Notifications

get

List the current user's inbox notifications, newest first.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
limitinteger · min: 1 · max: 200OptionalDefault: 50
Responses
200

Successful Response

application/json
fidstringRequiredExample: notif_abc123456
kindstring · enumRequired

The event a notification reports.

Kinds are stored as text, so new kinds need no migration.

Possible values:
categorystring · enumRequired

The domain a notification belongs to, used to group and filter it.

Possible values:
titlestringRequired
bodystringRequired
linkstring · nullableRequired
created_atstring · datetimeRequiredExample: 2024-01-01T00:00:00Z
read_atstring · datetime · nullableRequiredExample: 2024-01-01T00:00:00Z
get/v2/notifications
GET /v2/notifications HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "fid": "notif_abc123456",
    "kind": "bid_placed",
    "category": "spot",
    "title": "text",
    "body": "text",
    "link": "text",
    "created_at": "2024-01-01T00:00:00Z",
    "read_at": "2024-01-01T00:00:00Z"
  }
]

Get Unread Count

get

Count the current user's unread inbox notifications.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Successful Response

application/json
unreadintegerRequired
get/v2/notifications/unread-count
GET /v2/notifications/unread-count HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "unread": 1
}

Mark Notifications Read

post

Mark some of the current user's notifications read.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
fidsstring[] · min: 1 · max: 500Required
Responses
200

Successful Response

application/json
updatedintegerRequired
post/v2/notifications/read
POST /v2/notifications/read HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 28

{
  "fids": [
    "notif_abc123456"
  ]
}
{
  "updated": 1
}

Mark All Notifications Read

post

Mark all of the current user's notifications read.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Successful Response

application/json
updatedintegerRequired
post/v2/notifications/read-all
POST /v2/notifications/read-all HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "updated": 1
}

Last updated