> For the complete documentation index, see [llms.txt](https://docs.usepylon.com/pylon-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usepylon.com/pylon-docs/developer/webhooks.md).

# 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](/pylon-docs/platform/triggers.md) 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="/files/ECYviQUoc8zGeXhJS2jd" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.usepylon.com/pylon-docs/developer/webhooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
