Voog.com

Webhooks

Summary of webhook endpoints

See also webhooks in ecommerce.

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",
    "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 webhook attributes: id, enabled, 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",
  "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

[
  {
    "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": 1,
        "page_uri": "https://helloworld.voog.com/example",
        "page_name": "Sample Page",
        "submitted_at": "2025-03-06T15:27:45Z",
        "variant_id": 2
      }
    }
  }
]

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",
  "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, true by default.
  • target — Webhook target object, currently ticket and form are supported.
  • event — Event triggering the webhook. Allowed values are:
    • If target is ticket: one of create, update, delete.
    • If target is form: submit.
  • target_id - ID of target object.
  • url — A valid HTTP(S) endpoint.
  • description - (Optional) Description for the webhook.

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"
}

Example response

Status: 200 OK
{
  "id": 1,
  "enabled": true,
  "target": "ticket",
  "event": "delete",
  "url": "https://my.endpoint/ticket_deleted",
  "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, true by default.
  • target — Webhook target object, currently ticket and form are supported.
  • event — Event triggering the webhook. Allowed values are:
    • If target is ticket: one of create, update, delete.
    • If target is form: submit.
  • target_id - ID of target object.
  • url — A valid HTTP(S) endpoint.
  • description - (Optional) Description for the webhook.

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