Docker Webhooks
Configure the Docker image to call a URL when specific events occur, such as queuing, rejection, or errors.
All webhooks use the HTTP GET method with no request body. Browserless does not read the response. Respond quickly (HTTP 200/204) to close the connection.
Queuing
QUEUE_ALERT_URL triggers a GET request to the specified URL when requests start queuing.
$ docker run -d \
--restart always \
--name browserless \
-e "QUEUE_ALERT_URL=https://my.website.com/queued" \
-p 3000:3000 \
registry.browserless.io/browserless/browserless/enterprise:latest
Rejections
REJECT_ALERT_URL triggers a GET request to the specified URL when requests are rejected.
$ docker run -d \
--restart always \
--name browserless \
-e "REJECT_ALERT_URL=https://my.website.com/rejected" \
-p 3000:3000 \
registry.browserless.io/browserless/browserless/enterprise:latest
Timeouts
TIMEOUT_ALERT_URL triggers a GET request to the specified URL when sessions time out.
$ docker run -d \
--restart always \
--name browserless \
-e "TIMEOUT_ALERT_URL=https://my.website.com/time-out" \
-p 3000:3000 \
registry.browserless.io/browserless/browserless/enterprise:latest
Errors
ERROR_ALERT_URL triggers a GET request to the specified URL when unhandled errors occur during request processing.
$ docker run -d \
--restart always \
--name browserless \
-e "ERROR_ALERT_URL=https://my.website.com/error" \
-p 3000:3000 \
registry.browserless.io/browserless/browserless/enterprise:latest
When an error occurs, Browserless appends the error message as a query parameter:
GET https://my.website.com/error?error=Session%20timeout%20exceeded
No request body is sent. Parse the error query parameter to extract the message.
Health Failure
FAILED_HEALTH_URL triggers a GET request to the specified URL when CPU and memory exceed 99%. Use this event to restart or replace the container.
$ docker run -d \
--restart always \
--name browserless \
-e "FAILED_HEALTH_URL=https://my.website.com/failed-health" \
-p 3000:3000 \
registry.browserless.io/browserless/browserless/enterprise:latest
For webhooks for other events, contact us.