milmilmilmil
API 參考

Notifications

In-app notification list, mark-read, clear

GET
/api/v1/notifications

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Query Parameters

limit?integer
Default20
offset?integer
Default0
filter?string

Value in

  • "all"
  • "unread"

Response Body

application/json

curl -X GET "https://example.com/api/v1/notifications"
[  {    "id": "string",    "type": "string",    "title": "string",    "body": "string",    "read": true,    "created_at": "string"  }]
DELETE
/api/v1/notifications

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

curl -X DELETE "https://example.com/api/v1/notifications"
Empty
POST
/api/v1/notifications/mark-all-read

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

curl -X POST "https://example.com/api/v1/notifications/mark-all-read"
Empty
GET
/api/v1/notifications/unread-count

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/notifications/unread-count"
{  "count": 0}
PATCH
/api/v1/notifications/{id}/read

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Path Parameters

id*string

Response Body

curl -X PATCH "https://example.com/api/v1/notifications/string/read"
Empty