Fetch notifications

GET {{baseUrl}}/notifications?per_page=<integer>&page=<integer>&read=<boolean>&seen=<boolean>&archived=<boolean>&categories=<string>&categories=<string>&topics=<string>&topics=<string>

Fetch a user's notifications. Notifications are sorted in descendent order by the sent_at timestamp.

Request Params

KeyDatatypeRequiredDescription
per_pagestringA limit on the number of notifications to be returned. It can range between 1 and 100, and the default is 15.
pagestringA parameter for use in pagination. Defaults to 1.
readstringA filter on the notifications based on the read state. If false, only unread notifications will be returned. Defaults to null.
seenstringA filter on the notifications based on the seen state. If false, only unseen notifications will be returned. Defaults to null.
archivedstringA filter on the notifications based on the archived state. If false, only unarchived notifications will be returned. Defaults to null.
categoriesstringA filter on the notifications based on the category. If you want to get uncategorized notifications, use the "uncategorized" value.
The value can be either an array of strings or a comma-separated string.
categoriesstringA filter on the notifications based on the category. If you want to get uncategorized notifications, use the "uncategorized" value.
The value can be either an array of strings or a comma-separated string.
topicsstringA filter on the notifications based on the topic.
topicsstringA filter on the notifications based on the topic.

HEADERS

KeyDatatypeRequiredDescription
X-MAGICBELL-API-KEYstring(Required) The (public) API key of your MagicBell project.
X-MAGICBELL-USER-EXTERNAL-IDstringID of the user. Provide the X-MAGICBELL-USER-EMAIL header instead if you identify users by email.
X-MAGICBELL-USER-EMAILstringEmail address of the user. Provide the X-MAGICBELL-USER-EXTERNAL-ID header instead if you identify users by ID.
X-MAGICBELL-USER-HMACstringHMAC calculated with the API secret and ID, or email, of the user. Required if the project has HMAC enabled.
Acceptstring

RESPONSES

status: OK

{&quot;project_id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;total&quot;:&quot;\u003cinteger\u003e&quot;,&quot;per_page&quot;:&quot;\u003cinteger\u003e&quot;,&quot;total_pages&quot;:&quot;\u003cinteger\u003e&quot;,&quot;current_page&quot;:&quot;\u003cinteger\u003e&quot;,&quot;unseen_count&quot;:&quot;\u003cinteger\u003e&quot;,&quot;unread_count&quot;:&quot;\u003cinteger\u003e&quot;,&quot;notifications&quot;:[{&quot;title&quot;:&quot;\u003cstring\u003e&quot;,&quot;recipient&quot;:{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;external_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;email&quot;:&quot;\u003cstring\u003e&quot;,&quot;first_name&quot;:&quot;\u003cstring\u003e&quot;,&quot;last_name&quot;:&quot;\u003cstring\u003e&quot;,&quot;custom_attributes&quot;:{&quot;consequate&quot;:-22133528},&quot;phone_numbers&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;]},&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;content&quot;:&quot;\u003cstring\u003e&quot;,&quot;action_url&quot;:&quot;\u003curi\u003e&quot;,&quot;category&quot;:&quot;\u003cstring\u003e&quot;,&quot;topic&quot;:&quot;\u003cstring\u003e&quot;,&quot;custom_attributes&quot;:{&quot;reprehenderit58&quot;:false},&quot;sent_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;seen_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;read_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;archived_at&quot;:&quot;\u003cnumber\u003e&quot;},{&quot;title&quot;:&quot;\u003cstring\u003e&quot;,&quot;recipient&quot;:{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;external_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;email&quot;:&quot;\u003cstring\u003e&quot;,&quot;first_name&quot;:&quot;\u003cstring\u003e&quot;,&quot;last_name&quot;:&quot;\u003cstring\u003e&quot;,&quot;custom_attributes&quot;:{&quot;nisie&quot;:false,&quot;dolor_2&quot;:&quot;deserunt nulla magna voluptate aute&quot;},&quot;phone_numbers&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;]},&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;content&quot;:&quot;\u003cstring\u003e&quot;,&quot;action_url&quot;:&quot;\u003curi\u003e&quot;,&quot;category&quot;:&quot;\u003cstring\u003e&quot;,&quot;topic&quot;:&quot;\u003cstring\u003e&quot;,&quot;custom_attributes&quot;:{&quot;dob87&quot;:94401494.66911843,&quot;aliqua0&quot;:&quot;reprehenderit aliqua&quot;,&quot;nostruda0b&quot;:false,&quot;in_5&quot;:50027453.19020465},&quot;sent_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;seen_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;read_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;archived_at&quot;:&quot;\u003cnumber\u003e&quot;}]}