Webhooks
Receive real-time notifications when events occur in your Trakkr account. Integrate with Zapier, Make, Slack, Discord, and more.
Overview
Webhooks allow you to receive real-time HTTP notifications when events occur in your Trakkr account. Instead of polling for changes, webhooks push data to your endpoint the moment something happens.
Supported Integrations
- • Generic webhooks (any HTTPS endpoint)
- • Zapier and Make (Integromat)
- • Slack (with rich block formatting)
- • Discord (with embed formatting)
- • Microsoft Teams (with adaptive cards)
Event Types
Subscribe to one or more event types when creating a webhook:
| Event | Description |
|---|---|
visibility_changed | Visibility score increased or decreased significantly |
report_completed | A new research report has been generated |
competitor_added | A new competitor was detected or added |
citation_gained | Brand gained a new citation source |
citation_lost | Brand lost a citation source |
Create Webhook
Register a new webhook endpoint to receive event notifications.
Body Parameters
urlstringrequiredThe webhook endpoint URL (must be HTTPS in production)
eventsarrayrequiredArray of event types to subscribe to
brand_idstringrequiredBrand UUID to receive events for
auth_typestringAuthentication: "none", "bearer", "basic", or "api_key"
Default: "none"
auth_tokenstringBearer token (if auth_type is "bearer")
signing_secretstringSecret for HMAC-SHA256 signature verification
headersobjectCustom headers to include in webhook requests
The Webhook Object
Webhook Schema
idstringUnique webhook identifier
objectstringAlways "webhook"
urlstringThe webhook endpoint URL
eventsarraySubscribed event types
brand_idstringBrand UUID this webhook receives events for
providerstringDetected provider: "webhook", "zapier", "make", "discord", "slack", "teams_webhook"
activebooleanWhether the webhook is currently active
signing_secretstringnullableSecret for verifying webhook signatures
created_atstringISO 8601 creation timestamp
Payload Format
Webhook payloads follow a consistent structure across all event types:
Payload Schema
eventobjectEvent details including type, timestamp, and data
brandobjectBrand information (id, name, website)
workflowobjectnullableWorkflow that triggered this event
summarystringHuman-readable summary of the event
metaobjectMetadata including source, version, and idempotency key
meta.event_id field for idempotency. Store processed event IDs to prevent duplicate handling if a webhook is retried.Payload Templating
Customize webhook payloads using variable substitution with double curly braces:
{
"text": "Alert: {{brand.name}} visibility changed!",
"score": "{{event.data.current_score}}",
"change": "{{event.data.change_percent}}%"
}Available Variables
{{brand.id}}{{brand.name}}{{brand.website}}{{event.type}}{{event.data.*}}{{summary}}{{workflow.name}}{{timestamp}}Authentication
Secure your webhook endpoints with one of the supported authentication methods:
Bearer Token
Set auth_type: "bearer" and provide auth_token. The token is sent in the Authorization: Bearer header.
Basic Auth
Set auth_type: "basic" with auth_username and auth_password.
API Key Header
Set auth_type: "api_key" with api_key_header and api_key_value.
Signature Verification
Verify webhook authenticity using HMAC-SHA256 signatures. When you provide asigning_secret, every request includes an X-Trakkr-Signature header.
X-Trakkr-Signature: sha256=abc123def456...
Verification Example (Python)
import hmac
import hashlib
def verify_signature(payload: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(
secret.encode(),
payload,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature)Retry Logic
Webhooks are retried automatically on failure with exponential backoff:
3 retries with delays of 1s, 2s, 4s (exponential backoff)
5xx errors and timeouts trigger retries
429 rate limits respect the Retry-After header
Provider-Specific Formatting
Trakkr automatically formats payloads for popular platforms:
Discord
Rich embeds with title, description, fields, and Trakkr green accent color.
Slack
Block Kit formatting with headers, sections, and context elements.
Zapier & Make
Standard JSON payload with all fields available for mapping.
Quick Reference
| Endpoint | Description |
|---|---|
POST /webhooks | Create a webhook |
GET /webhooks | List webhooks |
GET /webhooks/:id | Retrieve a webhook |
DELETE /webhooks/:id | Delete a webhook |
POST /webhooks/:id/test | Send a test webhook |
