Skip to content

Webhooks: receive Traaker events and verify signatures

A webhook sends your URL each Traaker event as it happens, into your own tools: Make, n8n, Zapier or a server of your own. The message carries everything (the full article, the report values): no follow-up call is needed.

This page is the guide. The detailed format of each event, with an example, is in the API and webhooks reference.

  1. Open Settings then Integrations, Webhooks section.
  2. Click Add a webhook, enter the URL that will receive the messages and choose the events, split into two groups: Content and Notifications.
  3. Copy the signing secret: it is shown only once, when you create the webhook. Each webhook has its own.

Notification events are sent only if the notification type is enabled with the webhook channel in Settings then Notifications.

Each delivery is a POST request with a JSON body and three headers:

Header Value
Content-Type application/json
X-Traaker-Event The event name, for example article.generated
X-Traaker-Signature sha256= followed by the signature in hexadecimal

Verify the signature before processing a message: it proves the message comes from Traaker and was not altered.

  1. Compute an HMAC-SHA256 of the raw request body (the bytes as received, before any JSON parsing), using the webhook secret as the key.
  2. Hex-encode the result.
  3. Compare it to the value after sha256= in X-Traaker-Signature, with a constant-time comparison. Reject the request when they differ.

Node.js example:

import crypto from 'node:crypto';
function isValidSignature(rawBody, header, secret) {
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const a = Buffer.from(expected);
const b = Buffer.from(header ?? '');
return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Python example:

import hashlib
import hmac
def is_valid_signature(raw_body: bytes, header: str, secret: str) -> bool:
expected = "sha256=" + hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected.encode(), (header or "").encode())

In both cases, raw_body is the body exactly as received. If your framework turns it into a JSON object before you get it, the computed signature will not match: get the raw body.

  • Answer with any 2xx code within 10 seconds. Do the processing after answering.
  • Retries: Traaker tries up to 3 times (waits of 0 s, 2 s then 8 s before each attempt) on a timeout, a network error, a 5xx or a 429. Any other 4xx stops the retries.
  • Exception: article.generated is attempted only once.
  • Duplicates: a retry resends exactly the same body, so the same signature. If your handler can run twice, deduplicate on the X-Traaker-Signature header.
  • The Send a test button sends a fake article.generated event: brandId and articleId are "test", and the title is “Test Traaker”. Recognize these values in your integration to ignore the message.
  • Each webhook keeps its latest deliveries with their HTTP status, in its Delivery log.
Event When it is sent
article.generated A new piece of content is ready in the Content Studio. The message carries the full article and every channel variant. Attempted once.
article.published A Studio piece of content was published. Same body as article.generated, plus the status and, when known, the published URL.
article.dismissed A Studio piece of content was archived without being published. Same body as article.published, with status dismissed.
Event When it is sent
notification.global_report A condensed summary of the brand’s overall scores and their change, at the cadence set in Settings then Notifications. No AI commentary.
notification.score_report A detailed score report with an AI analysis of the change since the previous period.
notification.competitor_news Recent events detected for the tracked competitors (new content, notable changes), at most 20 per message.
notification.score_degradation A monitored score dropped past the configured threshold for the configured number of consecutive runs.
notification.tasks_recos Tasks completed and still open since the last message. With no tasks, the message carries recommendation ideas.
notification.credit_alert The available credit balance dropped below the configured threshold.
notification.audit_failed Audits that produced no result, grouped by axis and reason. At most once a day and 5 times a month.

A content audit created through the REST API can receive a callback URL, callbackUrl. It is called at the end of each run with { contentAuditId, runId, status, counts, score }, and signed with the account’s webhook secret when there is one.

This mechanism is distinct from the ten events above. Its details are in the reference.