HTTP Actions
HTTP actions call external REST API endpoints. Use them to integrate with any system that has an API, including CRMs, ERPs, payment processors, and notification services.
Registration
curl -X POST https://your-hyphen.example.com/actions \
-H "X-Org-Id: acme-corp" \
-H "Content-Type: application/json" \
-d '{
"action_name": "create_salesforce_lead",
"kind": "http",
"description": "Create a new lead in Salesforce",
"url": "https://api.salesforce.com/services/data/v58.0/sobjects/Lead",
"http_method": "POST",
"headers": {
"Authorization": "Bearer orgconfig:api:salesforce_token",
"Content-Type": "application/json"
},
"passthrough": true
}'
Properties
| Property | Type | Required | Description |
|---|---|---|---|
action_name |
string | Yes | Unique name for this action |
kind |
"http" |
Yes | |
url |
string | Yes | Endpoint URL. Use an @path reference when the complete URL comes from workflow context |
http_method |
string | Yes | "GET", "POST", "PUT", "PATCH", "DELETE" |
headers |
object | No | Request headers. Values support orgconfig: prefix for secrets |
properties.keys |
string[] | No | Workflow-step request field names. A GET or HEAD step sends them as query parameters; any other method sends them as the JSON body |
properties.values |
array | No | Workflow-step values paired with keys. Entries may be literals or @path references |
query |
object | No | Query parameters used when the action is called as an agent tool |
content_type |
string | No | Request content type (default: "application/json") |
outputKey |
string | No | Context key that receives the parsed response. Set it on the action or on the step |
passthrough |
boolean | No | If true and no outputKey is set, fields from an object response are merged into the root of workflow context |
Dynamic URLs
For a workflow action whose complete URL changes at runtime, point url at a context value:
{
"action_name": "get_order",
"kind": "http",
"url": "https://api.store.com/orders",
"http_method": "GET"
}
Override the full URL on the workflow step when needed:
{
"type": "get_order",
"properties": {
"url": "@input.order_url"
}
}
Keep URL construction in your application when path segments come from untrusted input. Hyphen validates outbound destinations before making the request; private and loopback hosts are blocked unless the operator allowlists them. See SSRF protection.
Secret References
Use orgconfig: to reference encrypted secrets stored in org config:
{
"headers": {
"Authorization": "Bearer orgconfig:api:stripe_key",
"X-Custom-Token": "orgconfig:api:vendor_token"
}
}
The engine resolves orgconfig: references at runtime without writing the resolved value back into the workflow definition. Recorded action data also passes through sensitive-field redaction. Keep credentials in organization configuration rather than objectives, prompts, or ordinary input fields.
Usage in a Workflow
{
"type": "create_salesforce_lead",
"properties": {
"keys": ["FirstName", "LastName", "Email", "Company"],
"values": ["@input.first_name", "@input.last_name", "@input.email", "@input.company"]
}
}
The step's keys and values build the request from workflow context. A POST, PUT, PATCH, or DELETE step sends them as the JSON body. A GET or HEAD step sends no body: its fields become query parameters, added to any query string already in the URL. Null and undefined values are left out, and other values are sent as text.
Keep the response under a key
Set outputKey to keep the whole response under one context key:
{
"type": "list_open_invoices",
"properties": {
"keys": ["status", "since"],
"values": ["open", "@input.since"],
"outputKey": "open_invoices"
}
}
This GET step calls ā¦/invoices?status=open&since=2026-10-01 and stores the response at @open_invoices. A JSON response is parsed, any other response is kept as text, and an empty body becomes null. Later steps read it by path, for example an N-way match leg with "records": "@open_invoices.rows".
The response is recorded with the step. A replayed step rebuilds the key from that recording instead of calling the API again.
With passthrough: true and no outputKey, fields from an object response are merged into the root of workflow context instead. A response field such as data or headers then lands beside your business data, so prefer outputKey whenever a later step depends on the response.
Usage as an Agent Tool
List the action name in the agent's tools array:
{
"mode": "react",
"objective": "Look up customer and update their record",
"tools": [{ "type": "action", "name": "create_salesforce_lead" }, { "type": "action", "name": "get_order" }]
}
The agent can call create_salesforce_lead with a JSON object. For a non-GET action, that object becomes the request body. For GET and HEAD actions, it becomes query parameters. The action description tells the agent what fields the endpoint expects.
Error Handling
If the HTTP request fails (non-2xx status, timeout, connection error), the action returns an error result. In a workflow step, this fails the run. In a ReAct agent, the error is returned as an observation and the agent can decide how to proceed.
HTTP timeouts default to 30 seconds. For long-running API calls, consider using an async pattern with polling.
ā Next: LLM Actions