# Webhooks

{% hint style="info" %}
Webhooks are user-defined HTTP callbacks that are triggered by specific events within Pylon.
{% endhint %}

## Setup

1. Go to the [Webhooks](https://app.usepylon.com/settings/webhooks) page in Settings to setup your target endpoint
2. Specify the URL of your endpoint as well as any custom headers you'd like sent on each webhook. For example, here you can include authorization information like a Bearer token.
3. Go to [Triggers](https://app.usepylon.com/settings/triggers) in Settings and create a [Trigger](https://docs.usepylon.com/pylon-docs/platform/triggers) with an Action of "Send webhook". Use the "When" and "If" condition of the trigger to control when the webhook fires.

Using templated variables, you can construct your desired webhook body to look exactly like how you'd like to receive it:

<figure><img src="https://982123570-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hXBoCTTNw5flARlUVJf%2Fuploads%2FCH27ESeHYF0T8nRFuvbX%2FCleanShot%202024-10-10%20at%2018.21.58%402x.png?alt=media&#x26;token=1e9227f9-0035-446d-986a-fc2be2cb8f83" alt=""><figcaption></figcaption></figure>


---

# 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.usepylon.com/pylon-docs/developer/webhooks.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.
