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

# Detalhes de um negócio

> Um negócio pelo id



## OpenAPI

````yaml GET /api/v1/crm/deals/{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/deals/{id}:
    get:
      tags:
        - CRM
      summary: Detalhes de um negócio
      parameters:
        - schema:
            type: string
            description: ID do negócio (UUID)
          required: true
          name: id
          in: path
      responses:
        '200':
          description: O negócio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrmDeal'
        '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:read
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '404':
          description: Não encontrado
          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:
    CrmDeal:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        pipeline_id:
          type: string
        stage:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            kind:
              type: string
              enum:
                - open
                - won
                - lost
          required:
            - id
            - name
            - kind
        status:
          type: string
          enum:
            - open
            - won
            - lost
          description: open, won ou lost (o tipo da etapa)
        lost_reason:
          type:
            - string
            - 'null'
        value_cents:
          type:
            - number
            - 'null'
        currency:
          type: string
        expected_close_date:
          type:
            - string
            - 'null'
          description: Previsão de fechamento (AAAA-MM-DD)
        contact:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            name:
              type:
                - string
                - 'null'
            phone:
              type:
                - string
                - 'null'
          required:
            - id
            - name
            - phone
        company:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
        tags:
          type: array
          items:
            type: string
        custom_fields:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
        stage_entered_at:
          type: string
          description: Quando entrou na etapa atual
          example: '2026-11-02T14:00:00.000Z'
        closed_at:
          type:
            - string
            - 'null'
          description: Quando foi ganho ou perdido; null no aberto
          example: '2026-11-02T14:00:00.000Z'
        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
        - title
        - pipeline_id
        - stage
        - status
        - lost_reason
        - value_cents
        - currency
        - expected_close_date
        - contact
        - company
        - tags
        - custom_fields
        - stage_entered_at
        - closed_at
        - 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.