API reference

Keys, events and webhooks

Keys, short-lived tokens, apps, the event stream, webhook endpoints and the test project.

Scopes for this area: keys:read, keys:write and keys:admin.

25 operations

key

MethodRouteWhat it doesLevelCommand
GET/keysList the keys of the project (never their secrets).readrivier keys key list
POST/keysMint a key. The secret is returned once.adminrivier keys key create
POST/keys/{id}/rotateReplace a key with a twin; the old key keeps working for the overlap.adminrivier keys key rotate
DELETE/keys/{id}Revoke a key at once.adminrivier keys key revoke

token

MethodRouteWhat it doesLevelCommand
POST/keys/tokensMint a short-lived token from this key: at most its scopes, minutes to live, no key management.writerivier keys token create

event

MethodRouteWhat it doesLevelCommand
GET/keys/eventsThe key audit: created, rotated and revoked, never a secret.readrivier keys event list

events

MethodRouteWhat it doesLevelCommand
GET/eventsEvents from a cursor, limited to the modules the key can read.readrivier keys events list
GET/events/catalogueEvery event type, and the operation that raises it.readrivier keys events catalogue
GET/events/streamA server-sent stream of events; reconnect with Last-Event-ID to resume.readrivier keys events stream

webhook

MethodRouteWhat it doesLevelCommand
GET/webhooks/endpointsThe endpoints that receive signed events.readrivier keys webhook list
POST/webhooks/endpointsRegister an https endpoint. The signing secret is returned once.adminrivier keys webhook create
DELETE/webhooks/endpoints/{id}Remove an endpoint and its delivery log.adminrivier keys webhook remove
POST/webhooks/endpoints/{id}/enableSwitch an endpoint back on after repeated failures.adminrivier keys webhook enable
POST/webhooks/endpoints/{id}/replaySend an endpoint the events it takes from a point in the stream on.adminrivier keys webhook replay

delivery

MethodRouteWhat it doesLevelCommand
GET/webhooks/deliveriesThe delivery log: attempts, answers, and what is waiting to be retried.readrivier keys delivery list
POST/webhooks/deliveries/{id}/replaySend one delivery again.adminrivier keys delivery replay

sandbox

MethodRouteWhat it doesLevelCommand
GET/sandboxIs this key live or test, and does the project have a test project yet?readrivier keys sandbox get
POST/sandbox/seedFill the test project with a small demo brand per module, made through the API's own routes.adminrivier keys sandbox seed
GET/sandbox/deliveriesWhat the test project would have sent: calls to outside services, recorded and not made.readrivier keys sandbox deliveries

app

MethodRouteWhat it doesLevelCommand
GET/oauth/appsThe third-party apps registered for the project.readrivier keys app list
POST/oauth/appsRegister an app: its redirect addresses and the most it may ask for. A confidential client's secret is returned once.adminrivier keys app create
DELETE/oauth/apps/{id}Switch an app off and end every grant it holds.adminrivier keys app remove
MethodRouteWhat it doesLevelCommand
GET/oauth/authorizeWhat the consent screen shows: the app, the scopes (bounded by the person's role) and where it returns.readrivier keys consent get
POST/oauth/authorizeThe person's decision; answers the address to send the browser to.writerivier keys consent decide

grant

MethodRouteWhat it doesLevelCommand
DELETE/oauth/grantsTake back what you handed out: every app, or one with ?appId.writerivier keys grant revoke