> ## Documentation Index
> Fetch the complete documentation index at: https://docs.terminaluse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Task

> Update mutable fields for a task by its unique ID.



## OpenAPI

````yaml openapi.json PUT /tasks/{task_id}
openapi: 3.1.0
info:
  title: Sb0 API
  version: 0.1.0
servers: []
security: []
paths:
  /tasks/{task_id}:
    put:
      tags:
        - Tasks
      summary: Update Task by ID
      description: Update mutable fields for a task by its unique ID.
      operationId: tasks_update
      parameters:
        - in: path
          name: task_id
          required: true
          schema:
            title: Task Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    UpdateTaskRequest:
      properties:
        task_metadata:
          additionalProperties: true
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: If provided, replaces task_metadata with this value
      title: UpdateTaskRequest
      type: object
    Task:
      properties:
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: The timestamp when the task was created
        created_version_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Version ID when task was created (immutable, for audit)
        current_version_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Current version for routing (can change on migration)
        filesystem_id:
          title: Filesystem ID for persistent filesystem storage
          type: string
        id:
          title: Unique Task ID
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Unique name of the task
        namespace_id:
          title: Namespace ID (denormalized from agent for GCS path construction)
          type: string
        params:
          additionalProperties: true
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Task parameters
        status:
          anyOf:
            - $ref: '#/components/schemas/TaskStatus'
            - type: 'null'
          title: The current status of the task
        status_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: The reason for the current task status
        task_metadata:
          additionalProperties: true
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Task metadata
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: The timestamp when the task was last updated
      required:
        - id
        - filesystem_id
        - namespace_id
      title: Task
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    TaskStatus:
      enum:
        - IDLE
        - CANCELED
        - COMPLETED
        - FAILED
        - RUNNING
        - TERMINATED
        - TIMED_OUT
        - DELETED
      title: TaskStatus
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````