SafeWeb API

Update a webhook endpoint

PATCH
/api/integrations/webhooks/{id}

Path Parameters

id*integer

Webhook endpoint ID

Formatint64

Header Parameters

SW-PARTNER-ID*string

Partner organization identifier

SW-API-KEY*string

API authentication key

Request Body

application/json

url?string

New URL for webhook deliveries

Formaturi
events?array<>

Replacement set of event subscriptions

Items1 <= items
active?boolean

Enable or disable the endpoint

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://connect.safeweb.co/api/integrations/webhooks/0" \  -H "SW-PARTNER-ID: string" \  -H "SW-API-KEY: string" \  -H "Content-Type: application/json" \  -d '{    "url": "https://partner.example.com/webhooks/v2"  }'
{
  "success": true,
  "webhook": {
    "id": 1,
    "url": "https://partner.example.com/webhooks/v2",
    "events": [
      "breach.new",
      "email.added",
      "email.removed"
    ],
    "active": true,
    "created_at": "2026-03-18T12:00:00.000Z"
  }
}

{
  "success": false,
  "error": "Invalid webhook ID"
}

{
  "success": false,
  "error": "Failed to verify org API key"
}
{
  "success": false,
  "error": "Webhook not found"
}

{
  "success": false,
  "error": "Partner ID and API key are required in headers"
}

{
  "success": false,
  "error": "Failed to update webhook"
}