Skip to content

List Notifications

GET
/api/v1/notifications
curl --request GET \
--url 'https://indepai.app/api/v1/notifications?limit=50&offset=0&unread_only=true' \
--header 'Authorization: Bearer <token>'

Get the authenticated user’s notifications with pagination and optional unread-only filter.

limit

Number of notifications to return (max 100)

integer
default: 50 >= 1 <= 100
Example
50
offset

Offset for pagination

integer | null
0
Example
0
unread_only

Filter to unread notifications only

string
default: false
Allowed values: true false
Example
false

Notifications list

Media typeapplication/json
object
success
required
boolean
data
required
Array<object>
object
id
required

Notification ID

string format: uuid
user_id
required

User ID

string format: uuid
type
required

Notification type

string
title
required

Notification title

string
message
required

Notification message body

string
read
required

Whether the notification has been read

boolean
created_at
required

When the notification was created

string format: date-time
expires_at

When the notification expires

string | null format: date-time
meta
required
object
total
required

Total notification count

integer
unread
required

Unread notification count

integer
Example
{
"success": true,
"data": [
{
"type": "fi_score_update",
"title": "Your FI Score increased!",
"created_at": "2024-01-15T10:30:00Z",
"expires_at": "2024-01-15T10:30:00Z"
}
]
}

Unauthorized

Media typeapplication/json
object
success
required

Always false for error responses

boolean
error
required

Error type

string
code

Machine-readable error code

string
details

Detailed validation errors

Array<object>
object
path
required

Path to the invalid field

string
message
required

Error message

string
Example
{
"success": false,
"error": "Validation error",
"code": "VALIDATION_ERROR",
"details": [
{
"path": "currentAge",
"message": "Must be between 18 and 100"
}
]
}