# Configure Webhook

<mark style="color:yellow;">`POST`</mark>  `/api/v2/webhooks`

The Configure Webhook endpoint sets a webhook for a specified event\_type. This means all events related to the specified event\_type will be sent to the configured webhook URL.\
\
**Request Body**

<table><thead><tr><th width="300">Name</th><th width="101">Type</th><th width="209">Description</th><th>Required</th></tr></thead><tbody><tr><td>event_type</td><td>integer</td><td>The type of the event. See <a data-mention href="list-webhook-event-types">list-webhook-event-types</a> for the available event types.</td><td>True</td></tr><tr><td>webhook_url</td><td>string</td><td>The endpoint that will receive webhook requests. This must be a POST endpoint.</td><td>True</td></tr></tbody></table>

###

{% code title="REQUEST" overflow="wrap" %}

```json
{
  "event_type": 1,
  "webhook_url": "https://example.com/api/webhook"
}
```

{% endcode %}

{% tabs %}
{% tab title="RESPONSE" %}

```json
{
  "status": "success",
  "data": {
    "webhook_url": "https://example.com/api/webhook",
    "event_names": null,
    "event_names": null,
    "ip_allowlist": null,
    "id": "01954751-cccd-709a-baee-ee3ddac37e39",
    "event_type": 1,
    "business_id": "06790d62-07e5-7aac-8000-d0462f2c2d94",
    "created_by": "06790d73-154f-7dae-8000-12b54a9a258a",
    "created": "2025-02-26T21:57:18.000+08:00",
    "modified_by": "06790d73-154f-7dae-8000-12b54a9a258a",
    "last_modified": "2025-02-26T21:57:18.000+08:00",
    "webhook_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}
```

{% endtab %}
{% endtabs %}
