---
title: "Continue a task"
method: POST
path: "/task/{task_id}/continue"
tags: ["Tasks"]
---

# Continue a task

`POST /task/{task_id}/continue`

## Request

- Base URL: `https://api.autumn.ai`
- URL: `https://api.autumn.ai/task/{task_id}/continue`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Send a message to the task. If it is running, the message queues and returns 202. Set wait to true for legacy blocking behavior.

## Path parameters

- `task_id` string, required: The task_id returned by POST /task or POST /task/start.

## Request body

- ContinueRequest
  - `message` string, required: What to change, add, or continue.
  - `input_files` string[], nullable: Task-local filenames returned by POST /validate-upload.
  - `wait` boolean: Set to `true` to block for the whole turn (legacy). Other values return immediately.

## Response `200`

Turn finished (wait: true) or accepted for background execution.

- Task
  - `task_id` string, required
  - `name` string, nullable
  - `status` string, nullable: Legacy; use state and done. `plan` (idle, or finished), `execute` (working), `accepted` (queued), `deleted`.
  - `phase` 'plan' | 'execute', nullable: Legacy; use state and done.
  - `activity` string, nullable: Legacy; use state and done. idle, queued, planning, executing or thinking. `queued` is waiting for a free slot and starts on its own. Finished is `idle`.
  - `output_count` integer, nullable
  - `credits_used` integer, nullable
  - `created_at` string, nullable
  - `updated_at` string, nullable
  - `poll_after_s` integer, nullable: Seconds to wait before polling status again.
  - `status_url` string, nullable
  - `task_url` string, nullable: API resource URL, relative to the API server. Open the chat in the browser at https://platform.autumn.ai/?task={task_id}.
  - `output_url` string, nullable
  - `stream_url` string, nullable
  - `queue` QueueState
    - `position` integer, required: Place in line, 1 is next.
    - `eta_s` integer, required: Estimated seconds until the run starts.
  - `state` string, nullable: A2A lifecycle state: submitted, working, input-required, completed, canceled or failed.
  - `done` boolean, nullable: True for input-required, completed, canceled and failed.
  - `stage` string, nullable: Current stage while the task is active.
  - `message` string, nullable: Latest public-facing task message.
  - `answer` string, nullable: Full saved assistant answer for a completed chat task without output rows.
  - `progress` object, nullable: Rows saved and optional target count.
  - `elapsed_s` integer, nullable: Elapsed seconds in the current or most recent run.
  - `queue_position` integer, nullable: Place in line for a queued task, or null when not queued.
  - `queued_messages` QueuedMessage[], nullable: Follow-ups queued behind the current turn.
    - `id` string, required
    - `text` string, nullable
    - `state` string, nullable: queued, sending, sent or dropped.
    - `error` string, nullable
  - `queued_count` integer: Pending queued follow-ups.
  - `outcome` string, nullable: Normalized completed outcome.
  - `error` object, nullable: Public failure code and recovery guidance.
  - `next` object, nullable: Suggested next action and API call.
  - `version` string, nullable: Changes when public task status changes.
  - `app_url` string, nullable: Open the task in the Autumn app.

## Other responses

- `202`: Queued. The task picks the message up when the current turn ends; the body carries status `accepted`.
- `400`: `invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.
- `401`: `unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.
- `402`: `out_of_credits`: Out of credits. Add credits at https://platform.autumn.ai (Settings > Billing), then send the request again. Retrying without credits fails the same way.
- `404`: `task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.
- `409`: `task_executing`: A turn is running on this task. Poll GET /task/{task_id}/state until `active` is false, then send the request again. Stop it (POST /task/{task_id}/stop) only to abandon the turn. | `task_in_cron_mode`: This task runs on a schedule and does not take messages. Switch it to chat mode in the platform, or start a new task.
- `422`: `invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.
- `500`: `internal_error`: Something went wrong on our end. If the body carries task_id, that task exists: continue it instead of starting another. Otherwise send the request again.
- `503`: `auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `at_capacity`: Autumn is at capacity. Wait `retry_after` seconds, then send the request again.

---

[API](https://skmtc.dev/autumn-ai/apis/autumn-task-api.md) - [All operations](https://skmtc.dev/autumn-ai/apis/autumn-task-api/llms.txt) - [OpenAPI document](https://skmtc.dev/autumn-ai/apis/autumn-task-api/revisions/78fb43699783?raw)
