# Create an Event Destination

Create a new event destination.

## Request

```curl
curl -X POST https://api.stripe.com/v2/core/event_destinations \
  -H "Authorization: Bearer <<YOUR_SECRET_KEY>>" \
  -H "Stripe-Version: 2026-07-29.dahlia" \
  --json '{
    "name": "My Event Destination",
    "description": "This is my event destination, I like it a lot",
    "enabled_events": [
        "v1.billing.meter.error_report_triggered"
    ],
    "type": "webhook_endpoint",
    "webhook_endpoint": {
        "url": "https://example.com/my/webhook/endpoint"
    },
    "event_payload": "thin",
    "include": [
        "webhook_endpoint.url"
    ]
  }'
```

### Response

```json
{
  "id": "ed_test_61RM8ltWcTW4mbsxf16RJyfa2xSQLHJJh1sxm7H0KVT6",
  "object": "v2.core.event_destination",
  "created": "2024-10-22T16:20:09.931Z",
  "description": "This is my event destination, I like it a lot",
  "enabled_events": [
    "v1.billing.meter.error_report_triggered"
  ],
  "event_payload": "thin",
  "events_from": [
    "@self"
  ],
  "livemode": false,
  "metadata": {},
  "name": "My Event Destination",
  "snapshot_api_version": null,
  "status": "enabled",
  "status_details": null,
  "type": "webhook_endpoint",
  "updated": "2024-10-22T16:20:09.937Z",
  "webhook_endpoint": {
    "signing_secret": null,
    "url": "https://example.com/my/webhook/endpoint"
  }
}
```

## Parameters

- `enabled_events` (array of strings, required)
  The list of events to enable for this endpoint.

- `event_payload` (enum, required)
  Payload type of events being subscribed to.
Possible enum values:
  - `snapshot`
    Events from v1 APIs.

  - `thin`
    Events from v2 APIs.

- `name` (string, required)
  Event destination name.

- `type` (enum, required)
  Event destination type.
Possible enum values:
  - `amazon_eventbridge`
    Amazon EventBridge.

  - `azure_event_grid`
    Azure Event Grid.

  - `webhook_endpoint`
    Webhook endpoint.

- [`amazon_eventbridge`](https://docs.stripe.com/api/v2/core/event-destinations/create.md?query=amazon_eventbridge) (object, optional)
  Amazon EventBridge configuration.

- [`azure_event_grid`](https://docs.stripe.com/api/v2/core/event-destinations/create.md?query=azure_event_grid) (object, optional)
  Azure Event Grid configuration.

- `description` (string, optional)
  An optional description of what the event destination is used for.

- `events_from` (array of strings, optional)
  Specifies which accounts’ events route to this destination. `@self`: Receive events from the account that owns the event destination. `@accounts`: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts. `@organization_members`: Receive events from accounts directly linked to the organization. `@organization_members/@accounts`: Receive events from all accounts connected to any platform accounts in the organization.

- `include` (array of enums, optional)
  Additional fields to include in the response.
Possible enum values:
  - `webhook_endpoint.signing_secret`
    Include parameter to expose `webhook_endpoint.signing_secret`.

  - `webhook_endpoint.url`
    Include parameter to expose `webhook_endpoint.url`.

- `metadata` (map, optional)
  Metadata.

- `snapshot_api_version` (string, optional)
  If using the snapshot event payload, the API version events are rendered as.

- [`webhook_endpoint`](https://docs.stripe.com/api/v2/core/event-destinations/create.md?query=webhook_endpoint) (object, optional)
  Webhook endpoint configuration.

## Returns

Returns an [Event Destination object](https://docs.stripe.com/api/v2/core/event-destinations/object.md).

## Error Codes

| HTTP status code | Code | Description |
| --- | --- | --- |
| 400 | expired_azure_partner_authorization | Error returned when a user tries to create an event destination with an expired Azure partner authorization. |
| 400 | invalid_azure_partner_authorization | Error returned when a user tries to create an event destination without an Azure partner authorization. |
| 400 | invalid_azure_partner_configuration | Error returned when no valid partner configuration is found using the user provided Azure subscription ID and Azure resource group name. |
| 409 | idempotency_error | An idempotent retry occurred with different request parameters. |
