Docs menu

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_id path string required
  • space_id path string required
  • file_id path string required

Request body

application/json StartFlowRun required

  • inputs object

    The manual trigger's inputs by name.

Responses

  • 202 application/json FlowRunAccepted

    The run started, queued for a free slot or was skipped (reason)

  • 401 application/json ErrorBody

    unauthenticated

  • 403 application/json ErrorBody

    people_only_workflow: it asks or emails people, so a key can't start it; workspace_content_restricted, insufficient_scope, forbidden

  • 404 application/json ErrorBody

    No such flow file, or flows are off

  • 409 application/json ErrorBody

    workflow_inactive, no_manual_trigger, workspace_archived

  • 422 application/json ErrorBody

    validation_failed: inputs isn't an object; not_a_workflow

  • 429 application/json ErrorBody

    rate_limited: the API key's requests per minute are used up; retry after Retry-After seconds

  • 500 application/json ErrorBody

    internal

  • 503 application/json ErrorBody

    unavailable: the database is briefly unavailable; retry after Retry-After seconds

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_found generic code for this status
  • 409 workflow_inactiveno_manual_triggerworkspace_archived
  • 422 validation_failednot_a_workflow
  • 429 rate_limited
  • 500 internal
  • 503 unavailable

Examples

curl
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 '{}'
JavaScript SDK
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: {},
});
Example request body
{
  "inputs": {}
}
Example response (202)
{
  "existing": false,
  "outcome": "string",
  "reason": "string",
  "run_id": "run_123"
}