Add Webhooks
Learn how to use Webhooks in Humanitec.

Introduction

Webhooks allow you to set up complex workflows by connecting your Internal Developer Platform with other systems (e.g., to send a Slack or Microsoft Teams message once a Deployment has successfully finished). In this section, you will learn how to create, edit, delete a Webhook for your App and how to modify the Webhook payload.

Create a Webhook

To create or update a webhook, you will need to have the Administrator role within your Organization or hold the Owner role on the App. Learn more about RBAC in Humanitec here.
UI
CLI
API
  • You can create a new Webhook on your App Settings Screen.
  • Navigate to the Manage webhooks section.
  • Insert your Webhook name and URL.
  • If needed, add Headers or Modify Payload.
  • Click Create. You will see a webhook added below.
Example for a Webhook
Our CLI is currently in closed beta. Please contact us if you want to learn more.
You can create a webhook via the Create Webhook endpoint.

Modify a Webhook Payload

All webhooks by default are set to All triggers and have a default payload that contains only the common properties of all the selected events.
1
{
2
"event": "${event}",
3
"triggered_at": "${triggered_at}",
4
"triggered_by": "${triggered_by}",
5
"org_id": "${org_id}",
6
"app_id": "${app_id}",
7
"env_id": "${env_id}"
8
}
Copied!
You can change the payload by selecting a different trigger from the triggers dropdown. The payload will change accordingly.
You can also customize the payload by using placeholders. Every payload parameter is available to a user as a placeholder with the format ${parameter_name}.

Common Parameters

Parameter
Description
event
The ID of the event
org_id
The organization the event occurred in
triggered_at
The datetime of triggering the underlying event
triggered_by
The user who triggered the underlying event

environment.created and environment.deleted Events

Parameter
Description
app_id
The application the environment created in
env_id
The environment ID
name
The environment name
type
The environment type

deployment.started and deployment.finished Events

Parameter
Description
app_id
The application the deployment occurred in
env_id
The environment the deployment occurred in
deploy_id
The deployment ID
delta_id
The deployment delta id
set_id
The deployment set id
comment
The deployment comment
status
The deployment status
Example payload for a deployment.finished event:
1
{
2
"event": "${event}",
3
"org_id": "${org_id}",
4
"app_id": "${app_id}",
5
"env_id": "${env_id}",
6
"triggered_at": "${triggered_at}",
7
"triggered_by": "${triggered_by}",
8
"deploy_id": "${deploy_id}",
9
"delta_id": "${delta_id}",
10
"set_id": "${set_id}",
11
"comment": "${comment}",
12
"status": "${status}"
13
}
Copied!

Edit or Delete a Webhook

You can edit or delete a webhook by clicking on the three dots on the right side of your webhook and selecting the according option.
Edit or delete the Webhook
Last modified 1d ago