# Retrieve a Webhook

Returns a webhook by its unique identifier, the one you get from [Create a Webhook](/reference/webhooks/create-webhook) or [List Webhooks](/reference/webhooks/list-webhooks). Secrets are masked.

The webhook must belong to the account you pass in `account_id`. Any other identifier returns `404 WEBHOOK_NOT_FOUND`.

See [Webhooks Overview](/reference/webhooks) for what each field configures.

**GET** `/webhooks/{webhook_id}`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Returns a webhook by its unique identifier, with its secrets masked.

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)

## Path parameters

- `webhook_id` (string, required)
  The unique identifier of the webhook, as returned by [Create a Webhook](/reference/webhooks/create-webhook).

## Query parameters

- `account_id` (string, required)
  The unique identifier of the account the webhook belongs to.

## Responses

### 200

The webhook.

- `id` (string)
  The unique identifier of the webhook.
- `account_id` (string<uuid>)
  The unique identifier of the account the webhook belongs to.
- `name` (string)
  Your name for the webhook.
- `state` ("ACTIVE" | "INACTIVE")
  `ACTIVE` webhooks receive notifications, `INACTIVE` ones do not. A webhook starts out `ACTIVE`.
- `url` (string)
  The endpoint WHITELABEL sends the notifications to.
- `api_key` (string,null)
  Masked as `***`, or `null` when you have not configured it.
- `secret` (string,null)
  Masked as `***`, or `null` when you have not configured it.
- `hmac_client_secret` (string,null)
  Masked as `***`, or `null` when you have not configured it.
- `oauth2_authentication_url` (string,null)
  Your token endpoint.
- `oauth2_client_secret` (string,null)
  Masked as `***`, or `null` when you have not configured it.
- `oauth2_client_id` (string,null)
  The client identifier WHITELABEL authenticates with.
- `oauth2_grant_type` (string,null)
  The grant type WHITELABEL requests the token with.
- `oauth2_scope` (string,null)
  The scope WHITELABEL requests the token with.
- `oauth2_authorization_name` (string,null)
  The header WHITELABEL sends the token in.
- `oauth2_include_client_id` (boolean)
  Whether WHITELABEL also sends the client identifier as a header on the token request.
- `enrollment_triggers` (array,null)
  The enrollment events the webhook subscribes to.
- `payment_triggers` (array,null)
  The payment events the webhook subscribes to.
- `report_triggers` (array,null)
  The report events the webhook subscribes to.
- `subscription_triggers` (array,null)
  The subscription events the webhook subscribes to.
- `onboarding_triggers` (array,null)
  The onboarding events the webhook subscribes to.
- `renewal_days` (integer,null)
  How many days before a renewal WHITELABEL sends the `CLOSE_TO_RENEWAL` notification.
- `created_at` (string<date-time>)
  The date and time the webhook was created, in ISO 8601.
- `updated_at` (string<date-time>)
  The date and time the webhook was last updated, in ISO 8601. It matches `created_at` until you update the webhook for the first time.

Example:

```json
{
  "id": "12345",
  "account_id": "493e9374-510a-4201-9e09-de669d75f256",
  "name": "Production payments listener",
  "state": "ACTIVE",
  "url": "https://api.acme.com/whitelabel/webhooks",
  "api_key": "***",
  "secret": "***",
  "hmac_client_secret": "***",
  "oauth2_authentication_url": "https://api.acme.com/oauth/token",
  "oauth2_client_secret": "***",
  "oauth2_client_id": "acme_client_id",
  "oauth2_grant_type": "client_credentials",
  "oauth2_scope": "webhooks:write",
  "oauth2_authorization_name": "Authorization",
  "oauth2_include_client_id": true,
  "enrollment_triggers": [
    "ENROLL",
    "UNENROLL"
  ],
  "payment_triggers": [
    "AUTHORIZE",
    "CAPTURE",
    "REFUND"
  ],
  "report_triggers": [
    "UPDATE"
  ],
  "subscription_triggers": [
    "CREATE",
    "CLOSE_TO_RENEWAL"
  ],
  "onboarding_triggers": [
    "CREATED",
    "SUCCEEDED"
  ],
  "renewal_days": 5,
  "created_at": "2026-07-09T13:05:36.482913Z",
  "updated_at": "2026-07-11T16:20:44.918330Z"
}
```

### 400

The `account_id` is missing or invalid.

- `code` ("WEBHOOK_INVALID_REQUEST" | "INVALID_ACCOUNT_ID")
  Machine-readable error code.
- `messages` (string[])
  Human-readable description of the error.

Example:

```json
{
  "code": "WEBHOOK_INVALID_REQUEST",
  "messages": [
    "string"
  ]
}
```

### 401

Your API credentials are missing or invalid.

- `code` ("NOT_AUTHENTICATED" | "INVALID_CREDENTIALS")
  Machine-readable error code.
- `messages` (string[])
  Human-readable description of the error.

Example:

```json
{
  "code": "NOT_AUTHENTICATED",
  "messages": [
    "string"
  ]
}
```

### 404

There is no webhook with that identifier on the account.

- `code` ("WEBHOOK_NOT_FOUND")
  Machine-readable error code.
- `messages` (string[])
  Human-readable description of the error.

Example:

```json
{
  "code": "WEBHOOK_NOT_FOUND",
  "messages": [
    "string"
  ]
}
```

### 502

The webhook service is temporarily unavailable.

- `code` ("WEBHOOK_UPSTREAM_ERROR")
  Machine-readable error code.
- `messages` (string[])
  Human-readable description of the error.

Example:

```json
{
  "code": "WEBHOOK_UPSTREAM_ERROR",
  "messages": [
    "string"
  ]
}
```