---
title: "POST webhook"
slug: "post-webhook"
abstract: "How to create a new webhook."
---
# POST webhook

A `POST` query to the *webhooks* endpoint creates a new webhook.

> [!warning]
> When creating a webhook, you must use an HTTPS URI, not HTTP.

| Relative Route | `/webhooks` |
| --- | --- |
| `HTTP Verb` | `POST` |

## Body

The body structure is as follows:

```json
{
  "label": "My new webhook",
  "createdBy": "anco",
  "uri": "https://localhost",
  "method": "GET",
  "headers": {
    "X-Custom-Header1":"foo"
  },
  "body": "bar"
}

```

## Response

A `POST` query returns the new webhook details structured as follows:

```json
{
  "id": "12345",
  "tenantId": "test-tenant",
  "label": "My new webhook",
  "uri": "https://localhost/",
  "method": "GET",
  "headers": {
    "X-Custom-Header1": "foo"
  },
  "body": "bar",
  "createdBy": "anco",
  "created": "2021-03-26T11:`31:23`.894452+`00:00`"
}

```

You can find the new webhook location in the response header.

A successful query returns the *created* status code (201).