HTTP Trigger Overview

The HTTP trigger allows external systems to initiate your workflow execution by making HTTP requests to a designated endpoint. This enables on-demand workflow execution, webhook integration, and API-driven automation.

How HTTP triggers work

When you deploy a workflow with an HTTP trigger:

  1. External systems send HTTP POST requests to a CRE gateway
  2. The request specifies your workflow ID in the JSON-RPC body along with the input payload
  3. Requests must be cryptographically signed using a private key corresponding to an authorized EVM address in the target workflow
  4. CRE validates the signature against your configured authorizedKeys
  5. If authorized, your workflow callback executes with the request payload

When to use HTTP triggers

HTTP triggers are ideal for:

  • Webhook integration: Receive events from external services (GitHub, payment processors, etc.)
  • On-demand execution: Allow users or systems to trigger specific workflow logic when needed
  • API gateway patterns: Create authenticated endpoints that execute blockchain operations
  • Event bridging: Connect offchain systems events to workflows

The complete HTTP trigger journey

This section provides everything you need to work with HTTP triggers:

  1. Configuration & Handler - Learn how to configure HTTP triggers in your workflow code and write handler functions to process incoming requests

  2. Testing in Simulation - Test your HTTP trigger locally using the cre workflow simulate command before deploying

  3. Triggering Deployed Workflows - Understand the JSON-RPC format and JWT authentication required to trigger your deployed workflows

  4. Testing with Local JWT Server - Run a local proxy server that automatically generates JWT tokens and sends authenticated requests to the CRE gateway for testing your deployed workflows

Quick comparison: Simulation vs Production

AspectSimulationProduction
AuthorizationOptional (can use empty config)Required (authorizedKeys must be configured)
Trigger methodCLI with --input flagHTTP POST to gateway endpoint with JWT
EndpointLocal simulatorCRE gateway (https://01.gateway.zone-a.cre.chain.link)
Use caseDevelopment, testing, debuggingLive integrations, webhooks, production APIs

Key concepts

Authorization keys

Authorization keys are EVM addresses that are permitted to trigger your workflow. When you configure an HTTP trigger, you specify one or more AuthorizedKeys:

AuthorizedKeys: []http.Key{
	{
		Type:      http.KeyTypeECDSAEVM,
		PublicKey: "0xYourEVMAddress",
	},
}

Only requests signed by the corresponding private keys will be accepted by the CRE gateway.

Payload

The HTTP trigger payload contains:

  • input: The JSON data from the HTTP request body
  • key: The authorized key that signed the request

Your callback function receives this payload and can process the input data to perform workflow logic.

Next steps

Start by learning how to configure HTTP triggers and write handler functions:

Or explore the SDK reference for detailed API documentation:

Get the latest Chainlink content straight to your inbox.