projqoDevelopers

Guide

Webhooks

Subscribe to changes, check each delivery's signature, and handle retries and the delivery log.

A webhook sends each change in projqo to an address of yours, as it happens, instead of your code asking again and again. Deliveries are signed, retried when your address doesn't answer, and logged for 30 days.

Subscribing

An app subscribes with the API, at /api/v1/orgs/{org}/webhooks, with the scope webhooks:manage:

  • the address that receives the deliveries;
  • the events it wants;
  • optionally, the projects it wants them from, or a task query in the query language that a task must match.

To subscribe to an event, the token also needs the read scope of what the event carries: an app without docs:read can't subscribe to page events.

A subscription made by an app belongs to that app's connection: it goes when the person disconnects the app. Organisation admins see it on their Webhooks page, marked with the app's name, and can switch it off there.

Creating a subscription sends a ping event to the address, and Send a test (POST …/webhooks/{webhook}/test) sends one again at any time.

cURL
curl -X POST "https://<your projqo address>/api/v1/orgs/{org}/webhooks" \
  -H "Authorization: Bearer $PROJQO_TOKEN" -H "Content-Type: application/json" \
  -d '{"url": "https://hooks.example.com/projqo",
       "events": ["task_created", "task_updated"],
       "projects": ["WEB"]}'

