# PostWebhookEndpointsWebhookEndpoint

From **Stripe API**.

`POST /v1/webhook_endpoints/{webhook_endpoint}`

<p>Updates the webhook endpoint. You may edit the <code>url</code>, the list of <code>enabled_events</code>, and the status of your endpoint.</p>

## Parameters

### `webhook_endpoint`

- Location: path
- Required: true
- Type: `string`
- maxLength: `5000`

## Request body

- Required: false
### `application/x-www-form-urlencoded`

- Type: `object`

```json
{"additionalProperties":false,"properties":{"description":{"description":"An optional description of what the webhook is used for.","maxLength":5000,"type":"string"},"disabled":{"description":"Disable the webhook endpoint if set to true.","type":"boolean"},"enabled_events":{"description":"The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.","items":{"enum":["*","account.application.authorized","account.application.deauthorized","account.external_account.created","account.external_account.deleted","account.external_account.updated","account.updated","application_fee.created","application_fee.refund.updated","application_fee.refunded","balance.available","billing_portal.configuration.created","billing_portal.configuration.updated","capability.updated","charge.captured","charge.dispute.closed","charge.dispute.created","charge.dispute.funds_reinstated","charge.dispute.funds_withdrawn","charge.dispute.updated","charge.expired","charge.failed","charge.pending","charge.refund.updated","charge.refunded","charge.succeeded","charge.updated","checkout.session.async_payment_failed","checkout.session.async_payment_succeeded","checkout.session.completed","checkout.session.expired","coupon.created","coupon.deleted","coupon.updated","credit_note.created","credit_note.updated","credit_note.voided","customer.created","customer.deleted","customer.discount.created","customer.discount.deleted","customer.discount.updated","customer.source.created","customer.source.deleted","customer.source.expiring","customer.source.updated","customer.subscription.created","customer.subscription.deleted","customer.subscription.pending_update_applied","customer.subscription.pending_update_expired","customer.subscription.trial_will_end","customer.subscription.updated","customer.tax_id.created","customer.tax_id.deleted","customer.tax_id.updated","customer.updated","file.created","identity.verification_session.canceled","identity.verification_session.created","identity.verification_session.processing","identity.verification_session.redacted","identity.verification_session.requires_input","identity.verification_session.verified","invoice.created","invoice.deleted","invoice.finalization_failed","invoice.finalized","invoice.marked_uncollectible","invoice.paid","invoice.payment_action_required","invoice.payment_failed","invoice.payment_succeeded","invoice.sent","invoice.upcoming","invoice.updated","invoice.voided","invoiceitem.created","invoiceitem.deleted","invoiceitem.updated","issuing_authorization.created","issuing_authorization.request","issuing_authorization.updated","issuing_card.created","issuing_card.updated","issuing_cardholder.created","issuing_cardholder.updated","issuing_dispute.closed","issuing_dispute.created","issuing_dispute.funds_reinstated","issuing_dispute.submitted","issuing_dispute.updated","issuing_transaction.created","issuing_transaction.updated","mandate.updated","order.created","order.payment_failed","order.payment_succeeded","order.updated","order_return.created","payment_intent.amount_capturable_updated","payment_intent.canceled","payment_intent.created","payment_intent.payment_failed","payment_intent.processing","payment_intent.requires_action","payment_intent.succeeded","payment_method.attached","payment_method.automatically_updated","payment_method.detached","payment_method.updated","payout.canceled","payout.created","payout.failed","payout.paid","payout.updated","person.created","person.deleted","person.updated","plan.created","plan.deleted","plan.updated","price.created","price.deleted","price.updated","product.created","product.deleted","product.updated","promotion_code.created","promotion_code.updated","quote.accepted","quote.canceled","quote.created","quote.finalized","radar.early_fraud_warning.created","radar.early_fraud_warning.updated","recipient.created","recipient.deleted","recipient.updated","reporting.report_run.failed","reporting.report_run.succeeded","reporting.report_type.updated","review.closed","review.opened","setup_intent.canceled","setup_intent.created","setup_intent.requires_action","setup_intent.setup_failed","setup_intent.succeeded","sigma.scheduled_query_run.created","sku.created","sku.deleted","sku.updated","source.canceled","source.chargeable","source.failed","source.mandate_notification","source.refund_attributes_required","source.transaction.created","source.transaction.updated","subscription_schedule.aborted","subscription_schedule.canceled","subscription_schedule.completed","subscription_schedule.created","subscription_schedule.expiring","subscription_schedule.released","subscription_schedule.updated","tax_rate.created","tax_rate.updated","topup.canceled","topup.created","topup.failed","topup.reversed","topup.succeeded","transfer.created","transfer.failed","transfer.paid","transfer.reversed","transfer.updated"],"type":"string","x-stripeBypassValidation":true},"type":"array"},"expand":{"description":"Specifies which fields in the response should be expanded.","items":{"maxLength":5000,"type":"string"},"type":"array"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"enum":[""],"type":"string"}],"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`."},"url":{"description":"The URL of the webhook endpoint.","type":"string"}},"type":"object"}
```

## Security

### `basicAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `basic`
Send credentials in the `Authorization` request header using the `Basic` scheme.

Basic HTTP authentication. Allowed headers-- Authorization: Basic <api_key> | Authorization: Basic <base64 hash of `api_key:`>

### `bearerAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `bearer`
- Bearer format: `auth-scheme`
Send the token in the `Authorization` request header using the `Bearer` scheme.

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

## Responses

### `200`

Successful response.

### `application/json`

- Type: `object`

You can configure [webhook endpoints](https://stripe.com/docs/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://stripe.com/docs/webhooks/configure).

```json
{"description":"You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.\n\nMost users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.\n\nRelated guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure).","properties":{"api_version":{"description":"The API version events are rendered as for this webhook endpoint.","maxLength":5000,"nullable":true,"type":"string"},"application":{"description":"The ID of the associated Connect application.","maxLength":5000,"nullable":true,"type":"string"},"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"description":{"description":"An optional description of what the webhook is used for.","maxLength":5000,"nullable":true,"type":"string"},"enabled_events":{"description":"The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.","items":{"maxLength":5000,"type":"string"},"type":"array"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.","type":"object"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["webhook_endpoint"],"type":"string"},"secret":{"description":"The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation.","maxLength":5000,"type":"string"},"status":{"description":"The status of the webhook. It can be `enabled` or `disabled`.","maxLength":5000,"type":"string"},"url":{"description":"The URL of the webhook endpoint.","maxLength":5000,"type":"string"}},"required":["created","enabled_events","id","livemode","metadata","object","status","url"],"title":"NotificationWebhookEndpoint","type":"object","x-expandableFields":[],"x-resourceId":"webhook_endpoint"}
```

### `default`

Error response.

### `application/json`

- Type: `object`

An error response from the Stripe API

```json
{"description":"An error response from the Stripe API","properties":{"error":{"$ref":"#/components/schemas/api_errors"}},"required":["error"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request POST \
  --url https://api.stripe.com/v1/webhook_endpoints/{webhook_endpoint} \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data '{
  "description": "string",
  "disabled": true,
  "enabled_events": [
    "string"
  ],
  "expand": [
    "string"
  ],
  "metadata": "string",
  "url": "string"
}'
```
