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

# Registrar nota

> Grava uma nota na linha do tempo de um contato ou de um negócio



## OpenAPI

````yaml POST /api/v1/crm/activities
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/activities:
    post:
      tags:
        - CRM
      summary: Registrar uma nota
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrmNoteCreate'
      responses:
        '201':
          description: 'A nota (type: note, actor: api)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrmActivity'
        '400':
          description: >-
            Campo inválido; sem contact_id nem deal_id; contato ou negócio que
            não é da organizaçã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
        '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:
    CrmNoteCreate:
      type: object
      properties:
        contact_id:
          type: string
          format: uuid
          description: O contato (ao menos um entre contact_id e deal_id)
        deal_id:
          type: string
          format: uuid
          description: O negócio
        title:
          type: string
          minLength: 1
          maxLength: 200
        body:
          type: string
          minLength: 1
          maxLength: 20000
          description: O texto da nota (até 20.000 caracteres)
        occurred_at:
          type: string
          format: date-time
          description: 'Quando aconteceu (ISO 8601 com fuso). Default: agora'
      required:
        - body
      additionalProperties: false
    CrmActivity:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - call
            - whatsapp
            - instagram
            - messenger
            - email
            - meeting
            - note
            - stage_change
            - task
            - system
          description: >-
            call, whatsapp, instagram, messenger, email, meeting, note,
            stage_change, task ou system
        contact_id:
          type:
            - string
            - 'null'
        deal_id:
          type:
            - string
            - 'null'
        occurred_at:
          type: string
          description: Quando aconteceu (UTC)
          example: '2026-11-02T14:00:00.000Z'
        actor:
          type: string
          enum:
            - user
            - agent
            - system
            - api
            - assistant
          description: 'Quem registrou: user (painel), agent, system, api ou assistant'
        agent_id:
          type:
            - string
            - 'null'
        call_id:
          type:
            - string
            - 'null'
          description: >-
            A ligação (o mesmo id de GET /api/v1/calls/{id}), na atividade de
            ligação
        title:
          type:
            - string
            - 'null'
        body:
          type:
            - string
            - 'null'
        stage_change:
          type:
            - object
            - 'null'
          properties:
            from_stage_id:
              type:
                - string
                - 'null'
            to_stage_id:
              type:
                - string
                - 'null'
            from_stage_name:
              type:
                - string
                - 'null'
            to_stage_name:
              type:
                - string
                - 'null'
          required:
            - from_stage_id
            - to_stage_id
            - from_stage_name
            - to_stage_name
          description: Só na stage_change
        created_at:
          type: string
          description: Registro (UTC)
          example: '2026-11-02T14:00:00.000Z'
      required:
        - id
        - type
        - contact_id
        - deal_id
        - occurred_at
        - actor
        - agent_id
        - call_id
        - title
        - body
        - stage_change
        - created_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.