# Read a Stored WorkStream Spec

> Reads the stored spec of one workstream, named by the workstreamid input. It returns the latest version unless you set version, together with the…

POST /api/v1/skills/workstream.spec/invoke

Reads the stored spec of one workstream, named by the `workstream_id` input. It returns the latest version unless you set `version`, together with the decisions, the `spec_hash` and the `definition_hash`. This call only reads and changes nothing.

Body parameters

workstream_id string Required

Workstream to read the spec for — UUID, slug, or 7-char permakey.

version integer

Optional version pin. Omit to read the latest version's spec.

Returns

Skill executed successfully

skill string Required

Example workstream_spec

output object Required

The stored spec for one workstream version. Read-only.

output.stub_fields array of strings

output.warnings array of strings

output.workstream_id string · default

Resolved workstream UUID.

output.version integer

Version the spec belongs to.

output.spec object

The spec: ordered decisions plus compiled bindings. Null on pre-spec versions.

output.spec_hash string

Content address of the spec.

output.definition_hash string

Content address of the step graph.

output.frames array of objects

Cowork artefact frames rendering the spec.

output.error string Deprecated

output.error_envelope

Canonical structured error. Populated when the read 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 ← Answer One Open Decision on a WorkStream Spec](https://heyarchie.com/en-gb/developers/api-reference/authoring/answer-one-open-decision-on-a-workstream-spec/)

```
curl https://uk.heyarchie.com/api/v1/skills/workstream.spec/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "workstream_id": "string",
       "version": null
     }'
```

```
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "workstream.spec",
    workstream_id="string",
    version=None,
)
print(result)
```

```
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("workstream.spec", {
  "workstream_id": "string",
  "version": null
});
console.log(result);
```

Response

```
{
  "skill": "workstream_spec",
  "output": {
    "definition_hash": "4f0a8d3c71e92b56",
    "spec": {
      "bindings": {},
      "decisions": [
        {
          "id": "close-deadline",
          "proposal": "wd5",
          "question": "By which working day must the close be finished?",
          "status": "open"
        }
      ]
    },
    "spec_hash": "9b1e4c7a02d35f68",
    "version": 2,
    "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.
