Webhooks

Qovery allows you to create webhooks at organization-level so that, when an event happens on an environment within your organization, you can get notified on external applications (for instance, Slack).

You can trigger webhooks when:

  • A deployment has started in the environment.
  • A deployment has been successful in the environment.
  • A deployment has been cancelled in the environment.
  • A deployment has failed in the environment.

Creating a Webhook

To create a webhook via the Qovery API:

  1. Install the Qovery CLI.

  2. Generate an API Token.

  3. Enter a cURL command similar to this:

    curl -X POST -H 'Content-type: application/json' -H 'Authorization: Token <Your API Token>' -d \
    '{"description": "slack notifications", "target_url": "<Your Slack Webhook URL>", "events": ["DEPLOYMENT_STARTED", "DEPLOYMENT_CANCELLED", "DEPLOYMENT_SUCCESSFUL", "DEPLOYMENT_FAILURE"], "kind": "SLACK", "enabled": true}' \
    "https://api.qovery.com/organization/{Your Organization ID}/webhook"

    The above command is used to create a webhook to get notifications on Slack whenever a deployment has been started, cancelled, successful or failed.

    To customize the command so that it fits your specific needs:

    • Replace <Your API Token> with your actual Qovery API token.
    • With the "description" parameter, enter a self-explanatory description of what your webhook does (in the example, "description": "slack notifications" clearly states that the webhook triggers notifications on Slack).
    • Replace <Your Slack Webhook URL> with the webhook URL provided by the external application you want to receive notifications on.
    • With the "events" parameter, list all the events you want to be notified of.
    • With the "kind" parameter, specify which kind of webhook you want to create. At the moment you can specify : "kind": "STANDARD" to create a generic webhook, or "kind": "SLACK" to create a Slack webhook.
    • Replace {Your Organization ID} with the ID of the Qovery organization you want to create your webhook on.

    For information on all the parameters you can set depending on which kind of notifications you want to receive and on which external application, see our Qovery API Documentation.

Managing your Webhooks

Via the Qovery API, you can also: