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

# Webhooks

> Receive backend notifications when verification, account, and resource state changes.

Webhooks notify your backend when an event occurs. Use them to track asynchronous processing instead of repeatedly polling list or retrieve endpoints.

Webhook subscriptions apply to every matching event available to the API key. They are not scoped to one user or account.

## Choose events

* For verification lifecycles, subscribe to the [`verifications.updated`](https://docs.argyle.com/api-reference/verifications-webhooks/updated) webhook and the [`verifications.creation_failed`](https://docs.argyle.com/api-reference/verifications-webhooks/creation-failed) webhook.
* To track connections after a verification ends, subscribe to [`verifications.connection_added`](https://docs.argyle.com/api-reference/verifications-webhooks/connection-added) and [`verifications.connection_removed`](https://docs.argyle.com/api-reference/verifications-webhooks/connection-removed).
* For Data API workflows, subscribe to the account and data webhooks that indicate when the records your application needs are available.
* For Item health changes, subscribe to [Item webhooks](https://docs.argyle.com/api-reference/items-webhooks/updated.md) explicitly.

See the [Webhooks area in API Reference](https://docs.argyle.com/api-reference/users-webhooks/fully-synced.md) for available event pages.

## Create a subscription

Create subscriptions in [Console](https://docs.argyle.com/console/management/webhooks.md) or with [`POST /v2/webhooks`](https://docs.argyle.com/api-reference/webhooks/create-a-webhook).

```json theme={}
{
  "events": [
    "verifications.updated"
  ],
  "name": "verification-status",
  "url": "https://your-webhook-backend.com/argyle",
  "secret": "optional-secret",
  "config": {
    "include_resource": true
  }
}
```

| Field | Use |
| - | - |
| `events` | Event names included in the subscription. |
| `name` | Your internal name for the subscription. |
| `url` | HTTPS backend URL that receives deliveries. Send the normal, unencoded URL. |
| `secret` | Optional value used to sign deliveries. |
| `config.include_resource` | Includes the current resource in supported webhook payloads. |

`"*"` subscribes to most current events, with important exceptions:

* Item webhooks are not included.
* Partial-synchronization events cannot define their history window through the wildcard subscription.
* Events that support `include_resource` must be subscribed to individually when you need the resource object.

## Receive deliveries

Return an HTTP `200` response within 10 seconds after accepting a webhook.

Argyle sends webhooks from these static IP addresses:

* `34.27.251.226`
* `34.122.50.253`
* `35.188.163.115`
* `35.226.53.251`

## Verify signatures

When a subscription has a `secret`, deliveries include `X-Argyle-Signature`.

1. Read the raw request body without parsing or reformatting it.
2. Create an HMAC-SHA512 digest using the subscription secret.
3. Compare the hexadecimal digest with `X-Argyle-Signature` using a timing-safe comparison.

```js theme={}
const crypto = require('crypto')

function isValidArgyleWebhook(rawBody, receivedSignature, secret) {
  const expected = crypto
    .createHmac('sha512', secret)
    .update(rawBody)
    .digest('hex')

  const received = Buffer.from(receivedSignature, 'hex')
  const calculated = Buffer.from(expected, 'hex')

  return received.length === calculated.length &&
    crypto.timingSafeEqual(received, calculated)
}
```

## Retry behavior

If a successful `200` response is not received within 10 seconds, the delivery is retried once after 30 seconds for these response codes:

* `429`
* `500`
* `502`
* `503`
* `504`

Argyle does not log webhook request bodies.

Build idempotent handlers because a delivery can be received more than once.

## Manage subscriptions

* [List subscriptions](https://docs.argyle.com/api-reference/webhooks/list-all-webhooks.md)
* [Retrieve a subscription](https://docs.argyle.com/api-reference/webhooks/retrieve-a-webhook.md)
* [Delete a subscription](https://docs.argyle.com/api-reference/webhooks/delete-a-webhook.md)

The subscription object's `last_sent_at` field can help determine whether Argyle attempted a delivery.

> [!NOTE]
>
> Webhooks are lifecycle notifications, not an analytics event stream. Use Console or your own application telemetry for conversion analysis.
