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

# Update a task

> Atualiza os campos enviados. `status` troca entre pendente, em andamento, concluída e cancelada.



## OpenAPI

````yaml patch /v1/tasks/{id}
openapi: 3.0.0
info:
  title: Kinbox API
  description: Kinbox public API
  version: '2.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/tasks/{id}:
    patch:
      tags:
        - v1Tasks
      summary: Update a task
      description: >-
        Atualiza os campos enviados. `status` troca entre pendente, em
        andamento, concluída e cancelada.
      operationId: updateTaskPublic
      parameters:
        - name: id
          required: true
          in: path
          description: ID da tarefa
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskPublicDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskPublicDto'
components:
  schemas:
    UpdateTaskPublicDto:
      type: object
      properties:
        name:
          type: string
          description: Nome da tarefa
        description:
          type: string
        type:
          type: string
          enum:
            - task
            - call
            - meeting
            - deadline
            - mail
            - lunch
            - init-bot
          default: task
        operatorId:
          type: number
          description: 'ID do responsável. Padrão: o usuário dono do token.'
        dueAt:
          type: string
          description: >-
            Início da tarefa (ISO 8601 com fuso). Padrão: agora. Agenda o
            lembrete do responsável.
        durationMinutes:
          type: number
          default: 5
          description: Duração em minutos
        priority:
          type: string
          enum:
            - none
            - low
            - medium
            - high
            - urgent
        contactId:
          type: number
          description: ID do contato vinculado
        status:
          type: string
          enum:
            - todo
            - in_progress
            - done
            - canceled
    TaskPublicDto:
      type: object
      properties:
        id:
          type: string
        _id:
          type: string
        priority:
          type: string
          enum:
            - none
            - low
            - medium
            - high
            - urgent
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/TaskAttachment'
      required:
        - id
        - _id
    TaskAttachment:
      type: object
      properties:
        id:
          type: string
        filename:
          type: string
        name:
          type: string
        size:
          type: number
        mimeType:
          type: string
        authorId:
          type: number
        createdAt:
          format: date-time
          type: string
      required:
        - id
        - filename
        - name
        - size
        - createdAt

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.