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

# Criar lista (table_kind=list)

> Cria uma lista para organizar records (contacts ou businesses). Diferente de datasets, listas não são fontes de dados mas sim contextos/views sobre records existentes.



## OpenAPI

````yaml https://api.nuvia.ai/api/docs/user-json post /v1/tables/list
openapi: 3.0.0
info:
  title: Nuvia API - Empresa
  description: Documentação da API para empresas
  version: '1.0'
  contact: {}
servers:
  - url: https://api.nuvia.ai
security: []
tags:
  - name: auth
    description: Autenticação
paths:
  /v1/tables/list:
    post:
      tags:
        - tables
      summary: Criar lista (table_kind=list)
      description: >-
        Cria uma lista para organizar records (contacts ou businesses).
        Diferente de datasets, listas não são fontes de dados mas sim
        contextos/views sobre records existentes.
      operationId: TableController_createList
      parameters:
        - name: x-company-id
          in: header
          description: >-
            Identificador da empresa-alvo. Obrigatório apenas para API Keys
            globais (type=global). Ignorado para API Keys de empresa e usuários
            humanos.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateListTableDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableEntity'
      security:
        - JWT-auth: []
components:
  schemas:
    CreateListTableDto:
      type: object
      properties:
        name:
          type: string
          description: Nome da lista
        description:
          type: string
          description: Descrição da lista
        table_kind:
          enum:
            - dataset
            - list
          type: string
          description: Tipo da tabela
          default: dataset
        object_type:
          enum:
            - contact
            - business
          type: string
          description: Tipo de objeto para listas (obrigatório se table_kind=list)
        columns:
          description: Colunas da lista (para listas Attio-like)
          type: array
          items:
            $ref: '#/components/schemas/ListColumnDto'
      required:
        - name
    TableEntity:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        name:
          type: string
        description:
          type: string
        file_url:
          type: string
        status:
          enum:
            - PROCESSING
            - READY
            - ERROR
            - PARTIAL
          type: string
        type:
          enum:
            - DEFAULT
            - FILE
          type: string
        table_kind:
          enum:
            - dataset
            - list
          type: string
        object_type:
          enum:
            - contact
            - business
          type: string
        file_metadata:
          type: object
        columns:
          type: array
          items:
            type: object
        stats:
          type: object
        import_errors:
          type: array
          items:
            type: object
        summary:
          type: string
        data:
          deprecated: true
          type: array
          items:
            type: object
        sync_key_column:
          type: string
          description: |-
            Key da coluna de negocio usada como chave no sync por upload (diff).
            Sem ela, o sync por upload e recusado.
        ranking_config:
          description: >-
            Criterios ordenados de ranking de negocio. O sync materializa o
            resultado

            na coluna interna _score (maior = melhor).
          type: array
          items:
            type: object
        company:
          $ref: '#/components/schemas/CompanyEntity'
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - _id
        - name
        - status
        - type
        - table_kind
        - columns
        - stats
        - company
    ListColumnDto:
      type: object
      properties:
        key:
          type: string
          description: UUID da coluna
        name:
          type: string
          description: Nome da coluna
        type:
          enum:
            - string
            - number
            - date
            - boolean
            - email
            - url
            - currency
            - reference
          type: string
          description: Tipo da coluna
        description:
          type: string
          description: Descrição textual da coluna
        settings:
          description: Settings da coluna para listas (source, record_field, etc)
          allOf:
            - $ref: '#/components/schemas/ListColumnSettingsDto'
        is_nullable:
          type: boolean
        is_unique:
          type: boolean
        sample_values:
          type: array
          items:
            type: string
      required:
        - name
    ObjectId:
      type: object
      properties: {}
    CompanyEntity:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        name:
          type: string
        channels:
          type: array
          items:
            type: string
            enum:
              - WAP_AUTO_CLOSER
              - WEB_V2
              - EVOLUTION_API
              - LINKEDIN
              - EMAIL
        agent_flows:
          type: array
          items:
            $ref: '#/components/schemas/AgentFlowEntity'
        description:
          type: string
        general_config:
          type: object
        status:
          enum:
            - ACTIVE
            - DELETED
          type: string
        agent_builder_mcp_enabled:
          type: boolean
          description: >-
            Libera as tools do agent builder no `/mcp` do cliente para ESTA
            empresa.

            Default `true`: o builder é GA — toda empresa tem, salvo opt-OUT
            explícito

            (`false`). Vira o interruptor por-empresa de EXCLUSÃO (ex.: desligar
            um

            cliente que fez bagunça), não de inclusão. O gate de AUTORIA
            continua sendo

            o role (COMPANY_ADMIN); usuário comum só lê/simula. Empresas criadas
            antes

            do GA foram ligadas via backfill
            (scripts/backfill-agent-builder-mcp-flag.ts).
      required:
        - _id
        - name
        - channels
        - agent_flows
        - description
        - status
    ListColumnSettingsDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - record
            - custom
          description: Fonte dos dados
        record_field:
          type: string
          description: 'Campo do record (ex: phone_number, name)'
        custom_field_id:
          type: string
          description: ID do custom field
        locked:
          type: boolean
          description: Coluna protegida (não editável/removível)
        reference_object_type:
          enum:
            - contact
            - business
          type: string
          description: Tipo de objeto referenciado (para type=reference)
        reference_display_field:
          type: string
          description: 'Campo do record referenciado a exibir (ex: name)'
        is_multi_value:
          type: boolean
          description: 'true para referências 1:N (ex: Business -> Contacts)'
      required:
        - source
    AgentFlowEntity:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        name:
          type: string
        url:
          type: string
        specialist_url:
          type: string
        type:
          enum:
            - N8N
            - API
            - INTERNAL
          type: string
      required:
        - _id
        - name
        - url
        - specialist_url
        - type
  securitySchemes:
    JWT-auth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Token JWT de autenticação

````