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

# Criar funil

> Cria um novo funil de vendas



## OpenAPI

````yaml https://api.jurichat.com/docs/client/openapi.json post /funnel/
openapi: 3.1.0
info:
  title: JuriChat API — Documentação para Integradores
  description: ''
  version: 1.0.0
servers:
  - url: https://api.jurichat.com
    description: Production server
security:
  - apiKeyAuth: []
tags: []
paths:
  /funnel/:
    post:
      tags:
        - CRM
      summary: Criar funil
      description: Cria um novo funil de vendas
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  description: Nome do funil.
                columns:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        description: Nome da coluna.
                      color:
                        type: string
                        minLength: 1
                        description: Cor da coluna.
                      index:
                        type: integer
                        minimum: 0
                        description: Posição da coluna no funil.
                      kind:
                        type: string
                        enum:
                          - NORMAL
                          - WON
                          - LOST
                        description: 'Tipo da coluna: NORMAL, WON ou LOST.'
                    required:
                      - name
                      - color
                      - index
                    additionalProperties: false
                  description: Colunas iniciais do funil.
                inboxId:
                  type: string
                  pattern: ^[cC][^\s-]{8,}$
                  description: ID da inbox vinculada ao funil.
              required:
                - name
                - inboxId
              additionalProperties: false
        required: true
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  inboxId:
                    type: string
                    pattern: ^[cC][^\s-]{8,}$
                  columns:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        color:
                          type: string
                        index:
                          type: number
                        kind:
                          type: string
                          enum:
                            - NORMAL
                            - WON
                            - LOST
                      required:
                        - name
                        - color
                        - index
                        - kind
                      additionalProperties: false
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - name
                  - inboxId
                  - createdAt
                  - updatedAt
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                  code:
                    type: string
                  details:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: object
                        properties: {}
                        additionalProperties: true
                    description: Detalhes adicionais do erro.
                required:
                  - message
                  - statusCode
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                  code:
                    type: string
                  details:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: object
                        properties: {}
                        additionalProperties: true
                    description: Detalhes adicionais do erro.
                required:
                  - message
                  - statusCode
                additionalProperties: false
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-jurichat-api-key
      description: >-
        Chave de API do escritório (criada no painel). Envie o valor no header
        x-jurichat-api-key.

````