RiskPilot API
RiskPilot customer API

Your chat channels for alerts, and which kinds this server offers

GET
/api/v1/customer/channels

Your chat channels for alerts, and which kinds this server offers › Responses

OK

​ChatChannel[] · required
​object · required

POST
/api/v1/customer/channels

Discord: url on discord.com or discordapp.com (/api/webhooks//). Slack: url on hooks.slack.com (/services/…). Any other host, http, credentials or a private address is 400 url_not_allowed or 400. Telegram: no url; the answer's link holds a one-time code and the t.me deep link. A kind that is off on this server is 503 channel_unavailable; at most 10 channels (409 channel_limit).

Add a Discord or Slack webhook (sends a first message) or start a Telegram link › Request Body

kind
​string · enum · required
Enum values:
discord
slack
telegram
url
​string

Discord or Slack incoming-webhook URL.

label
​string · maxLength: 80

Add a Discord or Slack webhook (sends a first message) or start a Telegram link › Responses

Created.

​ChatChannel · required
​
test
​object | null

Remove a channel (rules stop naming it)

DELETE
/api/v1/customer/channels/{id}

Remove a channel (rules stop naming it) › path Parameters

id
​string · pattern: ^\d{1,18}$ · required

Channel id.

Remove a channel (rules stop naming it) › Responses

Done (no body).

No data returned

POST
/api/v1/customer/channels/{id}/relink
id
​string · pattern: ^\d{1,18}$ · required

Channel id.

OK

​TelegramLink · required

Send a test alert to a channel now (5 an hour)

POST
/api/v1/customer/channels/{id}/test

Send a test alert to a channel now (5 an hour) › path Parameters

id
​string · pattern: ^\d{1,18}$ · required

Channel id.

Send a test alert to a channel now (5 an hour) › Responses

OK

ok
​boolean · required
status
​integer | null
error
​string | null

POST
/api/v1/customer/channels/{id}/verify
id
​string · pattern: ^\d{1,18}$ · required

Channel id.

OK

​ChatChannel · required
​
test
​object | null
error
​string | null

The inbox, newest first

GET
/api/v1/customer/notifications

An account that has not paid sees its subscription notices (system) only.

The inbox, newest first › query Parameters

before
​string · pattern: ^\d{1,18}$

Older than this notification id (from nextBefore).

unread
​string · enum

Only unread ones.

Enum values:
true
false
limit
​integer · min: 1 · max: 100

Page size.

Default: 30

The inbox, newest first › Responses

OK

​Notification[] · required
unread
​integer · required
nextBefore
​string | null

Mark notifications read (or unread)

POST
/api/v1/customer/notifications/read

Mark notifications read (or unread) › Request Body

ids
​string[]

At most 500.

all
​boolean · enum
Enum values:
read
​boolean

Default true.

Mark notifications read (or unread) › Responses

OK

changed
​integer · required
unread
​integer · required

Notification preferences and the channels this server offers

GET
/api/v1/customer/notifications/settings

Notification preferences and the channels this server offers › Responses

OK

​object · required
​object · required
​PushChannels · required
​object

Chat channels this server offers.


Change notification preferences

PATCH
/api/v1/customer/notifications/settings

Change notification preferences › Request Body

emailAlerts
​string · enum
Enum values:
instant
digest
off
emailSystem
​boolean
pushAlerts
​boolean

Change notification preferences › Responses

OK

​object · required
​object · required
​PushChannels · required
​object

Chat channels this server offers.


How many are unread (for a badge)

GET
/api/v1/customer/notifications/unread-count

How many are unread (for a badge) › Responses

OK

unread
​integer · required

POST
/api/v1/customer/notifications/unsubscribe
token
​string · required

rpu_… from the mail link.

all
​boolean

Also stop subscription notices.

OK

unsubscribed
​boolean · required
all
​boolean

Registered push devices and the channels on offer

GET
/api/v1/customer/push/devices

Registered push devices and the channels on offer › Responses

OK

​PushDevice[] · required
​PushChannels · required

Register a device for push (Web Push, FCM or APNs)

POST
/api/v1/customer/push/devices

503 push_unavailable when that provider is not configured on this server.

Register a device for push (Web Push, FCM or APNs) › Request Body

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: endpoint, keys
type = object · requires: provider, token
Properties for Variant 1:
endpoint
​string · required

The push service URL (https).

​object · required
provider
​string · enum
Enum values:
webpush
label
​string · maxLength: 80

Register a device for push (Web Push, FCM or APNs) › Responses

Registered.

id
​string · required
provider
​string · enum · required
Enum values:
webpush
fcm
apns
enabled
​boolean · required
label
​string
createdAt
​string · date-time
lastSeenAt
​string | null · date-time
lastSuccessAt
​string | null · date-time
disabledReason
​string | null

Remove a push device

DELETE
/api/v1/customer/push/devices/{id}

Remove a push device › path Parameters

id
​string · pattern: ^\d{1,18}$ · required

Device id.

Remove a push device › Responses

Done (no body).

No data returned

Send a test push to your devices (5 an hour)

POST
/api/v1/customer/push/test

Send a test push to your devices (5 an hour) › Responses

OK

queued
​integer · required