> ## 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

> Updates a Task by ID. Repeating and cronOneOff Tasks support title, taskContext, state, and cronSchedule. Computer Tasks and retryable communication Tasks can only be canceled.



## 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: []
tags:
  - name: Agents
  - name: Inbound Email
    description: Control which senders may create inbound email work for an Agent.
  - name: Features
    description: Inspect capabilities available within an account hierarchy.
  - name: Conversation Logs
    description: Query conversation activity and calculate account-level metrics.
  - name: Computer Agents
    description: Set up, configure, inspect, and manage Vida Computer Agents.
  - name: Computer Agent Sessions
    description: View and reset Computer Agent sessions.
  - name: Accounts
  - name: Agent Templates
    description: Create, manage, and apply reusable Agent configurations.
paths:
  /api/v2/tasks/{taskId}:
    post:
      tags:
        - Tasks
      summary: Update a task
      description: >-
        Updates a Task by ID. Repeating and cronOneOff Tasks support title,
        taskContext, state, and cronSchedule. Computer Tasks and retryable
        communication Tasks can only be canceled.
      parameters:
        - name: taskId
          in: path
          required: true
          schema:
            type: string
          description: Task ID
        - name: targetAccountId
          description: Require the Task to belong to this agent account in the organization
          in: query
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  type: string
                  description: Repeating and cronOneOff Tasks accept active or paused
                  example: paused
                title:
                  type: string
                context:
                  type: string
                  description: Contact/background context for communication Tasks
                taskContext:
                  type: string
                  description: Instructions for a repeating or cronOneOff Task
                  example: Review the last complete hour and report material changes
                cronSchedule:
                  type: object
                  description: Schedule for a repeating or cronOneOff Task
                greeting:
                  type: string
                waitToGreet:
                  type: boolean
                  example: true
                message:
                  type: string
                scheduledFor:
                  type: integer
                externalTaskId:
                  type: string
                meta:
                  type: object
      responses:
        '200':
          description: Task updated successfully
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Target account is outside the organization
        '404':
          description: Task not found
        '409':
          description: Task cannot be updated in its current state
        '500':
          description: Internal Server Error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````