---
title: "Update a task"
method: PATCH
path: "/genai/{connection_id}/task/{id}"
tags: ["genai", "task"]
---

# Update a task

`PATCH /genai/{connection_id}/task/{id}`

## Path parameters

- `connection_id` string, required
- `id` string, required

## Query parameters

- `fields` string[]
- `raw` string

## Request body

- GenaiTask
  - `id` string
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `name` string
  - `instructions` string
  - `status` 'PENDING' | 'RUNNING' | 'BLOCKED' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'EXPIRED' | 'OTHER'
  - `model_id` string
  - `user_id` string
  - `repo_url` string
  - `source_branch_identifier` string
  - `target_branch_identifier` string
  - `pullrequest_url` string
  - `web_url` string
  - `messages` GenaiContent[] — The conversation between the user and the coding agent.
    - `role` 'SYSTEM' | 'USER' | 'ASSISTANT'
    - `content` string, required
  - `summary` string
  - `error` string
  - `files_changed` number
  - `lines_added` number
  - `lines_deleted` number
  - `tokens_used` number
  - `started_at` string, date-time
  - `completed_at` string, date-time
  - `agent_id` string
  - `organization_id` string
  - `raw` object

## Response `200`

Successful

- GenaiTask
  - `id` string
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `name` string
  - `instructions` string
  - `status` 'PENDING' | 'RUNNING' | 'BLOCKED' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'EXPIRED' | 'OTHER'
  - `model_id` string
  - `user_id` string
  - `repo_url` string
  - `source_branch_identifier` string
  - `target_branch_identifier` string
  - `pullrequest_url` string
  - `web_url` string
  - `messages` GenaiContent[] — The conversation between the user and the coding agent.
    - `role` 'SYSTEM' | 'USER' | 'ASSISTANT'
    - `content` string, required
  - `summary` string
  - `error` string
  - `files_changed` number
  - `lines_added` number
  - `lines_deleted` number
  - `tokens_used` number
  - `started_at` string, date-time
  - `completed_at` string, date-time
  - `agent_id` string
  - `organization_id` string
  - `raw` object

## Changes

- **2026-09-25** `ce0cfee83c14` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/unified/apis/unified-to-api/changes/genai/:connection_id/task/:id/patch.md)

---

[API](https://skmtc.dev/unified/apis/unified-to-api.md) · [All operations](https://skmtc.dev/unified/apis/unified-to-api/llms.txt) · [OpenAPI document](https://skmtc.dev/unified/apis/unified-to-api/revisions/ce0cfee83c14?raw)
