Archie Tells You When the Work Is Done
Long jobs finish on their own schedule. Instead of polling for a result, register an endpoint and Archie posts a signed event the moment a WorkStream cycle finishes or a key changes.
You register an HTTPS endpoint and the events you want. Endpoints belong to your organisation, so an event in any of your workspaces reaches them. Each endpoint hears every event type or only the ones you pick.
Register an Endpoint
Add the Endpoint
POST https://uk.heyarchie.com/v1/webhooks with the HTTPS address to deliver to and the event types you want. Nothing else is needed.
Copy the Signing Secret
Archie generates the secret and returns it once, in the reply to that call. Store it straight away.
Lost It? Start Again
There is no way to show or rotate a secret. Delete the endpoint and add it again to get a new one.
Archie only delivers to public HTTPS addresses. It rejects plain HTTP and any address that resolves to a private, loopback or internal host. It checks the address again on every delivery, so an endpoint cannot be re-pointed at your internal network later.
What a Delivery Looks Like
Each delivery is a POST with a JSON body and a few headers. The body carries the event name and a compact data object. It holds only the fields a third party should see, never the full internal payload.
POST /your-endpoint HTTP/1.1
Content-Type: application/json
User-Agent: Archie-Connect-Webhooks/1.0
X-Webhook-Id: 4821
X-Webhook-Event: workstream.run.completed
X-Webhook-Timestamp: 1749031200
X-Webhook-Signature: v1=8f3c…2b1d
{
"event": "workstream.run.completed",
"data": {
"run_id": "run_01J…",
"status": "completed",
"completed_at": "2026-06-04T09:20:00Z",
"duration_ms": 18342
}
}What Each Header Carries
Read the headers before the body. The signature tells you whether to trust it at all.
The versioned HMAC. Verify it before you trust the body.
When Archie signed the request. Part of the signature, and your replay guard.
Use it to deduplicate. Delivery is at least once.
Lets you route the delivery without parsing the body first.
Verify Every Delivery
Anyone can POST to a public address, so verify the signature first. Archie signs the string {timestamp}.{raw body} with your endpoint secret using HMAC-SHA256 and sends v1=<hex>. Recompute it over the exact bytes you received and compare in constant time. Reject anything signed more than five minutes ago, so a captured request cannot be replayed.
import hashlib
import hmac
import time
def verify(secret: str, body: bytes, signature: str, timestamp: str) -> bool:
# Reject deliveries older than five minutes (replay protection).
if abs(time.time() - int(timestamp)) > 300:
return False
message = f"{timestamp}.{body.decode()}".encode()
expected = "v1=" + hmac.new(secret.encode(), message, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature)import crypto from "node:crypto";
function verify(secret: string, body: string, signature: string, timestamp: string): boolean {
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const expected =
"v1=" +
crypto.createHmac("sha256", secret).update(`${timestamp}.${body}`).digest("hex");
const a = Buffer.from(expected);
const b = Buffer.from(signature);
return a.length === b.length && crypto.timingSafeEqual(a, b);
}Verify against the exact bytes Archie sent, before any JSON parsing or re-serialisation. Re-encoding the body can reorder keys or change spacing, and then the signature no longer matches.
Retries and Idempotency
Any 2xx reply means the delivery is done. Delivery is at least once, so treat X-Webhook-Id as the idempotency key and ignore an id you have already processed. Acknowledge fast and do the real work in the background: a slow endpoint reads as a failure and earns a retry.
Event Types
The live set is also served at GET https://uk.heyarchie.com/v1/webhooks/event-types, which is what the endpoint picker reads, so it never drifts from what Archie sends.
A cycle finishes successfully. Sends run_id, status, completed_at, duration_ms.
A cycle ends in failure. Sends run_id, status, error, completed_at.
A Connect key is created in your organisation. Sends id, name, created_at.
A Connect key is deleted. Sends id, name.
playbook.run.completed and playbook.run.failed still work as aliases of the two WorkStream events, for endpoints that subscribed under the old names. api_key.rotated and message.completed are reserved and listed in the picker, but Archie does not send them yet. Subscribe to * to receive every event type, including ones added later.