---
title: "Create a webhook endpoint"
method: POST
path: "/v1/webhook_endpoints"
---

# Create a webhook endpoint

`POST /v1/webhook_endpoints`

## Request

- Base URL: `https://api.stripe.com`
- URL: `https://api.stripe.com/v1/webhook_endpoints`
- Auth: one of:
  - HTTP basic
  - HTTP bearer

A webhook endpoint must have a `url` and a list of `enabled_events`. You may optionally specify the Boolean `connect` parameter. If set to true, then a Connect webhook endpoint that notifies the specified `url` about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified `url` only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.

## Response `200`

Successful response.

- WebhookEndpoint: You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be notified about events that happen in your Stripe account or connected accounts. Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure)
  - `api_version` string, nullable: The API version that events are rendered as for this webhook endpoint. You can't change this value after you create the endpoint.
  - `application` string, nullable: The ID of the associated Connect application.
  - `created` integer, required: Time at which the object was created. Measured in seconds since the Unix epoch.
  - `description` string, nullable: An optional description of what the webhook is used for.
  - `enabled_events` string[], required: The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.
  - `id` string, required: Unique identifier for the object.
  - `livemode` boolean, required: If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
  - `metadata` object, required: Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  - `object` 'webhook_endpoint', required: String representing the object's type. Objects of the same type share the same value.
  - `secret` string: The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.
  - `status` string, required: The status of the webhook. It can be `enabled` or `disabled`.
  - `url` string, required: The URL of the webhook endpoint.

## Other responses

- `default`: Error response.

---

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