Skills › Authoring
Promote a Workstream Draft
POST/api/v1/skills/workstream.commit/invoke
Promotes a draft to an active workstream. Supply the
draft_id of a draft that passes validation, and the reply gives the workstream_id, the permakey and the status. If validation fails the commit is refused and the draft stays a draft.Body parameters
draft_idstring · uuidRequired
The draft id from
workstream_draft.draft_id.scopeenum · default firm
Authoring scope for the committed workstream.
userteamfirm
namestring
Optional final name. Defaults to the draft's working name. Cannot collide with another active workstream in the workspace.
idempotency_keystring
Caller-supplied stable token. Replaying within 24h returns the previously-created workstream id rather than erroring on the name collision.
Returns
Skill executed successfully
skillstringRequired
Example workstream_commit
outputobjectRequired
Pointer to the committed workstream.
output.stub_fieldsarray of strings
output.warningsarray of strings
output.workstream_idstring · uuid
Newly-created workstream id.
output.permakeystring · default
7-char human-friendly id for URLs and Slack.
output.statusenum · default active
active on success; draft if commit failed validation and the draft still exists.draftactive
output.errorstringDeprecated
output.error_envelope
Canonical structured error. Populated when commit 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.commit/invoke \ -X POST \ -H "Authorization: Bearer sk_..." \ -H "Content-Type: application/json" \ -d '{ "draft_id": "00000000-0000-0000-0000-000000000000", "scope": "user", "name": null, "idempotency_key": null }'
from heyarchie import Archie archie = Archie(api_key="sk_...") result = archie.skills.invoke( "workstream.commit", draft_id="00000000-0000-0000-0000-000000000000", scope="user", name=None, idempotency_key=None, ) print(result)
import { Archie } from "heyarchie";
const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("workstream.commit", {
"draft_id": "00000000-0000-0000-0000-000000000000",
"scope": "user",
"name": null,
"idempotency_key": null
});
console.log(result);Response
{
"skill": "workstream_commit",
"output": {
"permakey": "ws4k8n2",
"status": "active",
"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.