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

# Webhooks

## Create a webhook

<mark style="color:green;">`POST`</mark> `https://harmonizely.com/api/webhooks`

Creates a new webhook object.

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |
| X-API-KEY    | string | Your API key     |

#### Request Body

| Name   | Type   | Description                                                                                                                                                |
| ------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| events | array  | <p>The list of events to enable for this endpoint.<br>Possible values:<br><code>\["meetingScheduled", "meetingCancelled", "meetingRescheduled"]</code></p> |
| secret | string | The endpoint's secret used to generate webhook signatures.                                                                                                 |
| url    | string | The webhook URL.                                                                                                                                           |

{% tabs %}
{% tab title="201 Webhook successfully created." %}

```javascript
{
    "events": [
        "meetingScheduled",
        "meetingCancelled",
        "meetingRescheduled"
    ],
    "url": "https://example.com/webhook",
    "secret": "something",
    "created_at": "2021-05-25T06:17:58+00:00",
    "uuid": "3e687c78-a8b8-4837-9333-57e3d807e61c"
}
```

{% endtab %}

{% tab title="422 Invalid arguments." %}

```javascript
{
    "message": "Invalid arguments",
    "errors": {
        "url": [
            "This value is not a valid URL."
        ]
    }
}
```

{% endtab %}
{% endtabs %}

## List all webhooks

<mark style="color:blue;">`GET`</mark> `https://harmonizely.com/api/webhooks`

Lists all webhooks.

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |
| X-API-KEY    | string | Your API key     |

{% tabs %}
{% tab title="200 Returns a list of all webhooks." %}

```javascript
{
    "page": 1,
    "limit": 10,
    "pages": 1,
    "total": 1,
    "_embedded": {
        "items": [
            {
                "events": [
                    "meetingRescheduled",
                    "meetingCancelled",
                    "meetingScheduled"
                ],
                "url": "https://example.com/webhook",
                "secret": null,
                "created_at": "2021-05-24T11:04:11+00:00",
                "uuid": "2ba9ee0b-e62a-43bd-aed0-31b26056ecdc"
            }
        ]
    },
    "_links": {
        "self": {
            "href": "/api/webhooks?page=1&limit=10"
        },
        "first": {
            "href": "/api/webhooks?page=1&limit=10"
        },
        "last": {
            "href": "/api/webhooks?page=1&limit=10"
        }
    }
}
```

{% endtab %}
{% endtabs %}

## Delete a webhook

<mark style="color:red;">`DELETE`</mark> `https://harmonizely.com/api/webhooks/:id`

Deletes a webhook.

#### Path Parameters

| Name | Type   | Description                              |
| ---- | ------ | ---------------------------------------- |
| id   | string | Unique identifier of the webhook (UUID4) |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |
| X-API-KEY    | string | Your API key.    |

{% tabs %}
{% tab title="204 Webhook successfully deleted." %}

```
```

{% endtab %}

{% tab title="404 Webhook not found." %}

```javascript
{
    "code": 404,
    "message": "Not found."
}
```

{% endtab %}
{% endtabs %}
