> For the complete documentation index, see [llms.txt](https://docs.scaleconnect.com.au/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleconnect.com.au/api/webhooks.md).

# Webhooks

{% @scale-docs-page-title/page-title title="Webhooks" %}

{% hint style="warning" %}
**Confirm before publishing:** the public event allowlist, event and payload names, delivery worker, subscription routes, signing header format, retry timings, retention and replay behaviour. Outbound partner webhooks are a designed contract, not a verified live subscription service. Existing Stripe, RevenueCat and Nylas receivers are inbound provider integrations.
{% endhint %}

Webhooks notify your server when an event occurs in the brokerage book linked to your integration. Register an HTTPS callback URL and subscribe to the event types you need. Your handler verifies the signature, records the event ID, acknowledges the delivery and processes it asynchronously.

## Integration flow

1. Create a [subscription](/api/webhooks/subscriptions.md) with the event names and an HTTPS URL.
2. Save the signing secret when it is returned.
3. Verify each delivery using the **raw request body** before parsing JSON.
4. Deduplicate on the envelope `id`.
5. Return a 2xx response promptly; read the resource from the API when the latest state matters.
6. Inspect deliveries and request replay for failures.

## Envelope

```json
{
  "id": "evt_example_001",
  "event": "client.linked_to_broker",
  "timestamp": "2026-10-01T00:00:00Z",
  "source": "sync",
  "actor": { "type": "partner", "slug": "example-crm" },
  "data": {
    "clientId": "cli_example_001",
    "clientExternalId": "crm_001",
    "brokerEmail": "broker@example.invalid",
    "brokerReference": "brk_001"
  }
}
```

The values are synthetic. The event `id` remains the same across retries and replay; a delivery attempt gets its own ID. `source` describes where the change originated and is not a substitute for the actor or permission check.

## Delivery promises

Delivery is intended to be **at least once**, with no ordering guarantee. A payload records the state at event time and can be stale when it arrives. Use the event as a prompt to fetch the current resource. See [Delivery](/api/webhooks/delivery.md) for signature, retry and recovery rules and [Events](/api/webhooks/events.md) for payload fields.

A partner can subscribe only to approved public events for clients and resources within its permitted book. Internal domain events and inbound provider webhook types are not available as partner subscriptions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.scaleconnect.com.au/api/webhooks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
