Talk with Archie
API reference › WorkStreams
API reference › WorkStreams

Delete a Workstream

POST/api/v1/skills/workstream.delete/invoke
Removes a workstream from listings, so an accountant can retire a process that is no longer used. It needs the workstream_id and confirm set to true, and a person is asked to confirm before Archie deletes anything. It refuses while a cycle of the workstream is still in progress, and it returns the workstream_id, whether it was deleted and its status.
Body parameters
workstream_idstringRequired
Workstream UUID, slug, or 7-char permakey to delete
confirmboolean · default false
Explicit confirmation. Must be true to proceed — a delete with confirm=false is refused (error='confirmation_required'), so an accidental call is a safe no-op.
Returns

Skill executed successfully

skillstringRequired
Example workstream_delete
outputobjectRequired
output.stub_fieldsarray of strings
output.warningsarray of strings
output.workstream_idstring · default
The deleted workstream's permakey (the public id).
output.deletedboolean · default false
True when the workstream was soft-deleted.
output.statusstring · default
The workstream's status after the call (e.g. 'deleted').
output.errorstring
missing_workspace | not_found | confirmation_required | has_active_cycles on failure, else null
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.delete/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "workstream_id": "string",
       "confirm": false
     }'
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "workstream.delete",
    workstream_id="string",
    confirm=False,
)
print(result)
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("workstream.delete", {
  "workstream_id": "string",
  "confirm": false
});
console.log(result);
Response
{
  "skill": "workstream_delete",
  "output": {
    "deleted": true,
    "status": "deleted",
    "workstream_id": "k7m2p9x"
  },
  "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.