# Webhook

This destination service allows you to send data from DinMo to any system supporting **HTTP webhooks** by dynamically constructing URLs with both static and record-based parameters. This connector provides a flexible way to trigger external workflows, notify third-party systems, or record conversions based on your segment data.

### Overview

The **Webhook Connector** allows you to send data from DinMo to any external platform via **HTTP POST requests**.\
Each request URL can include a mix of **static query parameters** (shared across all records) and **dynamic parameters** mapped to your segment columns.

### Destination Configuration

To configure your initial destination, you must define the **base endpoint URL** where requests should be sent. You can add static query parameters if needed. For instance:

```
https://example.com/webhook?foo=bar
```

#### Supported HTTP Methods

The **Webhook Connector** supports several HTTP request methods to interact with your external systems.\
You can choose the method that best fits your API or webhook endpoint requirements.

| Method     | Description                                                     | Typical Use Case                                               |
| ---------- | --------------------------------------------------------------- | -------------------------------------------------------------- |
| **POST**   | Sends data to create or trigger an action on the target system. | Create a new record, trigger an event, or send a notification. |
| **PUT**    | Replaces an existing resource with new data.                    | Update a full object or overwrite an existing record.          |
| **PATCH**  | Partially updates an existing resource.                         | Modify a specific field or attribute of a record.              |
| **DELETE** | Removes an existing resource from the target system.            | Delete or deactivate an entity remotely.                       |

When creating or editing your **Webhook Destination**, select the desired HTTP method under **HTTP Method**.

> 💡 For most webhook and event use cases, **POST** is recommended.\
> PUT, PATCH, and DELETE are typically used for advanced API integrations.

***

#### Notes

* All methods use the same URL structure and query parameter configuration (base URL, static, and dynamic parameters).

### Activation Configuration

Once your destination is configured:

1. Go to the **Segments** tab and choose the segment you want to export.
2. Click **Activate Segment**, and select your **Webhook Destination**.
3. Indicate the static fields (if required).
4. Map the dynamic fields (if required).

Dynamic parameters are populated from your **segment columns**, allowing each record to generate a unique request.

* Go to the **Query parameters** section.
* Click **Add a mapping**.
  * **DinMo field** → The column from your segment to use as the value&#x20;
  * **Custom attribute name** → The query key you want to include in the URL

**Example:**

| Custom attribute name | DinMo field      |
| --------------------- | ---------------- |
| email                 | `contacts.email` |
| user\_id              | `contacts.id`    |

```
https://example.com/webhook?foo=bar&email=john@example.com&user_id=123
```

DinMo will now send **one HTTP request per record**, using the URL structure you defined.

#### Test and Validate

After activation:

1. Monitor the **Running History** in DinMo to verify successful delivery.
2. Check the receiving system (CRM, API, automation tool, etc.) to confirm the webhook data is received correctly.
3. Look for HTTP 2xx responses — these indicate success.

> ❗ If you receive errors (4xx or 5xx), check your base URL, parameters, and endpoint configuration.
