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

# Create a task

> Cria uma tarefa. Somente `name` é obrigatório; o responsável padrão é o usuário do token e o início padrão é agora.



## OpenAPI

````yaml post /v1/tasks
openapi: 3.0.0
info:
  title: Kinbox API
  description: Kinbox public API
  version: '2.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/tasks:
    post:
      tags:
        - v1Tasks
      summary: Create a task
      description: >-
        Cria uma tarefa. Somente `name` é obrigatório; o responsável padrão é o
        usuário do token e o início padrão é agora.
      operationId: createTaskPublic
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaskPublicDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskPublicDto'
components:
  schemas:
    CreateTaskPublicDto:
      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
        parentId:
          type: string
          description: ID da tarefa pai (cria uma subtarefa; só um nível)
      required:
        - name
    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.