---
title: "Create a webhook subscription"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Create a webhook subscription

`POST /webhooks`

## Request

- Base URL: `https://platform-api.visitoai.com/m2m/v1`
- URL: `https://platform-api.visitoai.com/m2m/v1/webhooks`
- Auth: HTTP bearer

Requires `webhooks:write`.

## Request body

- WebhookInput
  - `url` string, uri, required
  - `events` string[], required
  - `includeCommerce` boolean: Explicit opt-in for Commerce-backed ticket events. Delivery rechecks scope, enrollment and current Stripe mode.

## Response `201`

Success

- WebhookCreated
  - `webhook` Webhook
    - `subscriptionId` string
    - `url` string
    - `events` string[]
    - `active` boolean
    - `createdAt` string
    - `updatedAt` string
    - `includeCommerce` boolean: Explicit opt-in for Commerce-backed ticket events. Delivery rechecks scope, enrollment and current Stripe mode.
  - `secret` string: Returned once. Store securely.

## Other responses

- `default`: Structured error

---

[API](https://skmtc.dev/visitoai/apis/visito-m2m-api.md) - [All operations](https://skmtc.dev/visitoai/apis/visito-m2m-api/llms.txt) - [OpenAPI document](https://skmtc.dev/visitoai/apis/visito-m2m-api/revisions/98377d35c234?raw)
