Skip to main content
POST
/
api
/
v2
/
public
/
workflow
/
:workflow_id
/
execute
curl -X POST "https://app.refold.ai/api/v2/public/workflow/{workflow_id}/execute" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
  -H "slug: {slug}" \
  -H "Content-Type: application/json" \
  -d '{ "payload": { "email": "jane@example.com" } }'
{
  "message": "Workflow execution started",
  "execution_id": "6a314c54d4616e99e7fa5a02"
}
Execute a workflow for a linked account via a manual trigger. The workflow must be published and owned by the linked account. Execution is asynchronous by default; set the sync_execution header to run synchronously and return the result inline.
The slug header is required — it names the application the workflow belongs to. Without it the call fails with Workflow ID and slug are required.

Authentication

This endpoint is scoped to a linked account (it runs that account’s private workflow), so it accepts either authentication method. Option 1 — API key
x-api-key
string
Your Refold API key.
linked_account_id
string
The linked account that owns the workflow.
Option 2 — Session token
Authorization
string
Session token. Format: Bearer YOUR_SESSION_TOKEN

Path Parameters

workflow_id
string
required
The published workflow ID (from List Workflows). The workflow must be published before it can be executed.

Headers

slug
string
required
The application slug the workflow belongs to.
config_id
string
Config to scope execution to. Defaults to the linked account ID.
sync_execution
boolean
Run synchronously and return the result inline.
instance_tag
string
Tag to label the resulting execution.
include-headers
boolean
Return sanitized request headers in the response.

Body Parameters

payload
object
The execution input, matching the workflow’s request structure.

Response

Returns the execution result. For async runs this is an acknowledgement with the execution reference; for sync runs it includes the workflow output.
{
  "message": "Workflow execution started",
  "execution_id": "6a314c54d4616e99e7fa5a02"
}
curl -X POST "https://app.refold.ai/api/v2/public/workflow/{workflow_id}/execute" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
  -H "slug: {slug}" \
  -H "Content-Type: application/json" \
  -d '{ "payload": { "email": "jane@example.com" } }'