Webhooks
Summary of webhook endpoints
- GET /admin/api/webhooks - list all webhooks.
- GET /admin/api/webhooks/1 - list attributes of a webhook.
- GET /admin/api/webhooks/sample - sample webhook payload.
- POST /admin/api/webhooks - create a new webhook.
- PUT /admin/api/webhooks/1 - update attributes of a webhook.
- DELETE /admin/api/webhooks/1 - remove a webhook.
List all webhooks for the current site
Get list of webhooks.
GET /admin/api/webhooks
Example response
Status: 200 OK
[
{
"id": 1,
"enabled": true,
"target": "form",
"event": "submit",
"url": "https://my.endpoint/form_submitted",
"source": "api",
"description": null,
"created_at": "2025-03-03T09:35:11.000Z",
"updated_at": "2025-03-03T09:35:11.000Z"
}
]
Filter attributes
Read more about filters.
- Object
webhookattributes:id,enabled,source,target,target_id,event,url,created_at,updated_at.
List attributes of a webhook
GET /admin/api/webhooks/1
Example request
GET https://helloworld.voog.com/admin/api/webhooks/1
Example response
Status: 200 OK
{
"id": 1,
"enabled": true,
"target": "form",
"event": "submit",
"url": "https://my.endpoint/form_submitted",
"source": "api",
"description": null,
"created_at": "2025-03-03T09:35:11.000Z",
"updated_at": "2025-03-03T09:35:11.000Z"
}
Get a sample webhook data
Get a sample webhook payload data, which can be used to test the webhook endpoint.
Requires target, event and optionally target_id parameters.
If no such webhook event is found, an error is returned.
GET /admin/api/webhooks/sample
Example request
GET https://helloworld.voog.com/admin/api/webhooks/sample?target=form&event=submit&target_id=1
Example response
[
{
"account_id": 1,
"target": "form",
"target_id": 1,
"event": "submit",
"created_at": "2025-03-03T09:37:00.000Z",
"data": {
"object": {
"id": 1,
"spam": false,
"created_at": "2025-03-07T07:50:08.000Z",
"updated_at": "2025-03-07T07:50:08.000Z",
"user_country": null,
"user_city": null,
"user_language": "en-GB",
"user_latitude": null,
"user_longitude": null,
"url": "https://helloworld.voog.com/admin/api/forms/1/tickets/1",
"form": {
"id": 1,
"title": "Form title",
"created_at": "2025-01-16T08:43:51.000Z",
"updated_at": "2025-02-14T19:17:44.000Z",
"url": "https://helloworld.voog.com/admin/api/forms/1"
},
"data": {
"field_1713257031241": "Your name",
"field_1713257031242": "E-mail",
"field_1713257031243": "Your message",
}
},
"metadata": {
"ip_address": "127.0.0.1",
"page_id": "p1",
"page_uri": "https://helloworld.voog.com/example",
"page_name": "Sample Page",
"submitted_at": "2025-03-06T15:27:45Z",
"variant_id": "p2"
}
}
}
]
Create a webhook
POST /admin/api/webhooks
Example data
{
"target": "form",
"event": "submit",
"url": "https://my.endpoint/other_form_submitted"
}
Example response
Status: 201 Created
{
"id": 2,
"enabled": true,
"target": "form",
"event": "submit",
"url": "https://my.endpoint/other_form_submitted",
"source": "api",
"description": null,
"created_at": "2025-03-03T11:14:32.285Z",
"updated_at": "2025-03-03T11:14:32.285Z"
}
Parameters
enabled— Flag switching the webhook on or off,trueby default.target— Webhook target object, currentlyticket,formandorderare supported.event— Event triggering the webhook. Allowed values are:- If target is
ticket: one ofcreate,update,delete. - If target is
form:submit. - If target is
order: one ofcreate,update,delete,paid,cancelled,shipped,payment_failed.
- If target is
target_id- ID of target object.url— A valid HTTP(S) endpoint.source- Webhook creation source,apiby default.description- (Optional) Description for the webhook.
Please note that Voog admin panel only displays webhooks with source set to api or user.
Update a webhook
PUT /admin/api/webhooks/1
Example request
PUT https://helloworld.voog.com/admin/api/webhooks/1
Example data
{
"event": "delete",
"url": "https://my.endpoint/ticket_deleted",
"source": "user"
}
Example response
Status: 200 OK
{
"id": 1,
"enabled": true,
"target": "ticket",
"event": "delete",
"url": "https://my.endpoint/ticket_deleted",
"source": "user",
"description": null,
"created_at": "2025-03-03T09:35:11.000Z",
"updated_at": "2025-03-03T11:17:16.000Z"
}
Parameters
enabled— Flag switching the webhook on or off,trueby default.target— Webhook target object, currentlyticket,formandorderare supported.event— Event triggering the webhook. Allowed values are:- If target is
ticket: one ofcreate,update,delete. - If target is
form:submit. - If target is
order: one ofcreate,update,delete,paid,cancelled,shipped,payment_failed.
- If target is
target_id- ID of target object.url— A valid HTTP(S) endpoint.source- Webhook creation source,apiby default.description- (Optional) Description for the webhook.
Please note that Voog admin panel only displays webhooks with source set to api or user.
Remove a webhook
DELETE /admin/api/webhooks/1
Example request
DELETE https://helloworld.voog.com/admin/api/webhooks/1
Example response
Status: 204 No Content