AperioFlow Start free

Docs API reference

API: security webhooks

5 endpoints. Send your API key as Authorization: Bearer <key> on each request; see The API and AI assistants for keys, errors, idempotency and the conventions every endpoint shares.

GET /api/projects/{id}/security-webhook

The project's security webhook address (null when there is none; the secret is never shown again)

Parameters:

NameInTypeRequiredDescription
idpathintegerYesFrom 1 to 2147483647.

Responses:

StatusMeaning
200project_id, webhook_url, created_at and rotated_at, or null
401Missing or invalid API key (Error)
404Item (or its parent) does not exist (Error)

POST /api/projects/{id}/security-webhook

Make the project's security webhook (admins); the answer holds its secret, shown this once

Parameters:

NameInTypeRequiredDescription
idpathintegerYesFrom 1 to 2147483647.

Responses:

StatusMeaning
201project_id, webhook_url, created_at, rotated_at and secret
401Missing or invalid API key (Error)
403Only admins and owners can make one
404Item (or its parent) does not exist (Error)
409The project already has one

DELETE /api/projects/{id}/security-webhook

Delete the project's security webhook (admins); its address stops working at once

Parameters:

NameInTypeRequiredDescription
idpathintegerYesFrom 1 to 2147483647.

Responses:

StatusMeaning
204Deleted
401Missing or invalid API key (Error)
403Only admins and owners can delete it
404Item (or its parent) does not exist (Error)

POST /api/projects/{id}/security-webhook/rotate

Give the webhook a new secret (admins); the old one stops working at once. Shown this once.

Parameters:

NameInTypeRequiredDescription
idpathintegerYesFrom 1 to 2147483647.

Responses:

StatusMeaning
200The webhook with its new secret
401Missing or invalid API key (Error)
403Only admins and owners can rotate it
404Item (or its parent) does not exist (Error)

POST /webhooks/security/{publicId}

Send a security alert from any tool (signed, no API key)

Sign each request with the webhook's secret. Send X-AperioFlow-Timestamp (Unix seconds, within 5 minutes of now) and X-AperioFlow-Signature: v1=<hex>, where <hex> is the lowercase hex HMAC-SHA256 of <timestamp>.<raw body> under the secret. A bad or old signature answers 401 and nothing is read. The same signed request twice is recorded once. Up to 60 alerts a minute per webhook. The alert becomes a security issue in the project; alerts with the same source and fingerprint (or title) share one. A critical alert sends a push notification; others do not.

Parameters:

NameInTypeRequiredDescription
publicIdpathstringYesThe random id in the webhook address.
X-AperioFlow-TimestampheaderstringYes
X-AperioFlow-SignatureheaderstringYes

Request body (application/json, required).

FieldTypeRequiredDescription
titlestringYesUp to 300 characters.
severitystringNoOne of: critical, high, medium, low, info. Default "medium".
sourcestringNoDefault "webhook". Up to 100 characters.
fingerprintstringNoGroups alerts into one issue. The title when left out. Up to 200 characters.
detailsobjectNoUp to 8 KB as JSON. Shown on the issue. Send as little personal data as you can.
statusstringNoFollow the tool's own state. Left out. One of: open, resolved.

Responses:

StatusMeaning
200The same signed request was already recorded
202Recorded: project_id and the issue it joined
400The request body is invalid or is not valid JSON (Error)
401Missing
404Unknown webhook
429Too many alerts. See the Retry-After header.

Start free All the docs Video guides

Built for the people who write the code and answer the phone when it breaks.

Run from the UK. Hosted in the UK and Europe.

UK time --:--

Already in?Open the app Start free today
View our policies