List Notifications
GET
/api/v1/notifications
const url = 'https://indepai.app/api/v1/notifications?limit=50&offset=0&unread_only=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
Number of notifications to return (max 100)
integer
Example
50offset
Offset for pagination
integer | null
Example
0unread_only
Filter to unread notifications only
string
Example
falseResponses
Section titled “Responses”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" } ]}