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

# webhooks test

> Send a signed test event to a webhook and report the outcome.

Send a signed test event to a webhook and report the delivery outcome. Use this to confirm your endpoint accepts and verifies Clay deliveries before you wire it to a routine run. For test events, the delivery payload's `data` is `{}`.

See the [webhooks overview](/cli/reference/webhooks) for the delivery payload shape and signature verification.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay webhooks test <webhookId>
```

## Arguments

| Argument    | Description                                                                                           |
| ----------- | ----------------------------------------------------------------------------------------------------- |
| `webhookId` | Webhook id, e.g. the `id` returned by [`clay webhooks list`](/cli/reference/webhooks-list). Required. |

## Output

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "wh_abc123",
  "status": "success",
  "statusCode": 200
}
```

| Field        | Type                    | Description                                                                                                     |
| ------------ | ----------------------- | --------------------------------------------------------------------------------------------------------------- |
| `id`         | string                  | Webhook id the test event was sent to.                                                                          |
| `status`     | `"success" \| "failed"` | `success` if the endpoint accepted the delivery (2xx); `failed` if it rejected the delivery or was unreachable. |
| `statusCode` | number                  | HTTP status code the endpoint returned. Omitted when the endpoint was unreachable.                              |

## Errors

| Code             | Exit | Notes                                            |
| ---------------- | ---- | ------------------------------------------------ |
| `auth_forbidden` | 3    | The API key lacks permission to manage webhooks. |
| `not_found`      | 6    | No webhook with that id.                         |

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay webhooks test wh_abc123
clay webhooks test wh_abc123 | jq -r '.status'
```
