Set up
- Create a webhook with the workspace and an HTTPS URL.
- Store the
secretof the response on your server: it signs every call. - Answer each call with a
2xxwithin 10 seconds, then do your work.
Events
Case templates never send events, only real cases.
Payload
case.updated with both changes. Within one event,
each field appears once with its value at the end of the operation.
Changes
Verify the signature
Every call carries aPenbox-Signature header:
v1 is the HMAC-SHA256, keyed with your secret, of the timestamp, a dot, and the raw
request body. Compute it on the raw body, before any JSON parsing, and reject calls
older than 5 minutes.
Node.js (Express)
Delivery and retries
Delivery is at least once: the same event can arrive twice, for example after a
retry. Its
id never changes, so keep the ids you processed and skip the ones you
already have.
Penbox sends an endpoint its events one at a time, in the order the changes happened:
you get case.created before the updates of that case. When your endpoint fails a call,
every later event waits for that one’s retry, so the order holds through outages too.
Because delivery is at least once, an event you already processed can still come again:
skip it by its id, and before applying a value, check that the event’s occurred_at is
newer than the last one you applied for that case.
See every event sent to an endpoint, its status and the last error in the
delivery log. Entries are kept 30 days.