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

# Update a task

> Update fields on an existing task by ID.



## OpenAPI

````yaml post /api/v2/tasks/{taskId}
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
paths:
  /api/v2/tasks/{taskId}:
    post:
      tags:
        - Tasks
      summary: Update a task
      description: Update fields on an existing task by ID.
      parameters:
        - name: taskId
          in: path
          required: true
          schema:
            type: string
          description: Task ID
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  type: string
                  example: canceled
                context:
                  type: string
                  example: New context
                waitToGreet:
                  type: boolean
                  example: true
      responses:
        '200':
          description: Task updated successfully
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Task not found
        '500':
          description: Internal Server Error

````