Webhooks
Webhooks senden Ereignisse per HTTPS-POST an deine URL, sobald sich etwas ändert.
Auf dieser Seite
Einrichten
Webhooks richtest du in den Workspace-Einstellungen ein oder per REST über die Webhook-Endpunkte (Scope webhooks:manage). Es gibt sie ab dem Team-Tarif, pro Workspace sind bis zu 10 Endpunkte möglich.
Zulässig ist nur https auf Port 443 oder 8443, keine privaten oder lokalen Adressen.
Ereignisse
| Ereignis | Beschreibung |
|---|---|
project.created | A project was created. |
project.updated | A project changed (rename, members, status within active states). |
project.archived | A project moved to Completed or Canceled. |
project.deleted | A project was deleted. |
task.created | A task was created. |
task.updated | A task changed (status, title, due date, priority, unassigned). |
task.completed | A task was completed. |
task.reopened | A completed task was reopened. |
task.assigned | A task was assigned. |
task.deleted | A task was deleted. |
milestone.created | A milestone was created. |
milestone.updated | A milestone changed. |
milestone.completed | A milestone was completed. |
comment.created | A comment was added. |
webhook.test | Sent only by "Send test" (UI) or POST /webhooks/{webhookId}/test. |
Payload
Jede Zustellung ist ein JSON-Objekt mit dieser Struktur:
-
idstringPflichtStable across retries; deduplicate by it.
-
typeobjectPflichtErlaubte Werte:
project.created -
occurredAtstring (date-time)Pflicht -
tenantIdstringPflicht -
actorWebhookActorPflicht3 Attribute anzeigen
-
typestringPflichtintegrationcovers API tokens and AI clients.Erlaubte Werte:
userintegrationflow -
idstring | nullPflichtUser id, token creator uid or flow id; null when unknown.
-
tokenIdstringSet for workspace API tokens. Ignore events with your own tokenId (echo protection).
-
-
dataobjectPflichtCurrent state of the object at delivery time (deleted objects: last known title).
10 Attribute anzeigen
-
idstring -
projectIdstring -
titlestring -
statusstring | null -
dueDatestring -
assigneeIdsarray of string -
externalExternalMapExternal references by source. Source keys match
^[a-z][a-z0-9_-]{1,31}$, max 5.1 Attribut anzeigen
-
<key>ExternalExternal reference to an object in another system.
5 Attribute anzeigen
-
customerIdstring -
refstring -
labelstring -
urlstring (uri)http or https.
-
metaobjectFlat object, max 20 keys; values string (max 500), number, boolean or null.
-
-
-
urlstring (uri) -
targetTypestringComments only.
-
targetIdstringComments only.
-
-
changesobjectChanged fields,
{ from, to }each.1 Attribut anzeigen
-
<key>object2 Attribute anzeigen
-
fromobject -
toobject
-
-
actor.typeistuser,integrationoderflow. Bei Tokens stehttokenIdim Actor: Ignoriere Ereignisse mit deiner eigenentokenId, damit keine Schleifen entstehen.dataist der Stand des Objekts zum Zeitpunkt der Zustellung. Bei gelöschten Objekten steht der letzte bekannte Titel darin.
{
"id": "Q8x…-e0",
"type": "task.updated",
"occurredAt": "2026-10-26T10:00:00.000Z",
"tenantId": "ws_123",
"actor": {
"type": "integration",
"id": "<uid of the token creator>",
"tokenId": "<api token id>"
},
"data": {
"id": "task_1",
"projectId": "proj_1",
"title": "New title",
"status": "In Progress",
"dueDate": "2026-11-01",
"assigneeIds": ["uid_2"],
"external": { "manager": { "customerId": "cust_123" } },
"url": "https://app.getprojectflow.com/project/proj_1/tasks/task_1"
},
"changes": { "title": { "from": "Old", "to": "New title" } }
}
Content-Type: application/json
User-Agent: ProjectFlow-Webhooks/1.0
X-ProjectFlow-Event-Id: <payload id, stable across retries>
X-ProjectFlow-Event-Type: task.updated
X-ProjectFlow-Delivery-Attempt: 1
X-ProjectFlow-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256>
Signatur prüfen
Jede Zustellung ist mit dem Geheimnis des Endpunkts signiert: X-ProjectFlow-Signature enthält den Zeitstempel t und einen HMAC-SHA256 über t, einen Punkt und den rohen Body. Prüfe die Signatur gegen den unveränderten Body.
- Lehne Signaturen ab, deren Zeitstempel älter als 5 Minuten ist.
- Vergleiche in konstanter Zeit.
- Nach einer Rotation signiert das alte Geheimnis noch 24 Stunden mit. Dann stehen zwei
v1-Werte im Header; akzeptiere die Anfrage, wenn einer passt.
const crypto = require('crypto');
app.post('/hooks/projectflow', express.raw({ type: 'application/json' }), (req, res) => {
const parts = (req.get('X-ProjectFlow-Signature') || '').split(',').map((p) => p.trim().split('='));
const t = Number(parts.find(([k]) => k === 't')?.[1]);
if (!t || Math.abs(Date.now() / 1000 - t) > 300) return res.sendStatus(400);
const expected = crypto.createHmac('sha256', process.env.PF_WEBHOOK_SECRET)
.update(`${t}.${req.body}`).digest();
const ok = parts.filter(([k]) => k === 'v1').some(([, v]) => {
const given = Buffer.from(v, 'hex');
return given.length === expected.length && crypto.timingSafeEqual(given, expected);
});
if (!ok) return res.sendStatus(401);
const event = JSON.parse(req.body);
// dedupe by event.id, ignore event.actor.tokenId === MY_TOKEN_ID, then process
res.sendStatus(204);
});import hmac, hashlib, time
def verify(raw: bytes, header: str, secret: str) -> bool:
parts = [p.strip().split('=', 1) for p in header.split(',') if '=' in p]
t = next((int(v) for k, v in parts if k == 't'), None)
if t is None or abs(time.time() - t) > 300:
return False
expected = hmac.new(secret.encode(), f"{t}.".encode() + raw, hashlib.sha256).hexdigest()
return any(hmac.compare_digest(expected, v) for k, v in parts if k == 'v1')$raw = file_get_contents('php://input');
$header = $_SERVER['HTTP_X_PROJECTFLOW_SIGNATURE'] ?? '';
$t = null; $sigs = [];
foreach (explode(',', $header) as $part) {
[$k, $v] = array_pad(explode('=', trim($part), 2), 2, '');
if ($k === 't') $t = (int) $v; elseif ($k === 'v1') $sigs[] = $v;
}
if (!$t || abs(time() - $t) > 300) { http_response_code(400); exit; }
$expected = hash_hmac('sha256', $t . '.' . $raw, getenv('PF_WEBHOOK_SECRET'));
$ok = false; foreach ($sigs as $s) { $ok = $ok || hash_equals($expected, $s); }
if (!$ok) { http_response_code(401); exit; }
$event = json_decode($raw, true);
Zustellung und Wiederholungen
- Zustellung mindestens einmal und ohne Reihenfolgegarantie: Dedupliziere über die Event-ID und entscheide anhand von
occurredAtoderupdatedAt. - Erfolg ist ein
2xxinnerhalb von 10 Sekunden. Weiterleitungen werden nicht verfolgt. - Bei Fehlern gibt es bis zu 10 Versuche in etwa 24 Stunden: nach 1, 5, 15 und 30 Minuten, dann nach 1, 2, 4, 8 und 8 Stunden.
- Danach wird der Endpunkt deaktiviert und der Owner benachrichtigt.
- Zustellungen kannst du per API einsehen und erneut senden.
Webhooks in Flows
Flows (Automatisierungen) können Webhooks senden und empfangen, ebenfalls ab dem Team-Tarif. URL und Signaturgeheimnis findest du im Flow-Editor.
- Aktion „Webhook aufrufen“: sendet JSON an deine URL, mit dem Header
X-ProjectFlow-Signaturenach demselben Schema. Der Body kann Variablen aus dem Flow enthalten. - Auslöser „Eingehender Webhook“: eine geheime URL pro Flow. Ein POST mit einem JSON-Objekt (bis 64 KB) startet den Flow; die Felder stehen als
{{payload.…}}bereit. MitIdempotency-Keystartet derselbe Schlüssel nur einen Lauf.
curl -X POST https://app.getprojectflow.com/hooks/flows/TENANT_ID/FLOW_ID/TOKEN \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-4711" \
-d '{"customer": {"name": "Acme"}, "amount": 120}'