Skip to main content
Version: v1.2.1

Create a webhook subscription

Create a webhook

POST 

/webhooks

Create a webhook subscription

  • This endpoint is used to create a webhook subscription for specific events in your organization or projects.
  • Webhooks are scoped to a level (organization, project, or environment) and require a referenceId that must exist in the corresponding scope.
  • You can also define entity-specific filters using entityFilters, allowing you to limit events to specific resource names, types, or categories.

Scopes

  • organization: Applies to all projects/environments under the organization.
  • project: Targets events within a specific project (e.g. environments, runtimes).
  • environment: Focused on events within one environment (e.g. runtimes).

Entity Filters

  • These allow you to filter only the events that match a particular pattern. For example:
    • Filter only runtimes that start with api-:
      \{ "entity": "runtime", "name": "api-%" \}
    • Only include clusters from a environment:
      \{ "entity": "environment", "name": "dev" \}

  • The combination of scope, referenceId, url, and entityFilters must be unique within an organization.

Body

  • The body property is an optional string that uses the 'mustache' template syntax. If provided, it will be used to format the webhook payload according to the specified template. For example, when integrating with Microsoft Teams, the body must follow the structure required by Teams' webhook format. If the body property is not provided, the webhook will send the full event data as a JSON object.

Headers

  • Authorization: Optional. If provided, it will be included in the webhook request headers
  • X-Custom-Header: Optional. If provided, it will be included in the webhook request headers

Request

Responses

Webhook created successfully