> For the complete documentation index, see [llms.txt](https://docs.api.intratool.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.intratool.de/api-reference/automation/action-types/webhook.md).

# Webhook

Dispatches an outbound webhook request.

## Type key

`webhook`

## HTTP Methods <a href="#http-methods" id="http-methods"></a>

* `GET` - Retrieves a resource.
* `POST` - Submits a payload and is used when `method` is omitted.
* `PUT` - Replaces a resource with the supplied payload.
* `PATCH` - Partially updates a resource.
* `DELETE` - Deletes a resource.

## Authentication Types <a href="#authentication-types" id="authentication-types"></a>

* `basic` - Sends an HTTP Basic Authorization header from `auth.basic` credentials.
* `header` - Sends the configured `auth.header` name and value.
* `jwt` - Sends a generated bearer token.
* `secret` - Signs the webhook request with `auth.secret.secret`.

## Config keys

| Key                   | Type               | Required      | Description                                                                             |
| --------------------- | ------------------ | ------------- | --------------------------------------------------------------------------------------- |
| `url`                 | `string`           | yes           | Target URL for the webhook request. Must be a valid active URL.                         |
| `method`              | `string` \| `null` | no            | Selects one of the supported [HTTP Methods](#http-methods). Default at runtime: `POST`. |
| `headers`             | `object`           | yes (present) | Custom request headers as key-value map.                                                |
| `auth`                | `object` \| `null` | no            | Optional auth configuration.                                                            |
| `auth.type`           | `string` \| `null` | no            | Selects one of the supported [Authentication Types](#authentication-types).             |
| `auth.basic.username` | `string`           | conditional   | Required when `auth.type = basic`.                                                      |
| `auth.basic.password` | `string`           | conditional   | Required when `auth.type = basic`.                                                      |
| `auth.header.name`    | `string`           | conditional   | Required when `auth.type = header`.                                                     |
| `auth.header.value`   | `string`           | conditional   | Required when `auth.type = header`.                                                     |
| `auth.secret.secret`  | `string`           | conditional   | Required when `auth.type = secret`.                                                     |

Webhook config values are used as plain strings. System variables are currently not resolved in `webhook` config fields.

## Example config

```json
{
  "url": "https://hooks.example.com/intratool/events",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "X-Source": "intratool"
  },
  "auth": {
    "type": "header",
    "header": {
      "name": "Authorization",
      "value": "Bearer sk_live_example_token"
    }
  }
}
```
