Create a webhook endpoint
Header Parameters
SW-PARTNER-ID*string
Partner organization identifier
SW-API-KEY*string
API authentication key
Request Body
application/json
url*string
The URL to receive webhook POST requests
Format
urievents*array<>
One or more event types to subscribe to
Items
1 <= itemsactive?boolean
Whether the endpoint should start receiving deliveries immediately. Defaults to true.
Default
trueResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://connect.safeweb.co/api/integrations/webhooks" \ -H "SW-PARTNER-ID: string" \ -H "SW-API-KEY: string" \ -H "Content-Type: application/json" \ -d '{ "url": "https://partner.example.com/webhooks/safeweb", "events": [ "breach.new", "breach.resolved", "breach.unresolved", "email.added", "email.removed" ] }'{
"success": true,
"webhook": {
"id": 1,
"url": "https://partner.example.com/webhooks/safeweb",
"secret": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"events": [
"breach.new",
"breach.resolved",
"breach.unresolved",
"email.added",
"email.removed"
],
"active": true,
"created_at": "2026-03-18T12:00:00.000Z"
}
}{
"success": false,
"error": "Invalid JSON in request body"
}{
"success": false,
"error": "Failed to verify org API key"
}{
"success": false,
"error": "Partner ID and API key are required in headers"
}{
"success": false,
"error": "Failed to create webhook"
}List webhook endpoints GET
Returns all webhook endpoints registered for the authenticated partner organization, ordered by most recently created first.
Update a webhook endpoint PATCH
Updates one or more fields on an existing webhook endpoint. Only provide the fields you want to change. The endpoint must belong to the authenticated partner organization.