Skip to content

Webhooks

A webhook is a URL of yours that TaskTraQ calls when something happens. An administrator adds it under Admin > API & Webhooks, picks the events, and gets a signing secret once.

Events

EventWhen
request.createdA request was filed through a connected app.
request.status_changedIts status changed; data carries from and to.
request.commentedA public comment was added. Internal notes never fire.
request.resolvedIt was resolved or closed — the first time it is done (sent after status_changed).
request.releasedA release shipped it; data.releasedIn names the release.
issue.created, issue.updated, issue.commentedAny ticket or task of the workspace, for your own systems.

A webhook can also post readable messages straight into Slack or Microsoft Teams: choose that format instead of JSON.

Delivery

  • POST with a JSON body {event, sentAt, deliveryId, data}; for request.* events data is the same object the events feed returns.
  • Headers: X-TaskTraQ-Event, X-TaskTraQ-Delivery (equal to deliveryId), X-TaskTraQ-Signature-256.
  • Answer with any 2xx within 10 seconds. Anything else is retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours; 410 Gone stops at once. Redirects are not followed.
  • A retry carries the same deliveryId: deduplicate on it. Order is not guaranteed; use occurredAt.
  • Only public addresses are called. Loopback, private and link-local targets are refused when the URL is saved and again at every delivery.

Verifying the signature

The header looks like t=1764496365,v1=5257a8…. Compute HMAC-SHA256 over <t>.<raw body> with your signing secret, compare it in constant time with v1, and reject a t more than five minutes away from your clock. That makes a captured delivery useless later.

// Express: keep the RAW body, the signature covers the exact bytes.
const crypto = require('node:crypto');
const express = require('express');
const app = express();
const SECRET = process.env.TTQ_WEBHOOK_SECRET; // whs_…

app.post('/tasktraq', express.raw({ type: 'application/json' }), (req, res) => {
  const header = req.get('X-TaskTraQ-Signature-256') || '';
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > 300) return res.sendStatus(400);
  const expected = crypto.createHmac('sha256', SECRET).update(`${t}.${req.body}`).digest('hex');
  const given = Buffer.from(parts.v1 || '', 'hex');
  if (given.length !== 32 || !crypto.timingSafeEqual(given, Buffer.from(expected, 'hex'))) return res.sendStatus(401);

  const delivery = JSON.parse(req.body);
  // Deduplicate on delivery.deliveryId (retries reuse it), then handle:
  console.log(delivery.event, delivery.data);
  res.sendStatus(204);
});

Hooks created before 30.11.2026 may still check the older header X-TaskTraQ-Signature (HMAC of the body alone). It is still sent; new code should use the timestamped one.

The signing secret

The secret is shown once, when the webhook is created. Lost it? Choose New secret on the webhook: the old one stops at once, so update your receiver right away. The delivery log on the same page shows every attempt of the last 30 days and can send one again.