Webhooks

Receive real-time notifications when events occur in your project.

Available Events

Event Description
waitlist.signup Waitlist Signup
waitlist.referral Waitlist Referral
feedback.created Feedback Created
feedback.voted Feedback Voted
feedback.status_changed Feedback Status Changed
changelog.published Changelog Published

Request Headers

Header Description
X-Premonize-Event The event type that triggered this webhook
X-Premonize-Delivery Unique ID for this delivery attempt
X-Premonize-Timestamp Unix timestamp when the webhook was sent
X-Premonize-Signature HMAC-SHA256 signature for payload verification

Payload Example

waitlist.signup

{
  "event": "waitlist.signup",
  "timestamp": "2024-01-20T14:30:00Z",
  "data": {
    "subscriber": {
      "id": 1250,
      "email": "[email protected]",
      "name": "John Doe",
      "position": 1250,
      "referral_code": "abc123"
    },
    "project": {
      "id": 42,
      "name": "MyAwesomeApp",
      "subdomain": "myapp"
    }
  }
}

changelog.published

{
  "event": "changelog.published",
  "timestamp": "2024-01-20T15:00:00Z",
  "data": {
    "post": {
      "id": 15,
      "title": "New Feature Release",
      "type": "new",
      "version": "2.0.0",
      "url": "https://myapp.premonize.com/changelog/new-feature-release"
    }
  }
}

Signature Verification

Verify the X-Premonize-Signature header to ensure requests are authentic

// PHP Example
$signature = hash_hmac(
    'sha256',
    $payload,
    $webhook_secret
);

if (hash_equals($signature, $received_signature)) {
    // Valid signature
}
// Node.js Example
const crypto = require('crypto');

const signature = crypto
  .createHmac('sha256', webhookSecret)
  .update(payload)
  .digest('hex');

if (signature === receivedSignature) {
  // Valid signature
}

Retry Policy

Failed webhook deliveries are automatically retried:

  • First retry: 1 minute after failure
  • Second retry: 5 minutes after first retry
  • Third retry: 30 minutes after second retry

Was this page helpful?

Your feedback helps us improve our documentation

Thank you for your feedback!

Your input helps us create better documentation for everyone