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:

RequestResponse

{
  "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:

RequestResponse

{
  "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).

Do you have some feedback for us?

If you have suggestions for improving this article,