Skip to main content
Webhook endpoints are rolling out. If the routes answer 404, ask your Wordsmith contact to turn them on for your organisation.
A callback tells you when work you started finishes. A webhook endpoint tells you about everything else you can see: a task assigned to you in the app, a review someone ran in Word, an agent waiting for your approval, documents added to a repository. You register a URL once, choose the event types it receives, and Wordsmith sends it a signed 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

The response is the endpoint, as Create webhook endpoint shows it, plus its 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.
  • url must be a public https URL. Private, loopback and link-local addresses are refused with 400 invalid_webhook_url.
  • event_types takes names from Event types. A wildcard such as task.* covers every event of that resource, including ones added later.
  • Wordsmith sends a webhook_endpoint.test event to the new endpoint straight away, so you can check your receiver.
Managing endpoints needs the 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:
  1. The event type is one the endpoint subscribes to.
  2. The credential still grants webhooks:read and the event type’s scope. An API key with full access grants every scope.
  3. The user can still read the resource. A task you lose access to stops sending events.
  4. The user’s role still allows the API and webhook endpoints.
If the API key is deleted or the app is disconnected, the endpoint is disabled with 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:
This keeps confidential content inside Wordsmith’s access checks. You always read the current state, and an event delayed by retries never overwrites newer data. Operation events are the exception: they carry the whole operation, as callbacks do.

data by event type

Verify the signature

Every event carries the same Wordsmith-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 new secret. 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 2xx within 10 seconds, then do the work. Redirects are not followed and count as a failure.
  • Retries. A non-2xx response 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 status becomes failing and 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 set enabled back to true. Events from that time can be read from List events.
Each endpoint’s 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 with cursor:
The API is the source of truth. If your receiver was down for longer than the retries cover, list the events you missed, or read the resources directly. Wordsmith records an event right after the change it reports. In the rare case that recording fails, the change is still made but no event is sent, so an integration that must not miss a change should also reconcile against the resources now and then.

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 every task.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 with 403 customer_webhooks_unavailable.
List events with 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.