---
title: "Create a webhook configuration"
description: "Creates a webhook configuration. Requires a paid workspace plan with webhook access. The URL must use HTTPS and pass SSRF validation."
canonical: https://y2.dev/docs/api/reference/webhooks/createWebhook/
---

Endpoint Reference[Webhooks](https://y2.dev/docs/api/reference/webhooks)

# Create a webhook configuration

Creates a webhook configuration. Requires a paid workspace plan with webhook access. The URL must use HTTPS and pass SSRF validation.

`POST https://api.y2.dev/api/v1/webhooks`

- Operation ID: `createWebhook`
- Required scopes: `webhooks:manage`
- Contract: https://y2.dev/openapi.json

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | No | Client-generated retry key retained for 24 hours. Repeating the same key and canonical JSON body returns the original resource. Changing the body returns `409 IDEMPOTENCY_CONFLICT`. |

## Request body

`application/json`: `WebhookCreateRequest` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | Webhook display name |
| `url` | string (uri) | Yes | Webhook endpoint URL (must be HTTPS) |
| `secret` | string | No | Shared secret for signature verification |
| `headers` | object | No | Custom headers to include in webhook deliveries |

## Responses

| Status | Description | Body |
| --- | --- | --- |
| 201 | Webhook configuration created | `WebhookCreateResponse` |
| 400 | Invalid request parameters |  |
| 401 | Missing or invalid API key |  |
| 403 | Insufficient permissions or access denied |  |
| 409 | Resource conflict (e.g., webhook in use) |  |
| 429 | Rate limit exceeded (per-key or per-account aggregate) |  |
| 500 | Internal server error |  |

### 201 response fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | `WebhookConfig` |  |
| `data.id` | string | Stable public webhook configuration ID |
| `data.type` | string |  |
| `data.name` | string | Webhook display name |
| `data.url` | string (uri) | Webhook endpoint URL |
| `data.status` | `active`, `disabled` |  |
| `data.signing` | object |  |
| `data.customHeaders[]` | array of string | Configured header names. Values are never returned. |
| `data.deliveryHealth` | object |  |
| `data.createdAt` | string (date-time) |  |
| `data.updatedAt` | string (date-time) |  |
| `data.links` | object |  |
| `meta` | object |  |
| `meta.message` | string |  |
