Create Webhook
POST
/webhooksCreate a new webhook.
Attributes
| Attribute | Type | Description |
|---|---|---|
type * | string | |
url * | string | |
provider | string | |
status | enum | active, inactive |
workspaceId | number | |
eventId | string |
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"
}
}
}'