Skip to main content

Webhooks

Webhooks

Deliver Selwise events to custom HTTP destinations with auth, retry, and delivery logging controls.

Audience: Backend and integration teams consuming Selwise events in external systems.

Critical: Webhook routes are dedicated under /api/v1/sites/:siteId/integrations/webhooks and are not provider aliases.

Who This Page Is For

Use this page when you need to push Selwise events into internal platforms, CDPs, or custom automation systems.

Quick Start (2-5 Minutes)

1

Create webhook endpoint

Define destination URL, events, auth, and retry policy.

POST /api/v1/sites/:siteId/integrations/webhooks
2

List and verify

Review active webhooks and their settings.

GET /api/v1/sites/:siteId/integrations/webhooks
3

Run webhook test

Send test payload to endpoint before production use.

POST /api/v1/sites/:siteId/integrations/webhooks/:webhookId/test
4

Inspect delivery logs

Review status, failures, and retries.

GET /api/v1/sites/:siteId/integrations/webhooks/:webhookId/logs?limit=50
5

Update or disable

Patch destination/auth/events or deactivate webhook.

PUT /api/v1/sites/:siteId/integrations/webhooks/:webhookId

Webhook endpoints

GET    /api/v1/sites/:siteId/integrations/webhooks
POST   /api/v1/sites/:siteId/integrations/webhooks
GET    /api/v1/sites/:siteId/integrations/webhooks/:webhookId
PUT    /api/v1/sites/:siteId/integrations/webhooks/:webhookId
DELETE /api/v1/sites/:siteId/integrations/webhooks/:webhookId
POST   /api/v1/sites/:siteId/integrations/webhooks/:webhookId/test
GET    /api/v1/sites/:siteId/integrations/webhooks/:webhookId/logs

Required Fields / Minimum Payload

FieldRequiredTypeUsed by eventsDescription
nameRequiredstringCreate webhookOperational identifier for webhook.
urlRequiredURLCreate/update webhookDestination endpoint for deliveries.
eventsOptionalstring[]Create/update webhookSubscribed event names.
authType and authConfigOptionalnone | bearer | basic | hmac | signature | api_keyCreate/update webhookAuthentication strategy and credentials.
retryPolicyOptional{maxAttempts,initialDelay,backoffMultiplier}Create/update webhookRetry strategy tuning.
isActiveOptionalbooleanCreate/update webhookEnable/disable webhook without deleting configuration.

Event or Endpoint Decision Matrix

ScenarioUse ThisWhy
Add new downstream consumerPOST /integrations/webhooksCreates isolated webhook config per consumer.
Validate receiver readinessPOST /integrations/webhooks/:webhookId/testPre-launch delivery validation.
Investigate failuresGET /integrations/webhooks/:webhookId/logsVisibility into statuses and retries.
Temporarily stop deliveriesPUT ... isActive=falseSafe pause without config loss.
Permanently retire endpointDELETE webhookRemoves obsolete integration route.

Common Errors and Fixes

Webhook test fails with authentication error

Cause: authType/authConfig mismatch with receiver expectations.

Fix: Align auth method and secret/header values with receiver contract.

Deliveries retry repeatedly

Cause: Receiver endpoint unstable or returns non-2xx responses.

Fix: Stabilize receiver and tune retry policy as needed.

No deliveries observed

Cause: isActive false or event subscription list excludes actual events.

Fix: Enable webhook and include relevant event types.

Security concern around destination URLs

Cause: Potential internal/private destination attempts.

Fix: Use approved public endpoints and adhere to webhook URL restrictions.

Production Checklist

  • Webhook auth and retry policy are defined explicitly.Required
  • Test endpoint passes before production enablement.Required
  • Delivery logs are monitored for non-2xx patterns.Required
  • Inactive webhooks are reviewed and cleaned periodically.Required
  • Receiver SLA and backoff behavior are aligned with retry policy.Required

Next Steps