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

# Update a task

> Updates specified fields on a task. Send null to clear optional fields (dueTime, priority, timeSpent, details).



## OpenAPI

````yaml https://znift.com/api/v1/openapi.json patch /api/v1/tasks/{taskId}
openapi: 3.1.0
info:
  title: Znift Tasks API
  version: 1.0.0
  description: >-
    Public REST API for managing Znift tasks. Designed for AI agents, CLI tools,
    and automation. Authenticate with an API key via the x-api-key header.
servers:
  - url: https://znift.com
    description: Znift Production API
security:
  - apiKey: []
paths:
  /api/v1/tasks/{taskId}:
    patch:
      summary: Update a task
      description: >-
        Updates specified fields on a task. Send null to clear optional fields
        (dueTime, priority, timeSpent, details).
      operationId: updateTask
      parameters:
        - name: taskId
          in: path
          required: true
          schema:
            type: string
          description: Task ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  minLength: 1
                dueTime:
                  type: number
                  nullable: true
                priority:
                  type: string
                  enum:
                    - high
                    - medium
                    - low
                  nullable: true
                timeSpent:
                  type: number
                  nullable: true
                details:
                  type: string
                  nullable: true
      responses:
        '200':
          description: Task updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
        '404':
          description: Task not found
components:
  schemas:
    Success:
      type: object
      properties:
        success:
          type: boolean
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key with znift_ prefix. Create one in Profile > API Keys.

````