Trigger Runs
Trigger Async Run
Start an asynchronous workflow run
POST
/
api
/
v1
/
workflows
/
{workflowId}
/
runs
/
async
curl -X POST https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/async \
-H "x-origami-key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"rows": [
{ "name": "Alice", "email": "alice@example.com" },
{ "name": "Bob", "email": "bob@example.com" }
]
}'
const response = await fetch(
'https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/async',
{
method: 'POST',
headers: {
'x-origami-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
rows: [
{ name: 'Alice', email: 'alice@example.com' },
{ name: 'Bob', email: 'bob@example.com' }
]
}),
}
);
import requests
response = requests.post(
"https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/async",
headers={
"x-origami-key": "your-api-key",
"Content-Type": "application/json",
},
json={
"rows": [
{"name": "Alice", "email": "alice@example.com"},
{"name": "Bob", "email": "bob@example.com"}
]
},
)
{
"success": true,
"data": {
"workflowId": "wf_abc123",
"runId": "run_xyz789",
"status": "queued"
}
}
{
"success": false,
"error": "Invalid request body. Expected: { rows: [...] }"
}
{
"success": false,
"error": "Invalid API key"
}
{
"success": false,
"error": "Workflow not found"
}
Trigger Async Run
Starts a new workflow run asynchronously. The run is queued and executed in the background. Use the status and response endpoints to monitor progress and retrieve results.Path Parameters
string
required
The unique identifier of the workflow to run
Request Body
array
required
An array of JSON objects representing the input data for the workflow. Each object in the array will be processed as a row by the workflow’s input node.
Response
boolean
Whether the request was successful
object
curl -X POST https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/async \
-H "x-origami-key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"rows": [
{ "name": "Alice", "email": "alice@example.com" },
{ "name": "Bob", "email": "bob@example.com" }
]
}'
const response = await fetch(
'https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/async',
{
method: 'POST',
headers: {
'x-origami-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
rows: [
{ name: 'Alice', email: 'alice@example.com' },
{ name: 'Bob', email: 'bob@example.com' }
]
}),
}
);
import requests
response = requests.post(
"https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/async",
headers={
"x-origami-key": "your-api-key",
"Content-Type": "application/json",
},
json={
"rows": [
{"name": "Alice", "email": "alice@example.com"},
{"name": "Bob", "email": "bob@example.com"}
]
},
)
{
"success": true,
"data": {
"workflowId": "wf_abc123",
"runId": "run_xyz789",
"status": "queued"
}
}
{
"success": false,
"error": "Invalid request body. Expected: { rows: [...] }"
}
{
"success": false,
"error": "Invalid API key"
}
{
"success": false,
"error": "Workflow not found"
}
⌘I
curl -X POST https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/async \
-H "x-origami-key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"rows": [
{ "name": "Alice", "email": "alice@example.com" },
{ "name": "Bob", "email": "bob@example.com" }
]
}'
const response = await fetch(
'https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/async',
{
method: 'POST',
headers: {
'x-origami-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
rows: [
{ name: 'Alice', email: 'alice@example.com' },
{ name: 'Bob', email: 'bob@example.com' }
]
}),
}
);
import requests
response = requests.post(
"https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/async",
headers={
"x-origami-key": "your-api-key",
"Content-Type": "application/json",
},
json={
"rows": [
{"name": "Alice", "email": "alice@example.com"},
{"name": "Bob", "email": "bob@example.com"}
]
},
)
{
"success": true,
"data": {
"workflowId": "wf_abc123",
"runId": "run_xyz789",
"status": "queued"
}
}
{
"success": false,
"error": "Invalid request body. Expected: { rows: [...] }"
}
{
"success": false,
"error": "Invalid API key"
}
{
"success": false,
"error": "Workflow not found"
}