Notifications
6 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
List notifications for the current user#
GET
/notificationsTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
limit | Query | string | Max notifications to return (1–100, default 50) |
offset | Query | string | Number of records to skip (default 0) |
unread_only | Query | string | Return only unread notifications when "true" |
since | Query | string | ISO timestamp — return only notifications created after this time (used by the polling fallback) |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/notifications" \
-H "Authorization: Bearer $XISUITE_TOKEN"Mark a notification as read or unread#
PATCH
/notifications/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Notification UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
seqPflicht | number | Last read message seq |
markUnread | boolean | true = move the read position back ("mark as unread") |
Antworten
- 200OK
Beispiel (cURL)
curl -X PATCH "https://xapi.ambertech.cloud/api/v1/notifications/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"seq":0}'Accept or decline a space invitation notification#
POST
/notifications/{id}/actionTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Notification UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
actionPflicht | string | Action to perform Werte: |
Antworten
- 200OK
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/notifications/{id}/action" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action":"accept"}'Mark all notifications as read#
POST
/notifications/mark-all-readTokenAntworten
- 200OK
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/notifications/mark-all-read" \
-H "Authorization: Bearer $XISUITE_TOKEN"Get notification preferences for the current user#
GET
/notifications/preferencesTokenAntworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/notifications/preferences" \
-H "Authorization: Bearer $XISUITE_TOKEN"Update a notification preference#
PUT
/notifications/preferencesTokenRequest-Body
| Name | Typ | Beschreibung |
|---|---|---|
notification_typePflicht | string | Werte: |
in_app | boolean | – |
email | boolean | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X PUT "https://xapi.ambertech.cloud/api/v1/notifications/preferences" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"notification_type":"space_invitation"}'