Skip to main content

Webhook

The Webhook backend will send batched events to a desired HTTP(S) destination.

Behaviour and configurations

Configuration

The following values are required when creating a webhook backend:

  • url: (string, required) a valid HTTP(S) endpoint.

Optional values:

  • format: (string, optional) the payload encoding, either json (default) or ndjson.
  • headers: (map, optional) headers sent with each request. For a bearer token, set the authorization header to Bearer <token>.
  • gzip: (boolean, optional, default true) compress the request body with gzip. The request sets the content-encoding: gzip header. Disable this when the receiver does not decompress request bodies.

Request

The request made will be a POST.

Payload format

With format set to json, each batch is sent as a JSON array of events.

With format set to ndjson, each batch is sent as newline-delimited JSON, one event per line. The request uses the application/x-ndjson content type. A user-configured content-type header takes precedence.

Batching

Events will be sent in batches of up to 250, with intervals of up to 1 second.