Notifications

List the signed-in user notification inbox

GET
/api/notifications

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

The Better Auth email/password session cookie used by the web application.

Query Parameters

projectId?string
Length1 <= length
before?string
Length1 <= length <= 1024
limit?integer
Range1 <= value <= 100
view?string
Value in"active""all"

Response Body

Response for status 200

application/json
  1. response
notifications*array<>
unreadCount*integer
Range0 <= value
totalUnreadCount*integer
Range0 <= value
nextCursor*|null
Example Request
curl -X GET 'https://postbot.example/api/notifications'
Example Response
{
  "notifications": [
    {
      "id": "string",
      "projectId": "string",
      "sourceEventId": "string",
      "kind": "publication_published",
      "severity": "success",
      "subject": {
        "type": "string",
        "id": "string"
      },
      "title": "string",
      "body": "string",
      "readAt": 0,
      "archivedAt": 0,
      "createdAt": 0
    }
  ],
  "unreadCount": 0,
  "totalUnreadCount": 0,
  "nextCursor": "string"
}

Was this page helpful?