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:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
Responses:
| Status | Meaning |
|---|---|
| 200 | project_id, webhook_url, created_at and rotated_at, or null |
| 401 | Missing or invalid API key (Error) |
| 404 | Item (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:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
Responses:
| Status | Meaning |
|---|---|
| 201 | project_id, webhook_url, created_at, rotated_at and secret |
| 401 | Missing or invalid API key (Error) |
| 403 | Only admins and owners can make one |
| 404 | Item (or its parent) does not exist (Error) |
| 409 | The project already has one |
DELETE /api/projects/{id}/security-webhook
Delete the project's security webhook (admins); its address stops working at once
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
Responses:
| Status | Meaning |
|---|---|
| 204 | Deleted |
| 401 | Missing or invalid API key (Error) |
| 403 | Only admins and owners can delete it |
| 404 | Item (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:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
Responses:
| Status | Meaning |
|---|---|
| 200 | The webhook with its new secret |
| 401 | Missing or invalid API key (Error) |
| 403 | Only admins and owners can rotate it |
| 404 | Item (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:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
publicId | path | string | Yes | The random id in the webhook address. |
X-AperioFlow-Timestamp | header | string | Yes | |
X-AperioFlow-Signature | header | string | Yes |
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Up to 300 characters. |
severity | string | No | One of: critical, high, medium, low, info. Default "medium". |
source | string | No | Default "webhook". Up to 100 characters. |
fingerprint | string | No | Groups alerts into one issue. The title when left out. Up to 200 characters. |
details | object | No | Up to 8 KB as JSON. Shown on the issue. Send as little personal data as you can. |
status | string | No | Follow the tool's own state. Left out. One of: open, resolved. |
Responses:
| Status | Meaning |
|---|---|
| 200 | The same signed request was already recorded |
| 202 | Recorded: project_id and the issue it joined |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing |
| 404 | Unknown webhook |
| 429 | Too many alerts. See the Retry-After header. |