Create webhook (REST)
3 min
Create new webhook
Create a new webhook in an event
POST
https://api.brella.io/api/integration/organizations/{organizationId}/events/{eventId}/webhooks
Path Parameters
- {organizationId}NumberrequiredDescription
- {eventId}NumberrequiredDescription
Header Parameters
- Brella-API-Access-TokenStringrequiredDescription
- AcceptstringrequiredDescription
- Content-TypestringrequiredDescription
curl
curl --location -g --request POST 'https://api.brella.io/api/integration/organizations/{organizationId}/events/{eventId}/webhooks' \
--header 'Brella-API-Access-Token: String' \
--header 'Accept: application/vnd.brella.v4+json' \
--header 'Content-Type: application/json'\
--data '{
"webhook": {
"name": "{{webhook_name}",
"trigger_item": "{{trigger_name}}}",
"trigger_action": "{{trigger_action}}",
"request_url": "{{target_url_to_send_payload}}",
"request_method": "post"
}
}
'
'200
{
"data": {
"id": "42",
"type": "webhook",
"attributes": {
"name": "Testing Hook for Attendee Updates",
"enabled": true,
"request-url": "https://hooks.tester.com/hooks/catch/123456/abacustest/",
"request-method": "post",
"created-at": "2023-04-11T20:03:49.247Z",
"updated-at": "2023-04-11T20:03:49.247Z",
"webhookable-type": "Event",
"webhookable-id": 0117,
"trigger-item": "Attendee",
"trigger-action": "updated"
}
}
}REQUEST BODY
{
"webhook": {
"name": "{{webhook_name}",
"trigger_item": "{{trigger_name}}}",
"trigger_action": "{{trigger_action}}",
"request_url": "{{target_url_to_send_payload}}",
"request_method": "post"
}
}
Required attributes:
- name String / a webhook name to help you identify the webhook (also visible in webhook logs)
- trigger_item String / the entity that triggers the webhook; see notes for supported values
- trigger_action String / the action that triggers the webhook; see notes for supported values
- request_url String / the URL to which Brella will POST the webhook payload
- request_method String / always leave as "post"
Notes:
01: Supported trigger_item values:
- "Speaker"
- "Sponsors::Sponsor"
- "Event::Invite"
- "Event::Ticket"
- "Attendee"
- "Event::TicketPurchase"
02: Supported trigger_action values:
- created
- updated
- deleted