X-Fetch-Hive-Webhook-Secret instead of a workspace API key. See Callback Delivery and Webhook Triggers.
Authentication
Endpoint
POST https://api.fetchhive.com/v1/workflow/invoke
Before you call this endpoint, create a workflow deployment and variant from the workflow editor. See Publishing and Versioning for that UI flow.
Request
Use this request shape:| Field | Type | Required | Description |
|---|---|---|---|
deployment | string | Yes | The workflow deployment key |
variant | string | Yes | The deployment variant you want to run |
inputs | object | No | Key-value pairs for the variables defined on the workflow’s Start step |
async | object | No | Callback delivery settings. See Callback Delivery and Webhook Triggers |
metadata | object | No | Flat caller-defined metadata for audit and log filtering. This is not used as workflow input. |
inputs values must match the workflow’s Start input types. Text inputs accept strings. Array inputs must be native JSON arrays, for example "companies": [{"name":"Fetch Hive"}]. Arrays are preserved as arrays in workflow variables and logs.
metadata must be flat and scalar-only: strings, numbers, booleans, or null. Nested objects and arrays return a validation error before the run starts.
If you include async, use these nested fields:
| Field | Type | Required | Description |
|---|---|---|---|
async.enabled | boolean | Yes | Set to true to return immediately and deliver the result later by signed callback |
async.callback_url | string | Yes when callback delivery is enabled | The callback URL Fetch Hive should call when the run finishes |
async.enabled to true and provide async.callback_url; synchronous invocation returns a validation error because the run pauses until the configured workspace member submits a choice.
Basic example
metadata for audit fields you want to see or filter in logs, such as customer IDs, plan names, regions, or experiment names. Workflow start variables belong in inputs. See Invoke metadata for examples and log filtering details.
Callback delivery example
Response
Direct response
When you do not enable callback delivery, the public route waits for the workflow to finish and returns the final output. For example:Callback delivery response
Whenasync.enabled is true, the route returns immediately. For example:

