# Advance a Paused or Awaiting-Approval Workstream Run

> Moves a paused or awaiting-approval cycle forward, so an accountant can approve a task, skip a step, pause or resume the work. It needs the cycleid and…

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

Moves a paused or awaiting-approval cycle forward, so an accountant can approve a task, skip a step, pause or resume the work. It needs the cycle_id and the action to take, plus the task_id when approving a task, and a person is asked to confirm before Archie acts on it. It returns the cycle_id, its status and its current and next step.

Body parameters

cycle_id string · uuid or string Required

The cycle to advance (UUID or permakey).

action enum Required

What to do:

- `approve_task`: mark the task in `task_id` approved; the run moves on.
- `skip_step`: skip the current step.
- `pause`: halt the run in-place.
- `resume`: continue a previously paused run.

approve_task skip_step pause resume

task_id string · uuid

Required for `approve_task`. The task being approved.

reason string

Audit trail. Recommended for skip_step.

idempotency_key string

Caller-supplied stable token. Replaying within 24h returns the same outcome rather than re-applying the action.

Returns

Skill executed successfully

skill string Required

Example workstream_advance

output object Required

Cycle state after the action lands.

output.stub_fields array of strings

output.warnings array of strings

output.cycle_id string · uuid

The cycle the action was applied to.

output.run_id string · uuid Deprecated

output.status enum · default running

Lifecycle state after the action.

running paused awaiting_approval completed cancelled failed

output.current_step string · default

Slug of the currently-executing step.

output.next_step string

Slug of the next step (None on terminal states).

output.error string Deprecated

output.error_envelope

Canonical structured error. Populated when the action could not be applied.

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

[Next Cancel a Running Workstream Run →](https://heyarchie.com/en-gb/developers/api-reference/workstreams/cancel-a-running-workstream-run/)

```
curl https://uk.heyarchie.com/api/v1/skills/workstream.advance/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "cycle_id": null,
       "action": "approve_task",
       "task_id": null,
       "reason": null,
       "idempotency_key": null
     }'
```

```
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "workstream.advance",
    cycle_id=None,
    action="approve_task",
    task_id=None,
    reason=None,
    idempotency_key=None,
)
print(result)
```

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

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("workstream.advance", {
  "cycle_id": null,
  "action": "approve_task",
  "task_id": null,
  "reason": null,
  "idempotency_key": null
});
console.log(result);
```

Response

```
{
  "skill": "workstream_advance",
  "output": {
    "current_step": "post_accruals",
    "cycle_id": "b7d4e2a1-9c3f-4e58-a6b2-1f0d3c5e7a94",
    "next_step": "final_review",
    "status": "running"
  },
  "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.
