# Answer One Open Decision on a WorkStream Spec

> Records the answer to one open decision on a workstream spec. Supply the workstreamid, the decisionid and your answer, and add provenance to note where…

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_id string Required

Workstream whose spec to answer on — UUID, slug, or 7-char permakey.

decision_id string Required

The stable id of the decision to answer.

answer string Required

The chosen option value. Agreeing in one word ('yes') records the builder's proposal as the decision, not the affirmative word.

provenance string

Optional source locator or rationale recorded with the answer.

Returns

Skill executed successfully

skill string Required

Example workstream_spec_answer

output object Required

The new version carrying the answered decision.

output.stub_fields array of strings

output.warnings array of strings

output.workstream_id string · default

Resolved workstream UUID.

output.version integer

The NEW version created by the answer (prior version is unchanged).

output.spec object

The updated spec after the answer.

output.spec_hash string

Content address of the new spec.

output.definition_hash string

Content address of the step graph (unchanged by an answer).

output.decision_id string · default

The decision this call answered.

output.frames array of objects

Cowork artefact frames rendering the answered spec.

output.error string Deprecated

output.error_envelope

Canonical structured error. Populated when the answer failed.

correlation_id string Required

Errors

Status Type When

401 AUTH.TOKEN_INVALID Authentication required

403 PERMISSION.CAPABILITY_DENIED Insufficient permissions

404 SKILL.NOT_FOUND Skill not found

422 VALIDATION.INVALID_FORMAT Validation error

429 RATE_LIMIT.USER Rate limit exceeded

5XX INTERNAL.UNKNOWN Internal server error

[Previous ← Draft a New Workstream Conversationally](https://heyarchie.com/en-gb/developers/api-reference/authoring/draft-a-new-workstream-conversationally-post/)[Next Read a Stored WorkStream Spec →](https://heyarchie.com/en-gb/developers/api-reference/authoring/read-a-stored-workstream-spec/)

```
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>"
  }
}
```

Every response also carries X-Request-ID. Quote it if you write to us about a call.
