Talk with Archie
API reference › Authoring
Skills › Authoring

Read a Stored WorkStream Spec

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_idstringRequired
Workstream to read the spec for — UUID, slug, or 7-char permakey.
versioninteger
Optional version pin. Omit to read the latest version's spec.
Returns

Skill executed successfully

skillstringRequired
Example workstream_spec
outputobjectRequired
The stored spec for one workstream version. Read-only.
output.stub_fieldsarray of strings
output.warningsarray of strings
output.workstream_idstring · default
Resolved workstream UUID.
output.versioninteger
Version the spec belongs to.
output.specobject
The spec: ordered decisions plus compiled bindings. Null on pre-spec versions.
output.spec_hashstring
Content address of the spec.
output.definition_hashstring
Content address of the step graph.
output.framesarray of objects
Cowork artefact frames rendering the spec.
output.errorstringDeprecated
output.error_envelope
Canonical structured error. Populated when the read failed.
correlation_idstringRequired
Errors
StatusTypeWhen
401AUTH.TOKEN_INVALIDAuthentication required
403PERMISSION.CAPABILITY_DENIEDInsufficient permissions
404SKILL.NOT_FOUNDSkill not found
422VALIDATION.INVALID_FORMATValidation error
429RATE_LIMIT.USERRate limit exceeded
5XXINTERNAL.UNKNOWNInternal server error
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>"
  }
}
{
  "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.