# Webhook

type: "io.kestra.core.models.triggers.types.Webhook"

A Webbook trigger allows you to trigger a flow from a webhook URL.
The trigger will generate a key that must be used on the URL : /api/v1/executions/webhook/{namespace}/[flowId]/{key}.
Kestra accepts GET, POST & PUT requests on this URL.
The whole body & headers will be available as a variables.

# Example

Add a trigger to the current flow:

  - id: webhook
    type: io.kestra.core.models.triggers.types.Webhook

After the trigger is created, a key will be created that will be used in the webhook URL. Now, you can launch the flow on the URL /api/v1/executions/webhook/{namespace}/[flowId]/4wjtkzwVGBM9yKnjm3yv8r.

  - id: webhook
    type: io.kestra.core.models.triggers.types.Webhook
    key: 4wjtkzwVGBM9yKnjm3yv8r

# Inputs

# id

  • Type: String
  • Required:

Unique for a flow.

# key

  • Type: String
  • Required:

The unique key that will be part of the URL.

If you don’t provide a key, a random one will be generated. This is used as the key for generating the URL of the webhook.


Take care when using a manual key, the key is the only security to protect your webhook and must be protected as a secret!

# Outputs

# body

  • Type: Object

The full body of the webhook request.

We try to deserialize the incoming request as json (array or object).
If we can’t the full body as string will be available

# headers

  • Type: Map<String, List<String>>

The headers of the webhook request.