# Webhook

The webhook action can be used to invoke any third-party **REST API** and sends the sample in the request body.

The HTTP method, multiple custom headers, content type, and authentication method can easily be specified.<br>

Authentication flows (e.g. Oauth2) are not yet supported.

{% hint style="info" %}
The whole sample will be forwarded to the invoked endpoint. Make sure you trust the API in question and don't include sensitive data in the sample.
{% endhint %}

![Webhook template](/files/ozLojCAfxVOz8wfydTJJ)

### Templating

It is possibly the dynamically customize the webhook url by using template variables. For example `https://webhook-url.com?deviceId={{deviceId}}`. Available variables are listed [here](/akenza.io/get-started/reference/message-templating.md).

Notably, each template will be url encoded.

```
template: https://example.com/{{data.param1}}/{{data.param2}}
data.param1: workspaces
data.param2: devices
result: https://example.com/workspaces/devices
```

Avoid to template the full path as `/`  will also be encoded:

```
template: https://example.com/{{data.param1}}
data.param1: workspaces/devices
result: https://example.com/workspaces%2Fdevices
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akenza.io/akenza.io/get-started/your-data-flow/connectors/streaming/webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
