latestOpenAPI 3.1.02026-08-1014497184.0 KB

8b99dca11019

List all notifications

Lists all notifications for a user.

get/notifications

Query parameters

limitinteger

defines the maximum number of items to return per page (default: 50)

starting_afterstring

a cursor for use in pagination, points to the last ID in previous page

ending_beforestring

a cursor for use in pagination, points to the first ID in next page

statusstring

filter notifications by their status, one of 'unseen' | 'unread' | 'read' | 'archived'

categorystring

filter notifications by their category

topicstring

filter notifications by their topic

Response

OK

Example response

{
  "data": [
    {
      "action_url": null,
      "archived_at": null,
      "category_id": null,
      "created_at": "2024-09-11T11:14:42.165Z",
      "custom_attributes": {
        "key": "value",
        "obj_key": {
          "one": "two"
        }
      },
      "discarded_at": null,
      "id": "4b6efd21-f0f6-4051-8922-cc8c90a3dc5d",
      "in_app": true,
      "metadata": {},
      "notification_broadcast_id": "6a8b1e23-f54b-4c65-95b2-78f288d7f247",
      "overrides": {},
      "project_id": 7,
      "read_at": null,
      "seen_at": null,
      "status": "unseen",
      "title": "Example Notification",
      "topic_id": null,
      "updated_at": "2024-09-11T11:14:42.165Z",
      "user_id": "d4121424-097e-40b0-9cc8-357060d004b2"
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}