POST/v1/webhooks

Configure Webhooks

Configures webhook endpoints to receive real-time POST notifications for events like audit completions, score changes, and campaign phase transitions.

Bearer token required. Minimum plan: Agency.

Request Body

ParameterTypeRequiredDescription
urlstringRequiredHTTPS URL to receive webhook POST requests.
eventsstring[]RequiredEvents to subscribe to: "audit.completed", "score.changed", "campaign.phase_changed".
secretstringOptionalShared secret for webhook signature verification.
Request
curl -X POST "https://api.onprism.io/v1/webhooks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/prism",
    "events": ["audit.completed", "score.changed"],
    "secret": "whsec_your_signing_secret"
  }'
Response (200 OK)
{
  "id": "wh_p9x2k",
  "url": "https://yourapp.com/webhooks/prism",
  "events": ["audit.completed", "score.changed"],
  "status": "active",
  "created_at": "2026-02-24T12:00:00Z"
}

Error Codes

400

Invalid URL

Webhook URL must use HTTPS.

401

Unauthorized

Missing or invalid API key.

422

Invalid Events

One or more event names are not recognized.