---
title: "Create a webhook endpoint"
method: POST
path: "/v1/webhook-endpoints"
tags: ["Webhooks"]
---

# Create a webhook endpoint

`POST /v1/webhook-endpoints`

## Request

- Base URL: `https://api.scrip.dev`
- URL: `https://api.scrip.dev/v1/webhook-endpoints`
- Auth: HTTP bearer

Register a URL to receive webhook notifications for selected event types.

## Headers

- `Idempotency-Key` string

## Request body

- CreateWebhookEndpointRequest: Registers a URL to receive webhook events, and the event types it receives.
  - `description` string: Human-readable label for this endpoint
  - `enabled_events` string[], required: Event types to subscribe to (use * for all)
  - `metadata` unknown
  - `url` string, required: HTTPS URL that will receive webhook deliveries

## Response `201`

Endpoint created (includes secret)

- WebhookEndpointResponse: A webhook endpoint: a URL that receives the event types it subscribes to.
  - `circuit_broken_until` string: When set and in the future, the circuit breaker has paused deliveries to this endpoint until this time (sustained delivery failures)
  - `created_at` string, date-time: When the endpoint was created
  - `description` string: Human-readable label
  - `enabled_events` string[]: Subscribed event types
  - `id` string, uuid: The id of the webhook endpoint. Use it in `webhook_endpoint_id` paths.
  - `metadata` unknown
  - `rate_limited_until` string: When set and in the future, 429 rate-limit backoff has paused deliveries to this endpoint until this time
  - `secret` string: Signing secret. Scrip returns it only when you create the endpoint or rotate the secret, so store it right away.
  - `status` 'ACTIVE' | 'DISABLED' | 'ARCHIVED': The endpoint's lifecycle state.
  - `updated_at` string, date-time: When the endpoint was last modified
  - `url` string: Destination URL for deliveries

## Other responses

- `400`: Validation failed (code: validation_error | invalid_json)
- `401`: The API key is missing or not valid. See [Authentication](https://docs.scrip.dev/authentication).
- `403`: The caller is not allowed to do this.
- `429`: Too many requests. Wait the number of seconds in the `Retry-After` header, then retry. See [Limits and durations](https://docs.scrip.dev/limits#rate-limits).
- `500`: Something failed on Scrip's side. Retry the request, and quote `request_id` if it keeps failing. [Errors](https://docs.scrip.dev/errors) lists every code, and the [API introduction](https://docs.scrip.dev/api-reference/introduction) describes the error format.

---

[API](https://skmtc.dev/scrip/apis/scrip-api.md) · [All operations](https://skmtc.dev/scrip/apis/scrip-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrip/apis/scrip-api/revisions/c52d35da8d97?raw)
