Skills › Authoring
Answer One Open Decision on a WorkStream Spec
POST/api/v1/skills/workstream.spec.answer/invoke
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.Body parameters
workstream_idstringRequired
Workstream whose spec to answer on — UUID, slug, or 7-char permakey.
decision_idstringRequired
The stable id of the decision to answer.
answerstringRequired
The chosen option value. Agreeing in one word ('yes') records the builder's proposal as the decision, not the affirmative word.
provenancestring
Optional source locator or rationale recorded with the answer.
Returns
Skill executed successfully
skillstringRequired
Example workstream_spec_answer
outputobjectRequired
The new version carrying the answered decision.
output.stub_fieldsarray of strings
output.warningsarray of strings
output.workstream_idstring · default
Resolved workstream UUID.
output.versioninteger
The NEW version created by the answer (prior version is unchanged).
output.specobject
The updated spec after the answer.
output.spec_hashstring
Content address of the new spec.
output.definition_hashstring
Content address of the step graph (unchanged by an answer).
output.decision_idstring · default
The decision this call answered.
output.framesarray of objects
Cowork artefact frames rendering the answered spec.
output.errorstringDeprecated
output.error_envelope
Canonical structured error. Populated when the answer failed.
correlation_idstringRequired
Errors
StatusTypeWhen
401AUTH.TOKEN_INVALID Authentication required
403PERMISSION.CAPABILITY_DENIED Insufficient permissions
404SKILL.NOT_FOUND Skill not found
422VALIDATION.INVALID_FORMAT Validation error
429RATE_LIMIT.USER Rate limit exceeded
5XXINTERNAL.UNKNOWN Internal server error
curl https://uk.heyarchie.com/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 }'
from heyarchie import Archie archie = Archie(api_key="sk_...") result = archie.skills.invoke( "workstream.spec.answer", workstream_id="string", decision_id="string", answer="string", provenance=None, ) print(result)
import { Archie } from "heyarchie";
const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("workstream.spec.answer", {
"workstream_id": "string",
"decision_id": "string",
"answer": "string",
"provenance": null
});
console.log(result);Response
{
"skill": "workstream_spec_answer",
"output": {
"decision_id": "close-deadline",
"definition_hash": "4f0a8d3c71e92b56",
"spec": {
"bindings": {
"close_deadline": "wd5"
},
"decisions": [
{
"answer": "wd5",
"id": "close-deadline",
"proposal": "wd5",
"question": "By which working day must the close be finished?",
"status": "answered"
}
]
},
"spec_hash": "c81d5e2a9f0b3746",
"version": 3,
"workstream_id": "c4d19a72-0e3b-4586-b7f1-8a2d5e6c9b04"
},
"correlation_id": "<string>"
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"retry_after_seconds": "<integer>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"retry_after_seconds": "<integer>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"retry_after_seconds": "<integer>"
}
}Every response also carries X-Request-ID. Quote it if you write to us about a call.