---
title: "UpdateTask"
method: POST
path: "/gitpod.v1.EnvironmentAutomationService/UpdateTask"
tags: ["gitpod.v1.EnvironmentAutomationService"]
---

# UpdateTask

`POST /gitpod.v1.EnvironmentAutomationService/UpdateTask`

Updates an automation task configuration.

 Use this method to:
 - Modify task commands
 - Update task triggers
 - Change dependencies
 - Adjust execution settings

 ### Examples

 - Update command:

   Changes the task's command.

   ```yaml
   id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   spec:
     command: "npm run test:coverage"
   ```

 - Update triggers:

   Modifies when the task runs.

   ```yaml
   id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   metadata:
     triggeredBy:
       trigger:
         - postEnvironmentStart: true
   ```

## Request body

- GitpodV1UpdateTaskRequest
  - `dependsOn` string[] — dependencies specifies the IDs of the automations this task depends on.
  - `id` string, uuid
  - `metadata` GitpodV1UpdateTaskRequestTaskMetadata
    - `description` string, nullable
    - `name` string, nullable
    - `triggeredBy` GitpodV1UpdateTaskRequestAutomationTriggerUpdate — unresolved $ref
  - `spec` GitpodV1UpdateTaskRequestTaskSpec — unresolved $ref

## Response `200`

Success

- GitpodV1UpdateTaskResponse

## Other responses

- `default` — Error

## Changes

- **2026-01-21** `2423c089f280` — 1 breaking, 2 info
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5` from the `metadata/triggeredBy/trigger/items/` request property `oneOf` list
  - added the new optional request property `metadata/triggeredBy/trigger/items/beforeSnapshot`
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6` to the `metadata/triggeredBy/trigger/items/` request property `oneOf` list
- **2025-12-15** `d62ef4b9187c` — 2 breaking, 6 info
  - removed `subschema #1` from the `spec/runsOn` request property `oneOf` list
  - removed `subschema #1, subschema #2, subschema #3` from the `metadata/triggeredBy/trigger/items/` request property `oneOf` list
  - added the new optional request property `metadata/triggeredBy/trigger/items/postMachineStart`
  - added the new optional request property `metadata/triggeredBy/trigger/items/prebuild`
  - …4 more
- **2025-02-21** `3655d5ad0ac3` — 2 breaking, 2 warning, 5 info
  - the `metadata` request property type/format changed from ``/`` to `object`/``
  - the `spec` request property type/format changed from ``/`` to `object`/``
  - removed `#/components/schemas/gitpod.v1.UpdateTaskRequest.TaskMetadata` from the `metadata` request property `allOf` list
  - removed `#/components/schemas/gitpod.v1.UpdateTaskRequest.TaskSpec` from the `spec` request property `allOf` list
  - …5 more
- …earlier changes not shown

[Full history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.EnvironmentAutomationService/UpdateTask/post.md)

---

[API](https://skmtc.dev/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.dev/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/b97dcde84128/schema)
