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

# Listar tarefas

> Retorna uma lista paginada de tarefas do workspace.

<Accordion title="Escopo necessário">
`tasks:read`
</Accordion>



## OpenAPI

````yaml /pt/api-reference/openapi.json get /v1/tasks
openapi: 3.1.0
info:
  title: OAuth 2.1
  description: Endpoints para registrar aplicativos e gerenciar tokens OAuth 2.1.
  version: 1.0.0
  contact:
    name: Suporte Vendaze
    email: suporte@vendaze.com
servers:
  - url: https://api.vendaze.com
    description: Produção
security:
  - bearerAuth: []
tags:
  - name: OAuth
  - name: Pessoas
  - name: Empresas
  - name: Negócios
  - name: Pipelines
  - name: Tarefas
  - name: Tipos de Tarefas
  - name: Produtos
  - name: Tags
  - name: Listas
  - name: Campos Adicionais
  - name: Webhooks
paths:
  /v1/tasks:
    get:
      tags:
        - Tarefas
      summary: Listar tarefas
      description: |-
        Retorna uma lista paginada de tarefas do workspace.

        <Accordion title="Escopo necessário">
        `tasks:read`
        </Accordion>
      operationId: listTasks
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Número da página.
        - name: per_page
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 50
          description: 'Quantidade de registros por página. Máximo: 50.'
        - name: order_by
          in: query
          schema:
            type: string
            enum:
              - created_at
              - due_date
              - updated_at
            default: created_at
          description: Campo de ordenação.
        - name: order
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          description: Direção da ordenação.
        - name: person_id
          in: query
          schema:
            type: string
            format: uuid
          description: Filtrar por UUID de pessoa.
        - name: company_id
          in: query
          schema:
            type: string
            format: uuid
          description: Filtrar por UUID de empresa.
        - name: deal_id
          in: query
          schema:
            type: string
            format: uuid
          description: Filtrar por UUID de deal.
        - name: type_id
          in: query
          schema:
            type: string
            format: uuid
          description: Filtrar por UUID do tipo de tarefa.
        - name: priority
          in: query
          schema:
            type: string
            enum:
              - high
              - medium
              - low
          description: Filtrar por nível de prioridade.
        - name: completed
          in: query
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
          description: Filtrar por status de conclusão.
        - name: created_after
          in: query
          schema:
            type: string
            format: date-time
          description: Retorna tarefas criadas a partir desta data ISO 8601.
        - name: created_before
          in: query
          schema:
            type: string
            format: date-time
          description: Retorna tarefas criadas até esta data ISO 8601.
      responses:
        '200':
          description: Tarefas retornadas com sucesso.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksListResponse'
              example:
                data:
                  - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    title: Ligar para o prospect
                    notes: Enviar a proposta até sexta.
                    due_date: '2026-06-15T09:00:00Z'
                    type:
                      id: b2c3d4e5-f6a7-8901-bcde-f12345678901
                      title: Ligação
                      color: '#463dfb'
                      key: ligacao
                    person_id: c3d4e5f6-a7b8-9012-cdef-123456789012
                    company_id: null
                    deal_id: null
                    owner:
                      id: d4e5f6a7-b8c9-0123-defa-234567890123
                      name: João Silva
                      email: joao@empresa.com.br
                    priority: high
                    completed: false
                    created_at: '2026-06-01T10:30:00Z'
                    updated_at: '2026-06-01T10:30:00Z'
                meta:
                  total: 34
                  page: 1
                  per_page: 50
                  has_more: false
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    TasksListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
    Task:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Identificador único da tarefa.
        title:
          type: string
          maxLength: 200
          example: Ligar para o prospect
        notes:
          type: string
          nullable: true
          maxLength: 3000
          description: Notas opcionais da tarefa.
          example: Enviar a proposta até sexta.
        due_date:
          type: string
          format: date-time
          description: Data e hora de vencimento da tarefa em ISO 8601 UTC.
          example: '2026-06-15T09:00:00Z'
        type:
          $ref: '#/components/schemas/TaskType'
        person_id:
          type: string
          format: uuid
          nullable: true
          description: UUID da pessoa associada à tarefa.
        company_id:
          type: string
          format: uuid
          nullable: true
          description: UUID da empresa associada à tarefa.
        deal_id:
          type: string
          format: uuid
          nullable: true
          description: UUID do deal associado à tarefa.
        owner:
          $ref: '#/components/schemas/Owner'
        priority:
          type: string
          nullable: true
          enum:
            - high
            - medium
            - low
          description: Nível de prioridade. `null` quando nenhuma prioridade está definida.
          example: high
        completed:
          type: boolean
          description: '`true` quando a tarefa foi concluída.'
          example: false
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PaginationMeta:
      type: object
      properties:
        total:
          type: integer
          example: 1
        page:
          type: integer
          example: 1
        per_page:
          type: integer
          example: 50
        has_more:
          type: boolean
          example: false
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type: string
              format: uuid
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: Validation failed.
            fields:
              type: object
              additionalProperties:
                type: string
            request_id:
              type: string
              format: uuid
    TaskType:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Identificador único do tipo de tarefa.
        title:
          type: string
          maxLength: 40
          example: Ligação
          description: Nome de exibição do tipo de tarefa.
        color:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          description: Cor de exibição em formato hex RGB.
          example: '#463dfb'
        key:
          type: string
          nullable: true
          maxLength: 40
          description: >-
            Chave identificadora do tipo de tarefa. Única no workspace. Usada no
            campo `type` ao criar ou atualizar tarefas.
          example: ligacao
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Owner:
      type: object
      nullable: true
      description: >-
        Membro do workspace responsável pela tarefa. `null` quando nenhum
        responsável está atribuído.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: João Silva
        email:
          type: string
          format: email
          example: joao@empresa.com.br
  responses:
    Unauthorized:
      description: >-
        Token ausente, inválido ou expirado. Códigos possíveis: `unauthorized`,
        `token_expired`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: Missing or invalid Authorization header.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InsufficientScope:
      description: 'Token sem o escopo necessário. Código de erro: `insufficient_scope`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: insufficient_scope
              message: This endpoint requires the 'webhooks:read' scope.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    ValidationError:
      description: >-
        Validação de entrada falhou. Código: `validation_error`. O objeto
        `fields` mapeia cada campo inválido para uma descrição do problema.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            error:
              code: validation_error
              message: Validation failed.
              fields:
                url: url must use HTTPS.
                events: At least one event is required.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    RateLimitExceeded:
      description: 'Rate limit excedido. Código: `rate_limit_exceeded`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: Rate limit exceeded. Try again in 60 seconds.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InternalError:
      description: 'Erro interno inesperado. Código: `internal_error`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal_error
              message: An unexpected error occurred.
              request_id: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Access token OAuth 2.1.

````