---
title: "Starts or stops the active task."
method: PATCH
path: "/api/task"
tags: ["Tasks"]
---

# Starts or stops the active task.

`PATCH /api/task`

## Request body

- object
  - `status` 'active' | 'aborting', required

## Response `200`

If the status was successfully updated.

- TaskStatus
  - `id` string — A unique UUIDv4 for the current task.
  - `title` string
  - `console` string
  - `cancellable` boolean — If the task can be aborted
  - `autoclose` boolean — If it should be possible to close the task automatically.
  - `audit` boolean — If a successful task might requires audit (install tool).
  - `status` 'active' | 'complete' | 'paused' | 'error' | 'aborting' | 'stopped'
  - `operations` object[]
    - `summary` string
    - `details` string
    - `console` string
    - `status` 'active' | 'complete' | 'error' | 'stopped'
  - `sponsor` object — Sponsor of the current task on the Composer Cloud
    - `name` string
    - `link` string

## Other responses

- `400` — If the task status is unknown.

## Changes

- **2025-03-14** `77b5c9a3d7e6` — 1 warning, 1 info
  - added the new `paused` enum value to the `status` response property for the response status `200`
  - added the new `active` enum value to the request property `status`
- **2025-03-06** `4dc3bf84edf7` — 2 info
  - the endpoint scheme security `CookieAuthentication` was added to the API
  - the endpoint scheme security `TokenAuthentication` was added to the API
- **2022-08-24** `8a278f8d40ef` — 1 info
  - added the optional property `sponsor` to the response with the `200` status
- **2020-08-20** `a934ca9b4c37` — 1 info
  - added the optional property `id` to the response with the `200` status
- **2020-07-23** `42c41034504b` — 1 breaking, 2 warning, 3 info
  - removed the enum value `active` of the request property `status`
  - removed the optional property `id` from the response with the `200` status
  - removed the optional property `sponsor` from the response with the `200` status
  - the endpoint scheme security `CookieAuthentication` was removed from the API
  - …2 more

[Change history](https://skmtc.dev/contao/apis/contao-manager-api/changes/api/task/patch.md)

---

[API](https://skmtc.dev/contao/apis/contao-manager-api.md) · [All operations](https://skmtc.dev/contao/apis/contao-manager-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/contao/contao-manager-api/revisions/074d8046de13/schema)
