Update a webhook configuration

Updates the name, URL or active state of a webhook configuration.

URL checks

The checks run on the new URL when you change the URL, and on the stored URL when you set is_active to true on an inactive configuration. Other updates run no check.

This endpoint checks the URL in the order below. If a check fails, you get a 400, the remaining checks do not run, and the configuration is not changed.

  1. The scheme must be http or https. Otherwise, the error key is error.validation.WebhookUrlScheme. Scheme names are not case-sensitive.
  2. The URL must be valid. Otherwise, the error key is error.validation.ValidWebhookUrl.
  3. An http URL requires allow_insecure_http set to true. Otherwise, the error key is error.validation.WebhookUrlScheme.
  4. This endpoint sends one HEAD request to your URL:
    • If the host resolves only to IANA special-purpose IPv4 addresses, no request is sent and the error key is error.validation.ValidWebhookUrl.
    • If the server presents a TLS certificate that is expired, untrusted, or does not match the host name, the error key is error.validation.WebhookCertificate.
    • If the request gets no HTTP response, the error key is error.validation.WebhookUrlUnreachable. This covers a host name that does not resolve, a refused or timed-out connection, and a TLS handshake that fails for a reason other than the certificate (for example, a server that only supports TLS versions below 1.2).
    • Any HTTP status code passes, because the server responded.

http and https

We recommend an https URL. Webhooks to an https URL use TLS 1.2 or higher.

To change the URL to an http URL, or to activate a webhook with an http URL, set allow_insecure_http to true. Other updates ignore the field. The traffic is unencrypted.

Permissions

You need the "Create and update webhooks" permission to use this endpoint.

Path Params
string
required

Identifier of the webhook notification configuration object

Body Params
boolean | null

Set to true to use an http URL. An update needs it only when it changes the URL or activates the webhook. Ignored for an https URL.

boolean | null

This flag sets whether the webhook is in use or not. If 'true' Mesh sends updates when the monitored events take place. If 'false', Mesh will not send any updates. If unset the current value does not change.

string | null

The name of the webhook configuration.

uri | null

The client side URL that webhooks are sent to. We strongly recommend https. To use http, set allow_insecure_http to true. The scheme must be http or https, and the host must not resolve only to IANA special-purpose IPv4 addresses. For an https URL, the TLS certificate must match the host name, be trusted, and not be expired. See "URL checks" in the endpoint description.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json