Skip to content
Klozzo API
OpenAPI Postman

Reference

Notifications

Per-user in-app notifications driven by Laravel's database notification channel. Notifications carry a type (Laravel class FQN) and a data payload specific to the notification.

List notifications

Lists the notifications of the user the token belongs to, newest first. Pass unread=true to restrict to unread items.

GET /api/notifications

Query parameters

  • unread boolean

    Only return unread notifications.

    Example: true

  • per_page integer

    Rows per page. Default 25, maximum 100. See Lists, paging and filters.

    Example: 25

curl --request GET \
    --get "https://klozzo.com/api/notifications?unread=1&per_page=25" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
{
    "data": [
        {
            "id": "9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234",
            "type": "App\\Notifications\\NewMessageReceived",
            "data": {
                "conversation_id": 17,
                "preview": "Hi Ada!"
            },
            "read_at": null,
            "created_at": "2026-06-05T13:42:00+00:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 4,
        "per_page": 25,
        "total": 87,
        "unread_count": 12
    }
}
  • data object[]

    • id string

    • type string

    • data object

      • conversation_id integer

      • preview string

    • read_at string

    • created_at string

  • meta object

    • current_page integer

    • last_page integer

    • per_page integer

    • total integer

    • unread_count integer

Unread count

Returns how many notifications you have unread, as a single integer — a lightweight endpoint for badge polling.

GET /api/notifications/unread-count

curl --request GET \
    --get "https://klozzo.com/api/notifications/unread-count" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
{
    "unread_count": 12
}
  • unread_count integer

Mark a notification as read

Marks one notification as read. Idempotent: marking an already-read notification is a no-op (returns the existing read_at).

POST /api/notifications/{id}/read

Path parameters

  • id string required

    Notification UUID.

    Example: 9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234

curl --request POST \
    "https://klozzo.com/api/notifications/9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234/read" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
{
    "data": {
        "id": "9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234",
        "type": "App\\Notifications\\NewMessageReceived",
        "data": {
            "conversation_id": 17,
            "preview": "Hi Ada!"
        },
        "read_at": "2026-06-05T13:43:00+00:00",
        "created_at": "2026-06-05T13:42:00+00:00"
    },
    "unread_count": 11
}
  • data object

    • id string

    • type string

    • data object

      • conversation_id integer

      • preview string

    • read_at string

    • created_at string

  • unread_count integer

Mark all notifications as read

Marks every notification of the user the token belongs to as read, in one call. It affects your notifications only — the ones belonging to the user the token was issued for — so it can never clear somebody else's inbox.

POST /api/notifications/read-all

Marking everything read is not the same as deleting: the notifications stay readable, they just stop counting.

curl --request POST \
    "https://klozzo.com/api/notifications/read-all" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
{
    "unread_count": 0
}
  • unread_count integer

Update notification preferences

Updates your notification preferences. Currently only the muted list is supported — notifications whose type matches an entry in the list are skipped at delivery time. Provide the full desired list (full-replace, not append).

PUT /api/notifications/preferences

Body parameters

  • muted string[]

    Notification types to mute.

    Example: ["App\\Notifications\\NewMessageReceived"]

curl --request PUT \
    "https://klozzo.com/api/notifications/preferences" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"muted\": [
        \"App\\\\Notifications\\\\NewMessageReceived\"
    ]
}"
{
    "data": {
        "muted": [
            "App\\Notifications\\NewMessageReceived"
        ]
    }
}
  • data object

    • muted string[]