API reference
Notifications
Panel notifications and the contact channels (email, webhook) alerts go to.
List the account's notifications
GET/api/v1/accounts/{id}/notifications
Parameters
| Name | In |
|---|---|
id | path |
limit | query |
Responses
- 200 OK
Body
Field Type itemsarray of StoreNotification unreadinteger - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Mark the account's notifications as read
POST/api/v1/accounts/{id}/notifications/read
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
id | string |
Responses
- 204 Done, no content
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
List your notifications
GET/api/v1/notifications
Responses
- 200 OK
Body
Field Type itemsarray of StoreNotification unreadinteger - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Mark notifications as read
POST/api/v1/notifications/read
Request body
| Field | Type |
|---|---|
id | string |
Responses
- 204 Done, no content
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Contact channels and alert priorities
GET/api/v1/server/contacts
Responses
- 200 OK
Body
Field Type alertsarray of AlertView channelsarray of ChannelView contact_emailstring deliveriesarray of StoreDelivery webhook_timeout_secondsinteger - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Set alert priorities
PUT/api/v1/server/contacts/alerts
Request body
| Field | Type |
|---|---|
priorities | map of string |
Responses
- 200 OK
Body
Field Type alertsarray of AlertView channelsarray of ChannelView contact_emailstring deliveriesarray of StoreDelivery webhook_timeout_secondsinteger - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Add a contact channel (email or webhook)
POST/api/v1/server/contacts/channels
Request body
| Field | Type |
|---|---|
enabled | boolean |
min_priority | string |
target | string |
type | string |
Responses
- 201 Created
Body
map of any
- 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Delete a contact channel
DELETE/api/v1/server/contacts/channels/{id}
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 204 Done, no content
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Update a contact channel
PUT/api/v1/server/contacts/channels/{id}
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
enabled | boolean |
min_priority | string |
target | string |
type | string |
Responses
- 200 OK
Body
Field Type created_atinteger enabledboolean has_secretboolean idstring min_prioritystring targetstring typealwaysstring updated_atinteger - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Rotate a webhook channel's secret
POST/api/v1/server/contacts/channels/{id}/rotate-secret
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type secretstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: not-webhook
- 500 Internal Server Error: internal
Send a test notification
POST/api/v1/server/contacts/test
Request body
| Field | Type |
|---|---|
channel_id | string |
Responses
- 200 OK
Body
Field Type resultsarray of Result - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: no-channels
- 500 Internal Server Error: internal