REST API and webhooks

Send a notification to one subscriber from your backend, record events, manage campaigns and segments, and get signed webhooks when things happen.

The REST API starts on Pro (5 keys); Business includes 20 keys.

What’s included

  • JSON REST API covering websites, subscribers, segments, campaigns, flows and statistics
  • Personal notifications to a single subscriber, for alerts and receipts
  • Read or read/write API keys, stored as SHA-256 hashes
  • Idempotency-Key header on POST requests so retries never double-send
  • Webhooks signed with HMAC-SHA256 (Standard Webhooks format)
  • Import your existing VAPID key pair so current subscribers keep working

Example: notify one user

curl -X POST https://superwicket.com/api/v1/websites/WEBSITE_UID/personal \
  -H "Authorization: Bearer swk_YOUR_KEY" \
  -H "Idempotency-Key: order-1042-shipped" \
  -H "Content-Type: application/json" \
  -d '{"custom":{"key":"external_id","value":"usr_42"},
       "message":{"title":"Your order shipped","body":"Track parcel #1042","url":"https://example.com/orders/1042"}}'

Find the subscriber by their SuperWicket ID or by a custom field you set with superwicket.setParams({external_id: 'usr_42'}) in the browser. The full list of endpoints is in the API reference.

Questions about rEST API and webhooks

What is the API rate limit?

120 requests a minute per API key by default.

How do I verify a webhook?

Each request carries webhook-id, webhook-timestamp and webhook-signature headers. Compute HMAC-SHA256 over id.timestamp.body with your secret and compare.