> ## Documentation Index
> Fetch the complete documentation index at: https://intunedhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Sink

## Introduction

The webhook sink delivers Run results to your endpoint via POST request. This is useful for sending results directly to your backend or a third-party service.

## Usage

Webhook sinks can be used with either the [Run API](/client-apis/api-reference/projectsruns/run-api--start) or the [Job API](/client-apis/api-reference/projectsjobs/create-job).

When creating a Run or Job, specify the sink type as `webhook` and provide the destination `url`. You can also optionally provide headers to include in the request. See the Configuration section below for full details.

## Configuration

The webhook sink requires a destination URL. This URL must be publicly accessible. You can optionally add headers to include with each request.

### Properties

<ParamField body="type" type="enum<string>" required>
  The type of sink.

  Available options: `webhook`
</ParamField>

<ParamField body="url" type="string" required>
  The destination URL where Intuned sends Run results.

  Example: `https://example.com/webhook`
</ParamField>

<ParamField body="headers" type="object">
  Headers to include in the request to your endpoint.

  <Expandable>
    Key-value pairs of header names and values.

    Example:

    ```json theme={null}
    {
      "Content-Type": "application/json",
      "Authorization": "Bearer token"
    }
    ```
  </Expandable>
</ParamField>

<ParamField body="skipOnFail" type="boolean" default="false">
  If true, results from failed Runs are not sent.
</ParamField>

<ParamField body="apisToSend" type="array<string>">
  List of API names to include. If not provided, results from all APIs are sent.

  Example: `["api1", "api2"]`
</ParamField>

### Example Configuration

```json theme={null}
{
  // other run/job configuration fields
  ....
  "sink": {
    "type": "webhook",
    "url": "https://example.com/webhook",
    "headers": {
      "Authorization": "Bearer <token>"
    }
  }
}
```

## API

### Request

Intuned sends a POST request to your endpoint with a JSON payload containing the API Run result and additional metadata. See the [sink body page](./body) for more information on the payload structure.

### Response

The request is considered successful if your endpoint returns a status code in the 200-299 range. If not, the request is considered a failure and Intuned retries with exponential backoff.
