# Create a webhook endpoint

> Adds an endpoint. The signing `secret` is only returned here, once.

```
POST https://api.sandbox.stridehq.ai/v1/webhook_endpoints
```

Not available yet: this endpoint is planned.

Scope: `webhooks:manage`

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `Idempotency-Key` | string | No | A unique value, such as a UUID. The same key and body within 24 hours returns the original response. |

## Body

| Name | Type | Required | Description |
|---|---|---|---|
| `url` | string | Yes | An HTTPS address. |
| `events` | array of string | Yes | The event types to send. |

## Responses

- **201**: The endpoint, with its secret.
- **400**: `unknown_field`, `invalid_parameter` or `invalid_cursor`.
- **401**: `missing_api_key`, `invalid_api_key`, `revoked_api_key` or `wrong_environment`.

```json
{
  "id": "we_5e7a9c1b3d5f4a6c8e0a2b4c6d8e0f1a",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/stridehq",
  "events": [
    "payment_run.funded",
    "payment_run.completed",
    "payment.failed"
  ],
  "enabled": true,
  "created_at": "2026-10-29T09:00:00Z",
  "secret": "whsec_demo_9f8e7d6c5b4a"
}
```
