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

# Funis e etapas

> Os funis, com as etapas na ordem do kanban.



## OpenAPI

````yaml https://app.onixfy.com/api/v1/openapi.json get /funnels
openapi: 3.1.0
info:
  title: API pública do Onixfy
  version: 1.0.0
  description: >-
    API de leitura (v1) para painéis e BI: oportunidades, histórico de etapas,
    empresas e cadastros, sem dados pessoais de contatos. Autentique com uma
    chave de API (`Authorization: Bearer onx_...`) gerada em Configurações →
    Integrações → Chaves de API.
servers:
  - url: https://app.onixfy.com/api/v1
    description: Produção
security:
  - chaveDeAPI: []
tags:
  - name: Organização
    description: A organização da chave.
  - name: Oportunidades
    description: Oportunidades e o histórico de etapas.
  - name: Empresas
    description: Empresas (razão social, nome fantasia e CNPJ).
  - name: Cadastros
    description: Funis, etapas, motivos de perda, produtos, origens e usuários.
paths:
  /funnels:
    get:
      tags:
        - Cadastros
      summary: Funis e etapas
      description: Os funis, com as etapas na ordem do kanban.
      responses:
        '200':
          description: Sucesso.
          headers:
            X-RateLimit-Limit:
              description: Requisições por minuto desta chave.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Quantas ainda cabem na janela atual.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Quando a janela recomeça (segundos desde 1970, UTC).
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunnelList'
        '401':
          description: Chave ausente, inválida, revogada ou vencida (`api_key_expired`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            A chave não lê a v1, a organização não confere, a assinatura está
            suspensa ou o plano não inclui a API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Limite da chave (ou do usuário que a criou) excedido.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-RateLimit-Limit:
              description: Requisições por minuto desta chave.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Quantas ainda cabem na janela atual.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Quando a janela recomeça (segundos desde 1970, UTC).
              schema:
                type: integer
            Retry-After:
              description: Segundos até poder tentar de novo.
              schema:
                type: integer
components:
  schemas:
    FunnelList:
      type: object
      additionalProperties: false
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Funnel'
        pagination:
          $ref: '#/components/schemas/Pagination'
    Error:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                Código estável do erro (ex.: `unauthorized`, `api_key_expired`,
                `forbidden`, `rate_limited`, `invalid_parameter`).
            message:
              type: string
              description: Explicação em português.
    Funnel:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - position
        - is_default
        - stages
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        position:
          type: integer
        is_default:
          type: boolean
        stages:
          type: array
          items:
            $ref: '#/components/schemas/Stage'
    Pagination:
      type: object
      additionalProperties: false
      required:
        - next_cursor
        - has_more
      properties:
        next_cursor:
          type:
            - string
            - 'null'
          description: Cursor da próxima página; mande em `cursor`. Nulo na última página.
        has_more:
          type: boolean
          description: Há mais itens depois desta página.
    Stage:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - position
        - outcome
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        position:
          type: integer
        outcome:
          type: string
          enum:
            - open
            - won
            - lost
          description: open (em andamento), won (ganho) ou lost (perdido).
  securitySchemes:
    chaveDeAPI:
      type: http
      scheme: bearer
      bearerFormat: onx_...
      description: Chave de API do Onixfy (`onx_` + 40 caracteres).

````

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