Invoke Skill Workstream Spec Answer
post
/api/v1/skills/workstream.spec.answer/invokeAnswer one open decision on a WorkStream spec. Wraps POST /api/v1/wss/authoring/workstreams/{id}/spec/answer. Answering creates a NEW version rather than mutating one β the prior version's spec stays unchanged. Read the spec first with workstream_spec.
Records the answer to one open decision on a workstream spec. Supply the `workstream_id`, the `decision_id` and your `answer`, and add `provenance` to note where the answer came from. The reply carries the new version holding the answer; the earlier version is left unchanged.
Request bodyapplication/json
| Field | Type | Description |
|---|---|---|
workstream_idrequired | string | Workstream whose spec to answer on β UUID, slug, or 7-char permakey. |
decision_idrequired | string | The stable id of the decision to answer. |
answerrequired | string | The chosen option value. Agreeing in one word ('yes') records the builder's proposal as the decision, not the affirmative word. |
provenance | string | null | Optional source locator or rationale recorded with the answer. |
Responses
200Skill executed successfully
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
skillrequired | string | β | ||||||||||||||||||||||||||||||||||||
outputrequired | object | The new version carrying the answered decision.show nested
| ||||||||||||||||||||||||||||||||||||
correlation_idrequired | string | β |
401Authentication required
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
403Insufficient permissions
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
404Skill not found
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
429Rate limit exceeded
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
5XXInternal server error
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
curl https://api.dev.arch.ie/api/v1/skills/workstream.spec.answer/invoke \
-X POST \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"workstream_id": "string",
"decision_id": "string",
"answer": "string",
"provenance": null
}'