cURL
curl -X POST \
-H 'x-api-key: <YOUR_API_KEY>' \
-H 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "id": "<WORKFLOW_ID>", "origin": "2", "inputs": {} }' \
'https://api.playbook3d.com/run_workflow/<TEAM_ID>/<RUN_ID>'import requests
import uuid
TEAM_ID = "<TEAM_ID>"
WORKFLOW_ID = "<WORKFLOW_ID>"
RUN_ID = str(uuid.uuid4())
payload = {
"id": WORKFLOW_ID,
"origin": "2",
"inputs": {}
}
headers = {
"x-api-key": "<YOUR_API_KEY>",
"Authorization": "Bearer <YOUR_JWT_TOKEN>",
"Content-Type": "application/json"
}
url = f"https://api.playbook3d.com/run_workflow/{TEAM_ID}/{RUN_ID}"
resp = requests.post(url, json=payload, headers=headers)
print(resp.status_code, resp.json())const TEAM_ID = '<TEAM_ID>';
const WORKFLOW_ID = '<WORKFLOW_ID>';
const RUN_ID = 'some-uuid';
fetch(`https://api.playbook3d.com/run_workflow/${TEAM_ID}/${RUN_ID}`, {
method: 'POST',
headers: {
'x-api-key': '<YOUR_API_KEY>',
'Authorization': 'Bearer <YOUR_JWT_TOKEN>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: WORKFLOW_ID,
origin: '2',
inputs: {}
})
})
.then(res => res.json())
.then(data => {
console.log('Status:', data.status);
console.log('Run ID:', data.run_id);
})
.catch(err => console.error(err));{
"run_id": "eb49c4e2-e9c5-4202-aea2-86dd31493621",
"status": "queued",
"message": "Workflow queued successfully."
}{
"detail": [
{
"loc": [
"body",
"id"
],
"msg": "field required",
"type": "value_error"
}
]
}Runs
Run Workflow by ID
Enqueues or starts a run of the given workflow ID under the specified team and run ID. The origin field determines the calling context (e.g. ‘2’ for Unity).
POST
/
run_workflow
/
{team_id}
/
{run_id}
cURL
curl -X POST \
-H 'x-api-key: <YOUR_API_KEY>' \
-H 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "id": "<WORKFLOW_ID>", "origin": "2", "inputs": {} }' \
'https://api.playbook3d.com/run_workflow/<TEAM_ID>/<RUN_ID>'import requests
import uuid
TEAM_ID = "<TEAM_ID>"
WORKFLOW_ID = "<WORKFLOW_ID>"
RUN_ID = str(uuid.uuid4())
payload = {
"id": WORKFLOW_ID,
"origin": "2",
"inputs": {}
}
headers = {
"x-api-key": "<YOUR_API_KEY>",
"Authorization": "Bearer <YOUR_JWT_TOKEN>",
"Content-Type": "application/json"
}
url = f"https://api.playbook3d.com/run_workflow/{TEAM_ID}/{RUN_ID}"
resp = requests.post(url, json=payload, headers=headers)
print(resp.status_code, resp.json())const TEAM_ID = '<TEAM_ID>';
const WORKFLOW_ID = '<WORKFLOW_ID>';
const RUN_ID = 'some-uuid';
fetch(`https://api.playbook3d.com/run_workflow/${TEAM_ID}/${RUN_ID}`, {
method: 'POST',
headers: {
'x-api-key': '<YOUR_API_KEY>',
'Authorization': 'Bearer <YOUR_JWT_TOKEN>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: WORKFLOW_ID,
origin: '2',
inputs: {}
})
})
.then(res => res.json())
.then(data => {
console.log('Status:', data.status);
console.log('Run ID:', data.run_id);
})
.catch(err => console.error(err));{
"run_id": "eb49c4e2-e9c5-4202-aea2-86dd31493621",
"status": "queued",
"message": "Workflow queued successfully."
}{
"detail": [
{
"loc": [
"body",
"id"
],
"msg": "field required",
"type": "value_error"
}
]
}Headers
Your API key. This is required by most endpoints for programmatic access. You can view your x-api-key in the 'Profile' tab.
Bearer token for authentication (JWT).
Path Parameters
The team UUID to which this run will be associated.
A unique run UUID for identifying this workflow execution. Generated automatically if not supplied by user.
Body
application/json
The workflow ID and optional origin and inputs for the run.