Skip to content

Create Webhook

POST/webhooks

Create a new webhook.

Attributes

AttributeTypeDescription
type *string
url *string
providerstring
statusenumactive, inactive
workspaceIdnumber
eventIdstring

Fields marked with * are required.

Request

js
import Confetti from 'confetti'

const confetti = new Confetti({ apiKey: 'your-key' })

const webhook = await confetti.webhooks.create({
  type: 'ticket.attending',
  url: 'https://example.com/webhook',
})
sh
curl -X POST "https://api.confetti.events/webhooks" \
  -H "Content-Type: application/json" \
  -H "Authorization: apikey your-key" \
  -d '{
  "data": {
    "type": "webhook",
    "attributes": {
      "type": "ticket.attending",
      "url": "https://example.com/webhook"
    }
  }
}'