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

# Alterar coluna

> Muda o rótulo, as opções, a posição ou se o agente preenche

Envie só o que muda. `options` só vale em coluna do tipo `select`. A chave, o tipo e a entidade não mudam.


## OpenAPI

````yaml PATCH /api/v1/crm/fields/{id}
openapi: 3.1.0
info:
  title: Integra BFI API
  version: 1.0.0
  description: >
    <img src="/public/logo_dark.webp" alt="Integra" height="36"
    style="margin-bottom:16px" />


    A API da Integra para integrações externas.


    > [!tip]

    > **Copie a documentação completa para sua IA favorita:**

    > [Abrir página de cópia](/docs/markdown) ou baixe o [llm.txt](/llm.txt)


    ---


    ## Como começar


    ### 1. Gerar sua API Key


    Acesse o painel da Integra em **Settings > API Keys** e clique em **Nova API
    Key**.


    > [!important]

    > Copie a key gerada (`ik_live_...`) imediatamente: ela **só será exibida
    uma vez**.


    ### 2. Autenticar requests


    Envie o header `Authorization` em todas as chamadas:


    ```

    Authorization: Bearer ik_live_sua_key_aqui

    ```


    ### 3. Fazer sua primeira chamada


    ```bash

    curl -H "Authorization: Bearer ik_live_xxx" \
      https://api.useintegra.com.br/api/v1/campaigns
    ```


    > [!success]

    > Se a resposta for `200 OK` com JSON, sua integração está funcionando!


    ---


    ## Rate Limiting


    | Header | Descrição |

    |--------|-----------|

    | `X-RateLimit-Limit` | Limite total (60/min) |

    | `X-RateLimit-Remaining` | Requests restantes |

    | `X-RateLimit-Reset` | Timestamp de reset (epoch) |


    > [!warning]

    > Ao exceder **60 requests/minuto** por API Key, a API retorna status `429
    Too Many Requests`.


    ---


    ## Erros comuns


    | Status | Erro | Causa |

    |--------|------|-------|

    | `401` | Invalid API key | Key inválida ou revogada |

    | `403` | Forbidden | Key sem permissão para o recurso |

    | `429` | Rate limit exceeded | Excedeu 60 req/min |

    | `500` | Internal server error | Erro interno, contate o suporte |
servers:
  - url: https://api.useintegra.com.br
    description: Production
security:
  - ApiKey: []
tags:
  - name: Campaigns
    description: Gerenciamento de campanhas de voz e WhatsApp
  - name: Calls
    description: Histórico de chamadas
  - name: CRM
    description: 'CRM Integra da organização: funis, contatos, negócios e atividades'
  - name: Automations
    description: Dispara as automações com o gatilho Chamada pela nossa API
  - name: Meetings
    description: Reuniões que os agentes marcaram na agenda da organização
  - name: Webhooks
    description: Gerenciamento de webhooks para notificações em tempo real
paths:
  /api/v1/crm/fields/{id}:
    patch:
      tags:
        - CRM
      summary: Alterar um campo personalizado
      description: >-
        O rótulo, as opções (só na seleção), a posição e se o agente preenche. A
        chave, o tipo e a entidade não mudam.
      parameters:
        - schema:
            type: string
            description: ID do campo (UUID)
          required: true
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrmFieldUpdate'
      responses:
        '200':
          description: O campo alterado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrmField'
        '400':
          description: >-
            Campo inválido, corpo vazio ou options num campo que não é de
            seleção
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '401':
          description: Não autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '403':
          description: A chave não tem o escopo crm:write
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '404':
          description: Não encontrado (ou arquivado)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '409':
          description: >-
            O CRM está desligado na organização (ligue no painel, em CRM >
            Configurações)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKey: []
components:
  schemas:
    CrmFieldUpdate:
      type: object
      properties:
        label:
          type: string
          minLength: 1
          maxLength: 60
          description: O nome que o painel mostra (até 60 caracteres)
          example: Convênio
        options:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 60
          minItems: 1
          maxItems: 50
          description: Só no campo de seleção (nos outros, 400)
          example:
            - Unimed
            - Amil
        position:
          type: integer
          minimum: 0
          maximum: 1000
        agent_writable:
          type: boolean
      additionalProperties: false
    CrmField:
      type: object
      properties:
        id:
          type: string
        entity:
          type: string
          enum:
            - contact
            - company
            - deal
          description: contact, company ou deal
        key:
          type: string
          description: A chave que vai em custom_fields do contato e do negócio
        label:
          type: string
        type:
          type: string
          enum:
            - text
            - number
            - date
            - select
            - boolean
          description: >-
            text, number, date, select ou boolean. O tipo nunca muda depois de
            criado
        options:
          type:
            - array
            - 'null'
          items:
            type: string
          description: As opções, só em type select; null nos outros
        position:
          type: number
          description: A ordem na lista (menor primeiro)
        agent_writable:
          type: boolean
          description: O agente pode preencher o campo
        created_at:
          type: string
          description: Criação (UTC)
          example: '2026-11-02T14:00:00.000Z'
        updated_at:
          type: string
          description: Última mudança (UTC)
          example: '2026-11-02T14:00:00.000Z'
      required:
        - id
        - entity
        - key
        - label
        - type
        - options
        - position
        - agent_writable
        - created_at
        - updated_at
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API Key da organização (Authorization: Bearer ik_live_xxx)'

````

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