# Operator webhooks

Operator-level endpoints receive the events of every customer plus customer lifecycle and compliance hold events.

An operator can register its own webhook endpoints. They receive the events of **every customer** of the operator, plus events only operators see. Signing, retries, pausing, redelivery and SSRF protection are the same as for customer endpoints: read [Webhooks and signature verification](/docs/webhooks) first; this page covers what differs.

```sh
export WIREBLOOM_API_URL=https://api.banking.wirebloom.com/v1
export WIREBLOOM_OPERATOR_ID=<your operator id>
auth=(-H "Authorization: Bearer $WIREBLOOM_API_KEY" -H "X-Tenant-Id: $WIREBLOOM_OPERATOR_ID")
json=(-H "Content-Type: application/json")
```

## Register an operator endpoint

Use the same operations as customers with `X-Tenant-Id` = the operator id, from an operator owner's session (**API access → Webhooks**) or an operator key with `webhooks:manage`. Up to 10 endpoints per operator.

```sh
curl -X POST "$WIREBLOOM_API_URL/integrator-webhooks" "${auth[@]}" "${json[@]}" \
  -d '{ "url": "https://ops.example.com/wirebloom/events",
        "events": ["customer.created", "customer.status_changed",
                   "compliance_hold.opened", "compliance_hold.decided",
                   "payment.status_changed", "incoming_payment.received"],
        "description": "Operator back office" }'
```

The response holds `secret` (`whsec_…`), **shown once**: store it in your secrets manager. Endpoint rules: `https://` only, a public host name or address, no credentials in the URL. Send a signed test event with [testIntegratorWebhook](/reference/public-api#testIntegratorWebhook).

## What an operator endpoint receives

Customer events of every customer of the operator:

| Event                                                     | When                                                    |
| --------------------------------------------------------- | ------------------------------------------------------- |
| `payment.created`, `payment.status_changed`               | a payment was submitted / changed status                |
| `payment.completed`, `payment.failed`, `payment.returned` | the corresponding terminal change                       |
| `transfer.completed`, `exchange.completed`                | an internal transfer or a currency exchange completed   |
| `incoming_payment.received`                               | money arrived on a balance                              |
| `recipient.status_changed`                                | a recipient was added or its approval status changed    |
| `approval.requested`, `approval.decided`                  | a payment or recipient needs / got an approval decision |
| `funds_request.status_changed`                            | a funds request changed status                          |

Operator-only events (a customer endpoint subscribing to them is `422` `event_not_allowed`):

| Event                                                             | When                                                                                             |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `customer.created`, `customer.status_changed`                     | a customer was created / changed status (`data.object: customer`)                                |
| `customer.provisioning_blocked`, `customer.provisioning_released` | an approved customer waits for an active banking connection / was provisioned after it           |
| `compliance_hold.opened`, `compliance_hold.decided`               | the compliance gate held a payment / staff released or blocked it (`data.related` = the payment) |

Compliance holds are never announced to the customer (tipping-off rule): do not forward `compliance_hold.*` events to the customer.

## Tenant and customer in the payload

Deliveries to operator endpoints carry `tenantId` = **the operator id** and `customerId` = the customer concerned:

```json
{
  "id": "0192a6f3-0000-7000-8000-0000000e0001",
  "type": "customer.status_changed",
  "createdAt": "2026-11-18T09:12:00Z",
  "apiVersion": "v1",
  "tenantId": "<operator id>",
  "customerId": "<customer id>",
  "data": { "object": "customer", "id": "<customer id>", "status": "approved" }
}
```

Route on `customerId`, de-duplicate on `WireBloom-Event-Id`, and re-read the resource before acting ([getCustomer](/reference/tenants#getCustomer) with `customers:read`).

## Verify the signature

`WireBloom-Signature` is `v1=` plus the hex HMAC-SHA256 of `WireBloom-Timestamp + "." + rawBody` with the endpoint secret. During a secret rotation it carries two entries; accept either. With the TypeScript SDK:

```ts
import { constructWebhookEvent } from '@wirebloom/sdk/webhooks';

const event = await constructWebhookEvent({
  payload: rawBody, // the raw bytes, never re-serialised JSON
  headers: request.headers,
  secret: process.env.WIREBLOOM_WEBHOOK_SECRET!,
});
```

Python: `wirebloom.webhooks.construct_event(raw_body, headers, secret=...)`. C#, Java, PHP and Go ship a dependency-free verifier ([SDKs](/docs/sdks)).

## Separation from customer endpoints

- Customers never see operator endpoints or their deliveries.
- An operator key never reaches a customer's own endpoints: listing or changing them needs a customer-level key of that customer.
- Customer and operator endpoints for the same event receive the same event id, so a system that holds both de-duplicates across them.

## Operate the endpoint

- Deliveries: [listWebhookDeliveries](/reference/public-api#listWebhookDeliveries) (filter `filter[succeeded]=false`) and [redeliverWebhook](/reference/public-api#redeliverWebhook) after an outage.
- Re-enable a paused endpoint with [updateIntegratorWebhook](/reference/public-api#updateIntegratorWebhook) (`"enabled": true`, send `If-Match`).
- Rotate the secret with [rotateIntegratorWebhookSecret](/reference/public-api#rotateIntegratorWebhookSecret): both secrets sign for 24 h.
- Webhook health of every endpoint, customer and operator, is on the Integration home ([getIntegrationHome](/operator/reference/public-api#getIntegrationHome), `integration:read`).

The pause rule is the same as for customer endpoints: after 20 consecutive failed attempts the endpoint is paused, after 72 h without a successful delivery it is disabled, and paused or disabled endpoints receive no new events.
