Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.saytics.com/llms.txt

Use this file to discover all available pages before exploring further.

Saytics webhooks let you forward event data to any HTTP endpoint the moment events are tracked, enabling real-time integrations with your own systems and third-party tools.

Use cases

  • Sync Saytics events to your data warehouse
  • Trigger workflows in Zapier or Make
  • Update CRM records when key events fire
  • Send transactional emails on specific user actions

Registering a webhook

1

Open Webhooks settings

Go to Settings → Webhooks.
2

Add a new webhook

Click Add Webhook.
3

Enter your endpoint URL

Enter your endpoint URL. The URL must use HTTPS.
4

Choose which events to send

Choose which events to forward — either all events, or filter by event name.
5

Save and verify

Click Save. Saytics will send a test ping to your endpoint to confirm it is reachable.

Webhook payload

Saytics sends a POST request to your endpoint with a JSON body for each event. Here is an example payload:
{
  "id": "evt_01HX9K2M3N4P",
  "event": "Subscription Upgraded",
  "userId": "user_456",
  "anonymousId": "anon_abc123",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "properties": {
    "plan": "pro",
    "mrr": 49.99
  },
  "context": {
    "ip": "203.0.113.1",
    "userAgent": "Mozilla/5.0..."
  }
}

Verifying webhook signatures

Saytics signs every webhook request with HMAC-SHA256 so you can confirm the request came from Saytics and was not tampered with. The signature is included in the X-Saytics-Signature request header. Use the following example to verify the signature in your endpoint:
const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}
You can find your webhook secret in Settings → Webhooks → your endpoint → Show Secret.

Handling retries and responses

Your endpoint must return a 2xx status code within 10 seconds to acknowledge receipt. If it does not, Saytics treats the delivery as failed.
Saytics retries failed deliveries up to 3 times with exponential backoff. Return a 2xx status code quickly to acknowledge receipt, and process the event asynchronously if your handler needs more time.