The body takes url (https, no variables), events, and optionally name, projects and spaces (keys or ids: only events about their things; Docs events are narrowed by spaces, everything in a project by projects; events about neither, such as people, aren't narrowed), task_query (only task events whose task matches it) and enabled. The answer holds the subscription and its secret, shown only this once. A token or app connection has at most 20 subscriptions, and each is listed, read, changed and deleted only through the token or app that made it.

  • A subscription stops when its token is revoked or expires, when its person leaves the organisation or becomes a guest, or when its app's connection ends (it is deleted with the connection, or with a revoked token).
  • enabled: false switches it off and enabled: true on again, except when an organisation admin switched it off: then only they can.

The events

EventWhenGroupNeeds
task_createdTask createdTaskstasks:read
task_updatedTask updatedTaskstasks:read
task_deletedTask deletedTaskstasks:read
comment_createdComment createdCommentstasks:read
comment_updatedComment updatedCommentstasks:read
comment_deletedComment deletedCommentstasks:read
worklog_createdWork log createdWork logsworklogs:read
worklog_updatedWork log updatedWork logsworklogs:read
worklog_deletedWork log deletedWork logsworklogs:read
attachment_createdFile attachedFiles and linkstasks:read
attachment_deletedFile removedFiles and linkstasks:read
link_createdLink createdFiles and linkstasks:read
link_deletedLink removedFiles and linkstasks:read
sprint_createdSprint createdSprintsboards:read
sprint_deletedSprint deletedSprintsboards:read
sprint_updatedSprint updatedSprintsboards:read
sprint_startedSprint startedSprintsboards:read
sprint_closedSprint closedSprintsboards:read
board_createdBoard createdBoardsboards:read
board_deletedBoard deletedBoardsboards:read
board_updatedBoard updatedBoardsboards:read
board_settings_changedBoard settings changedBoardsboards:read
version_releasedRelease releasedReleasesprojects:read
version_unreleasedRelease unreleasedReleasesprojects:read
version_createdRelease createdReleasesprojects:read
version_movedRelease movedReleasesprojects:read
version_updatedRelease updatedReleasesprojects:read
version_mergedRelease mergedReleasesprojects:read
version_deletedRelease deletedReleasesprojects:read
project_createdProject createdProjectsprojects:read
project_updatedProject updatedProjectsprojects:read
project_deletedProject deletedProjectsprojects:read
project_trashedProject moved to the trashProjectsprojects:read
project_restoredProject restoredProjectsprojects:read
project_archivedProject archivedProjectsprojects:read
task_type_createdTask type createdTask typesprojects:read
task_type_updatedTask type updatedTask typesprojects:read
task_type_deletedTask type deletedTask typesprojects:read
filter_createdFilter createdFiltersfilters:read
filter_updatedFilter updatedFiltersfilters:read
filter_deletedFilter deletedFiltersfilters:read
person_addedPerson addedPeoplepeople:read
person_removedPerson removedPeoplepeople:read
person_changedPerson changedPeoplepeople:read
option_changedAn option switchedOptionsorg:read
space_createdSpace createdSpacesdocs:read
space_updatedSpace updatedSpacesdocs:read
space_deletedSpace deletedSpacesdocs:read
page_createdPage createdPagesdocs:read
page_publishedPage publishedPagesdocs:read
page_updatedPage updatedPagesdocs:read
page_movedPage movedPagesdocs:read
page_trashedPage moved to the trashPagesdocs:read
page_restoredPage restoredPagesdocs:read
page_deletedPage deletedPagesdocs:read
page_comment_createdPage comment createdPage commentsdocs:read
page_comment_updatedPage comment updatedPage commentsdocs:read
page_comment_deletedPage comment deletedPage commentsdocs:read

The webhook events reference shows each event's data. For a thing the API can read, data is exactly what its GET answers (a task, a comment, a release…). For a thing that is gone, such as a deleted comment, or one the API has no call for yet, it is a WebhookItem: its id, its kind and what it belongs to. A deleted comment, work log, file or link goes to whoever can still open its task; a deleted task to whoever could open it; a deleted page (by id, without its title) to whoever can open its space; anything else that is gone (a project, release, person, space, sprint, board, task type or filter) only to subscriptions whose person is an owner or admin of the organisation.

ping isn't subscribed to: it comes on creating a subscription and with Send a test.

What a delivery looks like

projqo sends a POST with a JSON body, the envelope:

JSON
{
  "id": "…",
  "event": "task_updated",
  "created_at": "2026-12-01T09:30:00Z",
  "api_version": "v1",
  "organisation": { "id": "…", "address": "acme" },
  "actor": { "id": "…", "name": "Zoe Patel" },
  "data": { … }
}
  • id is the delivery's id. A delivery can arrive more than once: use the id to skip one you've already handled.
  • data is the thing that changed, exactly as GET returns it in v1.
  • actor is the person who made the change, or null when projqo made it.
  • api_version is v1. A field may be added within v1; one is never taken away or renamed.

And these headers:

HeaderHolds
X-Projqo-EventThe event, such as task_updated.
X-Projqo-DeliveryThe delivery's id.
X-Projqo-TimestampWhen it was signed, in seconds since 1970 (UTC).
X-Projqo-Signaturesha256= and the signature, in hex.
X-Projqo-Signature-PreviousFor 24 hours after a rotation: the signature with the old secret.

A delivery is prepared as the person whose app or token made the subscription, when it is sent: something that person can't open (any more) is skipped and logged with the reason, never sent. The token or app must still have the event's read scope.

Checking the signature

Each subscription has its own secret, shown once when it is made. projqo signs every delivery with it: the signature is HMAC-SHA256, keyed with the secret, over the timestamp, a full stop, and the body exactly as sent:

Text
sha256=hex(HMAC_SHA256(secret, "<X-Projqo-Timestamp>.<body>"))

Check every delivery before you trust it:

  1. Read the body as raw bytes, before any JSON parsing.
  2. Refuse a timestamp more than 5 minutes away from your clock, so an old delivery can't be sent again by someone who caught it.
  3. Work out the signature yourself and compare it with the sent one in constant time.
JavaScript
import { createHmac, timingSafeEqual } from "node:crypto";

const FIVE_MINUTES = 5 * 60;

/** True when the delivery was signed with `secret` in the last five minutes. */
export function checkSignature(rawBody, headers, secret, now = Date.now()) {
  const timestamp = String(headers["x-projqo-timestamp"] ?? "");
  if (!/^\d+$/.test(timestamp) || Math.abs(now / 1000 - Number(timestamp)) > FIVE_MINUTES)
    return false;
  const expected = Buffer.from(
    "sha256=" + createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex"),
  );
  // While a secret is being rotated, a second signature is sent too: either may match.
  const sent = Object.entries(headers)
    .filter(([name]) => name.toLowerCase().startsWith("x-projqo-signature"))
    .flatMap(([, value]) => String(value).split(","))
    .map((s) => Buffer.from(s.trim()));
  return sent.some((s) => s.length === expected.length && timingSafeEqual(s, expected));
}

And a receiver that uses it:

JavaScript
import { createServer } from "node:http";
import { checkSignature } from "./check-signature.mjs";

createServer(async (req, res) => {
  const chunks = [];
  for await (const chunk of req) chunks.push(chunk);
  const raw = Buffer.concat(chunks).toString("utf8");
  if (!checkSignature(raw, req.headers, process.env.PROJQO_WEBHOOK_SECRET)) {
    res.writeHead(401).end();
    return;
  }
  const delivery = JSON.parse(raw);
  res.writeHead(204).end(); // answer first, then do the work
  console.log(delivery.event, delivery.id);
}).listen(8080);

Rotating the secret

A subscription's secret can be rotated with POST …/webhooks/{webhook}/rotate-secret, which answers the new secret (shown only then). For 24 hours after, each delivery is signed with both the new and the old secret, the old one in X-Projqo-Signature-Previous, so a receiver still holding the old secret keeps working while you deploy the new one. Rotating again within those 24 hours ends the older secret at once. The examples above accept either signature.

Answering a delivery

  • Answer with any 2xx status within 10 seconds. Do the work after answering, or in a queue.
  • Anything else (another status, no answer in time, a redirect) counts as a failure. projqo doesn't follow redirects.

Retries

A failed delivery is tried again after 30 seconds, 2 minutes, 8 minutes, 32 minutes and about 2 hours. After that it is marked failed.

A subscription whose deliveries keep failing is switched off: after 50 failed deliveries in a row (each after its retries), or after 3 days of nothing but failures. Who is emailed: for an app's subscription, the owners and admins of the organisation that registered the app; for a token's, the token's person. It stays off until it is switched on again by hand (PATCH with enabled: true), and its count starts again. The subscription's health shows the failures in a row, since when it has been failing and its last success; switched_off.reason says failing.

The delivery log

Every delivery is kept for 30 days: its status (queued, sent, failed or skipped), the attempts, your answer's status code, how long it took, and the reason it failed or was skipped. Read it with GET …/webhooks/{webhook}/deliveries (newest first, status= to narrow it) or on the Webhooks page in projqo, and Redeliver a finished one (POST …/deliveries/{delivery}/redeliver) to send it again, with the same id, prepared again as the subscription's person.

How many a day

Each organisation can receive a number of deliveries a day, by its plan (see rate limits), counted per UTC day. Over it, deliveries wait until midnight (UTC), nothing is lost, and the organisation's owners and admins are emailed once that day.