Start flow run
POST /v1/organisations/{organisation_id}/spaces/{space_id}/flows/{file_id}/runs
Starts a run through the flow's manual trigger, acting as you or your key's identity.
Authentication
Send an API key, or an access token from your organisation’s identity provider, in the Authorization header. How API keys work
Any API key can call this operation; it needs no scope.
Security schemes in the OpenAPI document: session_cookie (cookie __Host-ivy_session)bearer (bearer)api_key (bearer)
Parameters
-
organisation_idpathstringrequired -
space_idpathstringrequired -
file_idpathstringrequired
Request body
application/json StartFlowRun required
-
inputsobjectThe manual trigger's inputs by name.
Responses
-
The run started, queued for a free slot or was skipped (
reason) -
unauthenticated -
people_only_workflow: it asks or emails people, so a key can't start it;workspace_content_restricted,insufficient_scope,forbidden -
No such flow file, or flows are off
-
workflow_inactive,no_manual_trigger,workspace_archived -
validation_failed:inputsisn't an object;not_a_workflow -
rate_limited: the API key's requests per minute are used up; retry afterRetry-Afterseconds -
internal -
unavailable: the database is briefly unavailable; retry afterRetry-Afterseconds
Error codes
Errors come back as an ErrorBody whose code is one of these.
- 401
unauthenticated - 403
people_only_workflowworkspace_content_restrictedinsufficient_scopeforbidden - 404
not_foundgeneric code for this status - 409
workflow_inactiveno_manual_triggerworkspace_archived - 422
validation_failednot_a_workflow - 429
rate_limited - 500
internal - 503
unavailable
Examples
curl -X POST "$IVY_API_URL/v1/organisations/$ORGANISATION_ID/spaces/$SPACE_ID/flows/$FILE_ID/runs" \
-H "Authorization: Bearer $IVY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' import { client, startFlowRun } from "@spacivapp/ivy-sdk";
client.setConfig({
baseUrl: process.env.IVY_API_URL,
headers: { Authorization: `Bearer ${process.env.IVY_API_KEY}` },
});
const { data, error, response } = await startFlowRun({
path: { organisation_id: organisationId, space_id: spaceId, file_id: fileId },
body: {},
}); {
"inputs": {}
} {
"existing": false,
"outcome": "string",
"reason": "string",
"run_id": "run_123"
}