> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weivo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Have Weivo send a signed request to your own endpoint when a stakeholder votes, the ranking changes, or a report is written or shared. Events, payloads, signatures, retries.

A **webhook** sends a signed `POST` to an address you choose whenever something happens in a project. Use it to post to Slack through Zapier or Make, update a dashboard, or start your own automation. Webhooks are on every plan.

## Add a webhook

In a project, open **Project Settings > Webhooks** and choose **Add webhook**:

1. **Endpoint URL**: an `https://` address with a public host name. Weivo refuses IP addresses and local names, and never follows a redirect.
2. **Send when**: one or more of the four events below.
3. Choose **Add webhook**. Weivo shows the **signing secret** once. Copy it into your endpoint's settings before you close the panel: Weivo cannot show it again.

A project can have up to 10 webhooks. Anyone who can edit the project can add, change or remove them; anyone with access to the project can see them and their deliveries. An AI client connected to Weivo cannot add or change a webhook.

## Events

| Event | Sent when | `data` |
| - | - | - |
| `vote.submitted` | A stakeholder submits their votes | `stakeholder` (`id`, `name`), `submittedCount`, `invitedCount` |
| `ranking.changed` | The order of the ranking changes, after any change to items, needs, links, stakeholders, votes or settings | `ranking` (each item's `id`, `title`, `rank`, `priority`), `moved` (each item whose rank changed, with `before` and `after`), `cause.logEntryId` |
| `report.generated` | The Decision Report's brief is written | `generatedAt`, `sections` (the brief's section titles) |
| `report.shared` | A report is shared, or a share is revoked | `action` (`created` or `revoked`), `shareId`, `at`, and `url` only if you turned on **Include the share link** |

`ranking.changed` is sent only when the order changes: a vote that moves a Priority but leaves every rank in place sends nothing. Changes made close together are checked together, so one edit session sends one event.

**What a webhook never carries:** a stakeholder's ratings, abstentions or comments, their email address, or a need's evidence. The ranking, names and dates are what leave Weivo.

Every request has the same envelope:

```json theme={null}
{
  "id": "5d1c0b8e-6f0a-4c3e-9a51-7f6f0b2a9c11",
  "type": "ranking.changed",
  "createdAt": "2026-11-05T14:02:11.000Z",
  "projectId": "b9000000-0000-4000-8000-000000000001",
  "apiVersion": "v1",
  "data": { "...": "..." }
}
```

**Send test** in Settings sends a `webhook.test` event to that endpoint only.

## Check the signature

Weivo signs every request the [Standard Webhooks](https://www.standardwebhooks.com/) way, so any of its libraries can verify it. Three headers come with each request:

* `webhook-id`: the event's id. It stays the same when a delivery is retried or resent, so use it to ignore duplicates.
* `webhook-timestamp`: when this attempt was signed, in seconds since 1970. Refuse a request more than five minutes old.
* `webhook-signature`: `v1,` followed by the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with your secret (the part after `whsec_`, base64-decoded). While a secret is being rotated there are two signatures, separated by a space; accept the request if either matches.

```js theme={null}
import { Webhook } from 'standardwebhooks';

const wh = new Webhook(process.env.WEIVO_WEBHOOK_SECRET); // "whsec_..."
const event = wh.verify(rawBody, {
  'webhook-id': req.headers['webhook-id'],
  'webhook-timestamp': req.headers['webhook-timestamp'],
  'webhook-signature': req.headers['webhook-signature'],
}); // throws if the signature or timestamp is wrong
```

Verify the raw body, before any JSON parsing changes it.

## Rotate a secret

**Rotate secret** makes a new secret and shows it once. The old one keeps signing for 24 hours, so you can update your endpoint without missing an event.

## Deliveries and retries

Your endpoint should answer with any `2xx` status within 10 seconds. Anything else, a redirect, a timeout or an address that resolves to a private network counts as a failure, and Weivo tries again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 24 hours, then gives up on that event.

While deliveries fail, the webhook shows **Failing since** in Settings. If every delivery fails for three days, Weivo turns the webhook off and says why; fix the endpoint, then **Turn on** to start again.

**Recent deliveries** lists the project's last 50 deliveries with their status, response code and time; while one is waiting to send, the list updates itself every few seconds. **Resend** sends the same event again, with the same `webhook-id`. Deliveries are kept for 30 days.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.