Webhook endpoints are rolling out. If the routes answer
404, ask your Wordsmith contact to turn them on for your organisation.POST for each event.
Callbacks and webhook endpoints
Both use the same signature scheme and the same back-off, so one receiver can handle both.
Create an endpoint
secret. The secret is returned only in this response. Store it now: you need it to verify signatures, and it cannot be read again. If you lose it, rotate it.
urlmust be a publichttpsURL. Private, loopback and link-local addresses are refused with400 invalid_webhook_url.event_typestakes names from Event types. A wildcard such astask.*covers every event of that resource, including ones added later.- Wordsmith sends a
webhook_endpoint.testevent to the new endpoint straight away, so you can check your receiver.
webhooks:write scope, and reading them needs webhooks:read. Neither is a default scope: an app asks for them by name. A user can have up to 10 endpoints, and an organisation up to 50.
What an endpoint receives
An endpoint acts as the user who created it, with the credential that created it. Each event is checked when it is sent, not when it happened. An event reaches the endpoint only if:- The event type is one the endpoint subscribes to.
- The credential still grants
webhooks:readand the event type’s scope. An API key with full access grants every scope. - The user can still read the resource. A task you lose access to stops sending events.
- The user’s role still allows the API and webhook endpoints.
disabled_reason credential_revoked, and sends nothing more. Create a new one with a working credential. An endpoint created in Settings → Configurations → Webhooks has no API key or app behind it, so it acts with your own access.
If the user who owns an endpoint is deleted or suspended, Wordsmith stops sending to it from that moment, and events raised after it are never delivered. A deleted owner’s endpoint is also disabled with disabled_reason owner_inactive the next time an event is sent to it. A suspended owner’s endpoint stays on and receives new events once their access comes back. When the owner is back, set enabled to true if the endpoint was disabled, and read what you missed from List events.
To receive events for work across a whole team, create the endpoint as a user who can read that work, such as a service account. To receive every event about work shared with the whole organisation, use an organisation endpoint.
Event types
List event types returns this list with each type’s scope. New event types are added over time. Only events you subscribe to are sent, so a new type never reaches an endpoint that did not ask for it, unless the endpoint uses a wildcard.
Payload
Every event uses the same envelope. Get event shows a full example.string
The event’s ID. Every delivery attempt of one event sends the same ID, so drop duplicates by it.
string
The event type, from Event types.
string
The version of the payload shape. It is the endpoint’s
api_version, fixed when the endpoint was created, so a later change to a payload never breaks your receiver.string
When the event happened. Events can arrive out of order, so compare this before applying an update.
object
The object the event is about, by
type and id.object
Who caused the event.
kind is user, agent or system. id is null for system.object
IDs and status for the event. Its shape depends on
type.Events carry IDs, not content
data holds IDs, statuses, counts and links. It never holds titles, document text, comments or answers. Read those with the API, using the IDs in the event:
data by event type
Verify the signature
Every event carries the sameWordsmith-Signature: t=…,v1=… header as callbacks, signed with the endpoint’s secret. Verify it as described in Validating webhook signatures. A retry is signed again with a fresh timestamp.
Each request also carries these headers:
Rotate the secret
Rotate webhook secret returns a newsecret. For 24 hours, each event is signed with both secrets, so the header carries two v1 values: t=…,v1=<new>,v1=<old>. Accept the request if any v1 matches. Deploy the new secret within those 24 hours; after that only the new one signs.
Delivery
- At least once. The same event can arrive more than once. Drop duplicates by
id. - No order. Events are sent as they happen and retried on their own, so a later event can arrive first. Use
created_at, or read the resource. - Respond fast. Return any
2xxwithin 10 seconds, then do the work. Redirects are not followed and count as a failure. - Retries. A non-
2xxresponse or a timeout is retried after 1 minute, 5 minutes, 15 minutes, 1 hour, 3 hours, then every 6 hours, for 3 days. Then the delivery is marked failed. - Failing endpoints. If every attempt to an endpoint has failed for 2 days, its
statusbecomesfailingand its owner gets a notification. Each event is retried for 3 days, so one event that never gets through is enough. The endpoint’s pending deliveries stop with it. Wordsmith stops sending until you fix the receiver and setenabledback totrue. Events from that time can be read from List events.
last_delivery shows the time, response status and error of its latest attempt, in the API and in Settings → Configurations → Webhooks. List webhook deliveries shows each event’s attempts, and Retry webhook delivery sends one again with the same event id, a fresh signature, and access checked again.
Catch up after an outage
Events stay readable for 30 days. List events returns them oldest first, with the same access checks an endpoint uses. Page through withcursor:
Organisation endpoints
A user’s endpoint sees what that user can see. An organisation endpoint receives every event of its types about work shared with the whole organisation, such as everytask.created on an organisation-wide task, so a matter management system or a data warehouse can mirror shared legal work.
Create one with the same request and
"audience": "customer".
- Private work stays private. A private task, review, repository or report sends nothing to an organisation endpoint, even when it is shared with a few people. Only work shared with the whole organisation reaches it.
- Personal events are excluded. Operation and input request events are about one person’s work, so an organisation endpoint cannot subscribe to them.
- Payloads are the same. Events carry IDs and status, as for a user endpoint. To read the content, the receiving system calls the API with a credential that can read it.
- Changes are audited. Creating, changing and deleting an endpoint, rotating its secret, sending a test and retrying a delivery are recorded in the audit log as
webhook_endpoint.*events, for both kinds of endpoint. - Your plan must include it. Where it does not,
"audience": "customer"is refused with403 customer_webhooks_unavailable.
audience=customer lists the same events for catch-up, and needs webhooks:admin.
Not covered
- Full objects in events. Events carry IDs; read the content with the API.
- Ordering. Events are not delivered in order, and there is no per-resource sequence.