# Outgoing Webhooks

## Introduction

Outgoing webhooks enable an external application (controlled by you) to be notified when an event happens within the Clockwork ecosystem. Examples include when an invitation email is sent to a customer, or when a new study is launched.

Once you have subscribed to an event, we will send an HTTP `post` request to a URL that you supply, with an attached payload of metadata about the event

## List of Webhooks supported

Currently, the only events we support for outgoing webhooks are:

`invitation_sent`- Triggered when an appointment invitation email is created and sent

The payload for `invitation_sent`:

```
event_name - The name of the webhook
uuid - The unique identifier for this webhook in Clockwork
sub_uuid - The unique identifier for your instance of this webhook in Clockwork
customer_uuid - The unique identifier for this customer in Clockwork
customer_email - The email of the customer
customer_first_name - The customer's first name
customer_last_name - The customer's last name
customer_attributes - The current list of all attributes of the customer
customer_last_contacted_at - A timestamp of when the customer was last contacted
```

## Example

Let's say you want to use the `invitation_sent` webhook. First, you would contact us and let us know the name of the event (`invitation_sent`), and the URL where we should send the event, e.g. `https://youdomain.com/webhooks/webhook_name`. Once set up, you'll start receiving `POST` requests to the url you specified, with the payload that was detailed above.


---

# 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.clockworkhq.com/outgoing-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.
