Operating system set to macOS
Documentation jurisdiction set to United States
Sign inConnect Claude

Invoke Skill Workstream Run

post/api/v1/skills/workstream.run/invoke

Start a workstream run against the supplied client / period / runtime variables. Returns a run_id you can poll with workstream_status, events_url for live SSE progress, and detail_url to open the run in Workstream Studio. The query_id in the output is the join key for Slack→Studio deep-links.

Request bodyapplication/json

FieldTypeDescription
workstream_idrequiredstringUUID, slug, or 7-char permakey. The adapter resolves it.
client_idstring (uuid) | nullClient to run against. Optional for client-agnostic workstreams.
periodstring | nullPeriod label (e.g., 'FY26-Q1', '2026-04').
runtime_varsobjectRuntime overrides for the workstream's declared inputs. Keys are input names from `WorkstreamDescribeOutput.inputs_required`; values are JSON-typed (string, number, boolean, array, object, null).
show nested
Empty object.
idempotency_keystring | nullCaller-supplied stable token (≀200 chars). When the same key is replayed within 24h the API returns the original cycle id rather than starting a duplicate run. Strongly recommended for any automated retry loop.

Responses

200Skill executed successfully
FieldTypeDescription
skillrequiredstringβ€”
outputrequiredobjectPointer to the new cycle + URLs the caller can use to monitor / open it. The canonical noun is ``cycle`` (Workstream β†’ Blueprint β†’ Cycle β†’ Task). The legacy ``run_id`` field is kept populated alongside ``cycle_id`` for backwards compat with SDK consumers; new code should read ``cycle_id`` and treat ``run_id`` as deprecated.
show nested
FieldTypeDescription
stub_fieldsstring[]β€”
warningsstring[]β€”
cycle_idstring (uuid) | nullThe cycle id of the launched workstream cycle.
run_idstring (uuid) | nullβ€”
status"pending" | "running" | "awaiting_approval"β€”
pendingrunningawaiting_approval
execution_mode"inline" | "containerized"β€”
inlinecontainerized
query_idstring | nullβ€”
events_urlstringβ€”
detail_urlstringβ€”
errorstring | nullβ€”
error_envelopeany | nullCanonical structured error. Set when the cycle failed to start (workstream not found, validation, FGA denied, rate limited, etc.). The legacy `error` string is populated alongside it for back-compat.
correlation_idrequiredstringβ€”
401Authentication required
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
403Insufficient permissions
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
404Skill not found
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
429Rate limit exceeded
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
5XXInternal server error
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
curl https://api.dev.arch.ie/api/v1/skills/workstream.run/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "workstream_id": "string",
       "client_id": null,
       "period": null,
       "runtime_vars": {},
       "idempotency_key": null
     }'