Scalar DevelopersScalar Developers
User Guide
API Reference
FAQs
User Guide
API Reference
FAQs
  • Getting started

    • API Quick Start
    • API Authentication
    • API Responses
    • API Pagination
    • API Rate Limiting
    • Webhooks API
  • Resources

    • Announcements API
    • Boards API
    • Customers API
    • Ideas API
    • Idea States API
    • Surveys API
    • Topics API

Webhooks API

The Webhooks API allows you to receive real-time notifications when important events occur in Scalar. This is ideal for syncing data with external systems or triggering custom workflows.


Overview

When an event occurs, Scalar sends an HTTP POST request to your configured URL. Each request includes security headers and a JSON payload.

Headers

HeaderDescription
X-Scalar-SignatureHMAC-SHA256 signature for payload verification.
X-Scalar-EventThe event type (e.g. idea.created).
X-Scalar-Delivery-IdUnique identifier for this specific delivery attempt.

Available event types

EventDescription
idea.createdA new idea has been submitted and approved.
idea.status_changedAn idea's status has been updated.
idea.votedAn idea has received a new upvote.
survey.response_createdA new response to a survey has been submitted.
announcement.publishedA new announcement has been published.
customer.createdA new customer has been added to your company.
customer.approvedA customer account has been approved.

Configuration

Webhooks are configured in the Scalar dashboard under Settings > Webhooks (located in the API & Integrations section).


Security and verification

To ensure a webhook was sent by Scalar, you should verify the X-Scalar-Signature using your webhook secret.

Signature verification (Python)

import hmac
import hashlib
import json

def verify_signature(payload: dict, signature: str, secret: str) -> bool:
    message = json.dumps(payload, separators=(",", ":"), sort_keys=True)
    expected = hmac.new(
        secret.encode(),
        message.encode(),
        hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, signature)

Payload format

All webhook payloads follow this consistent structure:

{
    "event": "idea.created",
    "timestamp": "2025-01-15T10:30:00Z",
    "data": {
        "id": 123,
        "slug": "dark-mode-abc123",
        "title": "Dark Mode",
        ...
    }
}

Retry behaviour

Scalar automatically retries failed webhook deliveries using exponential backoff:

AttemptDelay
1Immediate
2After 1 minute
3After 5 minutes
4After 5 minutes

After 4 failed attempts, the delivery is marked as failed. If an endpoint accumulates 10 consecutive failures across any deliveries, it is automatically disabled to prevent further failed requests.


Best practices

  1. Respond quickly: Return a 2xx status code within 10 seconds.
  2. Be idempotent: Handle duplicate deliveries gracefully using the X-Scalar-Delivery-Id.
  3. Verify signatures: Always check the signature before processing the payload.
  4. Use HTTPS: Your webhook URL must use HTTPS.
  5. Monitor failures: Re-enable disabled endpoints in the dashboard after fixing issues.
Last Updated: 19/02/2026, 05:48
Contributors: Tlotlego Mogapi
Prev
API Rate Limiting