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

# Webhooks

Webhooks enable your app or service to listen for events happening in Clarityflow and get notified via HTTP POST requests.

{% hint style="info" %}
*Tip:* [*webhook.site*](https://webhook.site/) *is a handy utility for testing webhooks and inspecting their payloads.*
{% endhint %}

### Registering Webhooks

Go to Settings > Integrations > **Manage Webhooks**.

Input the Webhook URL.

Select at least 1 Clarityflow event to trigger sending to this webhook URL. &#x20;

<figure><img src="/files/OrLNeIiFLKwQDjEcqTe6" alt=""><figcaption></figcaption></figure>

### Consuming Webhooks

When an event occurs that triggers a webhook, we will send an HTTP POST to the URL you specified, with a JSON-encoded body.

Webhook request bodies include:

```
{
  "type": "conversation_created",
  "id": "862f22c9-b692-4b3f-9d7e-dcf64172719e",
  "occurred_at": "2022-04-01T10:06:53.992-04:00",
  "payload": {
    ...
  }
}
```

### Webhook Events

As of this writing (December 2024), webhooks can be sent when the following events occur in Clarityflow.  Click each to get more information about the data sent with each request:

* [New Conversation](https://api.clarityflow.com/~/changes/JkGQxI2dRe0JHYjcOaL1/webhooks/webhook-event-for-conversation-created)
* [New Message](https://api.clarityflow.com/~/changes/JkGQxI2dRe0JHYjcOaL1/webhooks/webhook-event-for-message-created)
* [A Message was viewed](https://api.clarityflow.com/~/changes/JkGQxI2dRe0JHYjcOaL1/webhooks/webhook-event-for-message-viewed)
* [An appointment was scheduled](https://api.clarityflow.com/~/changes/JkGQxI2dRe0JHYjcOaL1/webhooks/webhook-event-for-appointment-scheduled)
* [A purchase was made](https://api.clarityflow.com/~/changes/JkGQxI2dRe0JHYjcOaL1/webhooks/webhook-event-for-product-purchased)
* [A form was submitted](https://api.clarityflow.com/~/changes/JkGQxI2dRe0JHYjcOaL1/webhooks/webhook-event-for-form-submission)
* A task was completed

You can also add filters on some of the events, for example, specific products purchased or specific forms submitted.


---

# 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://api.clarityflow.com/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.
