Notifications API
In-app notifications for the signed-in user.
| Operation | Method and path |
|---|---|
| List my notifications | GET /api/v1/notification |
| Mark a notification read | POST /api/v1/notification/{id}/read |
| Mark every notification read | POST /api/v1/notification/read-all |
GET
/api/v1/notification List my notifications
notification.list · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
offset | query | integer | |
limit | query | integer | |
q | query | string | |
unread | query | boolean |
Example
curl -X GET "https://api.siaran.my/api/v1/notification" \
-H "x-api-key: $SIAR_API_KEY" Response 200
3 top-level fields
-
itemsobject[] required7 fields
-
idstring required -
titlestring required -
bodystring nullable -
linkstring nullable -
kindstring -
readAtstring nullable date-time -
createdAtstring date-time
-
-
totalinteger required -
unreadinteger
POST
/api/v1/notification/{id}/read Mark a notification read
notification.read · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
id required | path | string |
Example
curl -X POST "https://api.siaran.my/api/v1/notification/ID/read" \
-H "x-api-key: $SIAR_API_KEY" Response 200
1 top-level fields
-
successboolean required
POST
/api/v1/notification/read-all Mark every notification read
notification.readAll · requires x-api-key
Example
curl -X POST "https://api.siaran.my/api/v1/notification/read-all" \
-H "x-api-key: $SIAR_API_KEY" Response 200
1 top-level fields
-
successboolean required