Skip to content
cloudhostDocs
API reference

Notifications

The notification centre and each person's notification settings.

GET/v1/unsubscribe

The unsubscribe link in a notification email#

No auth: the signed token names one person and one event. Answers an HTML page with one button that posts back.

Credential
None

Parameters

  • tstringqueryrequired

    the token from the email

Response

200stringtext/htmlThe page with the button

Errors

StatusDescription
400The token does not check out (an HTML page)

Example

Request
curl "https://api.ibel.ai/v1/unsubscribe?t=t"
POST/v1/unsubscribe

Turn one event's email off (the button, or one-click unsubscribe, RFC 8058)#

No auth: the signed token names one person and one event. The dashboard notification and SMS stay as they were.

Credential
None

Parameters

  • tstringqueryrequired

    the token from the email

Request bodyapplication/x-www-form-urlencoded

string

Response

200stringtext/htmlDone (an HTML page)

Errors

StatusDescription
400The token does not check out (an HTML page)

Example

Request
curl -X POST "https://api.ibel.ai/v1/unsubscribe?t=t" \
  --data-binary @file
GET/v1/notifications

Your notifications, newest first#

Credential
A dashboard session only (API keys are refused)
Roles
Any role

Parameters

  • limitintegerquery

    1-100, default 20

  • beforeintegerquery

    an id: the next page

  • unreadstringquery

    1: unread only

    one of 1

Response

200object

  • itemsNotification[]required
  • unreadintegerrequired
  • next_beforeinteger | nullrequired

Errors

StatusDescription
400Bad request: bad_param
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: session_only
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/notifications" \
  -H "Authorization: Bearer $SESSION"
POST/v1/notifications/read

Mark notifications read#

Credential
A dashboard session only (API keys are refused)
Roles
Any role

Request bodyapplication/json

  • idsinteger[]

    1-500 ids

  • allboolean

    every unread one

Response

200object

  • markedintegerrequired
  • unreadintegerrequired

Errors

StatusDescription
400Bad request: bad_request, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: session_only
500internal: an unexpected failure

Example

curl -X POST "https://api.ibel.ai/v1/notifications/read" \
  -H "Authorization: Bearer $SESSION" \
  -d '{"ids":[1],"all":true}'
GET/v1/me/notification-settings

Which events go to the centre, email or SMS#

Credential
A dashboard session only (API keys are refused)
Roles
Any role

Response

200object

  • has_phonebooleanrequired
  • eventsNotificationSetting[]required
    • typestringrequired
    • groupstring

      one of deploys, alerts, billing, team, support

    • channelsstring[]required

      the channels this event can use

    • title_keystring
    • centrebooleanrequired
    • emailbooleanrequired
    • smsbooleanrequired

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: session_only
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/me/notification-settings" \
  -H "Authorization: Bearer $SESSION"
PUT/v1/me/notification-settings

Change them#

A channel left out keeps its value; a channel the event does not use is refused.

Credential
A dashboard session only (API keys are refused)
Roles
Any role

Request bodyapplication/json

  • eventsobject[]required
    • typestringrequired
    • centreboolean
    • emailboolean
    • smsboolean

Response

200object

  • has_phonebooleanrequired
  • eventsNotificationSetting[]required
    • typestringrequired
    • groupstring

      one of deploys, alerts, billing, team, support

    • channelsstring[]required

      the channels this event can use

    • title_keystring
    • centrebooleanrequired
    • emailbooleanrequired
    • smsbooleanrequired

Errors

StatusDescription
400Bad request: bad_request, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: session_only
500internal: an unexpected failure

Example

curl -X PUT "https://api.ibel.ai/v1/me/notification-settings" \
  -H "Authorization: Bearer $SESSION" \
  -d '{"events":[{"type":"…","centre":true,"email":true,"sms":true}]}'