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

# Criar ou atualizar um funil de projeto

> Criar ou atualizar funil de projeto.



## OpenAPI

````yaml /api-reference/openapi.json post /api/management/project-funnel
openapi: 3.0.0
info:
  title: Olie API
  version: 1.0.0
  description: >
    # Introdução 👋


    Olá! Esta é a documentação oficial da API da [olie.ai](https://olie.ai/).
    Aqui você encontra as referências e exemplos de uso dos nossos endpoints.


    Para uma visão completa, recomendamos fortemente que você leia a
    [documentação oficial](https://docs.olie.ai/api-reference/introduction). Lá
    estão detalhados tópicos essenciais como
    [autenticação](https://docs.olie.ai/api-reference/introduction/authentication),
    [estrutura de
    respostas](https://docs.olie.ai/api-reference/general/response-structure),
    [paginação](https://docs.olie.ai/api-reference/general/pagination) e outros
    guias de integração.


    No Postman, esta coleção foca nas informações específicas de cada requisição
    (endpoints, parâmetros e exemplos), servindo como apoio rápido para testes e
    desenvolvimento.
servers:
  - url: https://api.olie.ai
security:
  - BearerAuth: []
paths:
  /api/management/project-funnel:
    post:
      tags:
        - project-funnels
      summary: Criar ou atualizar um funil de projeto
      description: Criar ou atualizar funil de projeto.
      operationId: criarOuAtualizarFunilDeProjeto
      requestBody:
        content:
          application/json:
            schema:
              title: Criação de Funil
              description: >-
                Payload utilizado para criação ou atualização de um funil com
                etapas, etiquetas, status, acessos e templates.
              allOf:
                - description: Estrutura principal para criação ou edição de um funil.
                  title: Funil
                  type: object
                  properties:
                    id:
                      type: integer
                      example: null
                      description: >-
                        ID do funil. Deve ser null na criação e preenchido em
                        operações de atualização.
                    name:
                      type: string
                      example: Nome do funil
                      description: Nome do funil. Campo obrigatório na criação.
                    prefix:
                      type: string
                      maxLength: 20
                      example: PREFIX
                      description: >-
                        Prefixo utilizado para geração automática de códigos dos
                        projetos criados dentro do funil.
                    steps:
                      type: array
                      description: Lista de etapas que do funil.
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Backlog
                            description: Nome da etapa do funil.
                          step_forward:
                            type: integer
                            example: null
                            description: ID da próxima etapa permitida.
                          step_backward:
                            type: integer
                            example: null
                            description: ID da etapa anterior permitida.
                          show_contact_form:
                            type: boolean
                            example: false
                            description: >-
                              Define se o formulário de contato deve ser exibido
                              ao mover um projeto para essa etapa.
                          hide_contact_form_when_linked:
                            type: boolean
                            example: false
                            description: >-
                              Não exibe o formulário de contato quando já
                              existir um contato vinculado ao projeto.
                          show_customer_form:
                            type: boolean
                            example: false
                            description: >-
                              Define se o formulário de cliente deve ser exibido
                              ao mover um projeto para essa etapa.
                          hide_customer_form_when_linked:
                            type: boolean
                            example: false
                            description: >-
                              Não exibe o formulário de cliente quando já
                              existir um cliente vinculado ao projeto.
                          sensation_amount:
                            type: integer
                            example: 50
                            description: Percentual de progresso da etapa.
                          help_text:
                            type: string
                            example: Texto de ajuda da etapa
                            description: >-
                              Texto de orientação exibido ao usuário nesta
                              etapa.
                          allow_execution:
                            type: boolean
                            example: true
                            description: >-
                              Define se é permitido executar projetos nesta
                              etapa.
                          checklists:
                            type: array
                            description: >-
                              Lista de checklists obrigatórias ou opcionais da
                              etapa.
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                  example: Checklist 1
                                  description: Nome da checklist.
                                info:
                                  type: string
                                  example: Texto informativo da checklist
                                  description: Descrição ou orientação da checklist.
                                required:
                                  type: boolean
                                  example: true
                                  description: Indica se a checklist é obrigatória.
                                order:
                                  type: integer
                                  example: 0
                                  description: >-
                                    Ordem de exibição da checklist dentro da
                                    etapa.
                              required:
                                - name
                                - required
                                - order
                          attachments:
                            type: array
                            description: Lista de anexos vinculados à etapa.
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                          restrictions:
                            type: array
                            description: Lista de restrições aplicadas à etapa.
                            items:
                              type: object
                          sort_config:
                            type: object
                            description: >-
                              Configuração de ordenação dos itens dentro da
                              etapa.
                          form:
                            type: object
                            description: Formulário associado à etapa.
                            properties:
                              id:
                                type: integer
                                example: 8
                              title:
                                type: string
                                example: Formulário para etapa
                        required:
                          - name
                    tags:
                      type: array
                      description: Lista de etiquetas disponíveis no funil.
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Nova etiqueta
                          color:
                            type: string
                            example: '#5e4ff8'
                            description: Cor da etiqueta em formato hexadecimal.
                          funnel_step_blockings:
                            type: array
                            description: >-
                              Lista de bloqueios de etapas associados à
                              etiqueta.
                            items:
                              type: object
                    dynamic_form:
                      type: object
                      description: Formulário dinâmico associado ao funil.
                    business_area:
                      type: object
                      description: Área de negócio vinculada ao funil.
                      properties:
                        id:
                          type: integer
                          example: 19
                        name:
                          type: string
                          example: Área de negócio
                        frame_id:
                          type: string
                          example: uuid-do-frame
                          format: uuid
                    allow_multi_step:
                      type: boolean
                      example: true
                      description: >-
                        Permite que um projeto esteja em múltiplas etapas
                        simultaneamente.
                    project_term:
                      type: object
                      description: Configuração dos termos de projeto por idioma.
                      properties:
                        key:
                          type: string
                          example: called
                          description: >-
                            Chave de identificação da configuração de termo.
                            Valores possíveis: custom, ticket, called, issue,
                            deal, opportunity, lead, task, service, case,
                            request, demand, order, process.
                        en:
                          type: object
                          properties:
                            project_term:
                              type: object
                              properties:
                                singular:
                                  type: string
                                  example: called
                                plural:
                                  type: string
                                  example: calls
                              required:
                                - singular
                                - plural
                        pt_br:
                          type: object
                          properties:
                            project_term:
                              type: object
                              properties:
                                singular:
                                  type: string
                                  example: chamado
                                plural:
                                  type: string
                                  example: chamados
                              required:
                                - singular
                                - plural
                    show_cost_info:
                      type: boolean
                      example: true
                      description: >-
                        Define se informações de custo devem ser exibidas no
                        funil.
                    form:
                      type: object
                      description: Formulário principal associado ao funil.
                      properties:
                        id:
                          type: integer
                          example: 7
                        title:
                          type: string
                          example: Formulário para funil
                    attachments:
                      type: array
                      description: Lista de anexos vinculados ao funil.
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 3
                    access:
                      type: array
                      description: Lista de usuários com acesso ao funil.
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                            example: Test User
                          avatar_url:
                            type: string
                          index_all:
                            type: boolean
                            description: Permissão para visualizar todos os projetos.
                          index_assigned:
                            type: boolean
                            description: >-
                              Permissão para visualizar apenas projetos
                              atribuídos.
                          index_created:
                            type: boolean
                            description: >-
                              Permissão para visualizar projetos criados pelo
                              usuário.
                    funnel_status:
                      type: array
                      description: Lista de status possíveis dentro do funil.
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Novo status
                          color:
                            type: string
                            example: '#b59ef6'
                          is_conclusive:
                            type: boolean
                            example: false
                            description: Indica se o status representa conclusão.
                          funnel_step_blockings:
                            type: array
                            items:
                              type: object
                    condition:
                      type: string
                      example: active
                      description: 'Condição do funil. Exemplo: active, inactive.'
                    allow_execution:
                      type: boolean
                      example: true
                      description: Define se o funil permite execução de projetos.
                    template_projects:
                      type: array
                      description: Lista de projetos modelo vinculados ao funil.
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                  required:
                    - name
                    - steps
                - {}
            example:
              id: null
              name: Nome do funil
              prefix: PREFIX
              steps:
                - name: Backlog
                  step_forward: null
                  step_backward: null
                  show_contact_form: false
                  hide_contact_form_when_linked: false
                  show_customer_form: false
                  hide_customer_form_when_linked: false
                  sensation_amount: 50
                  checklists:
                    - name: Checklist 1
                      info: Texto informativo da checklist
                      required: true
                      order: 0
                    - name: Checklist 2
                      info: ''
                      required: true
                      order: 1
                    - name: Checklist 3
                      info: ''
                      required: false
                      order: 2
                  attachments:
                    - id: 1
                    - id: 2
                  restrictions: []
                  sort_config: null
                  allow_execution: true
                  form:
                    id: 7
                    title: Formulário para funil
                  help_text: Texto de ajuda da etapa
                - name: Em andamento
                  step_forward: null
                  step_backward: null
                  show_contact_form: true
                  hide_contact_form_when_linked: false
                  show_customer_form: true
                  hide_customer_form_when_linked: false
                  sensation_amount: 0
                  checklists: []
                  attachments: []
                  restrictions: []
                  sort_config: null
                  allow_execution: true
                - name: Concluído
                  step_forward: null
                  step_backward: null
                  show_contact_form: false
                  hide_contact_form_when_linked: false
                  show_customer_form: false
                  hide_customer_form_when_linked: false
                  sensation_amount: 0
                  checklists: []
                  attachments: []
                  restrictions: []
                  sort_config: null
                  allow_execution: true
              tags:
                - name: Nova etiqueta 1
                  color: '#5e4ff8'
                  funnel_step_blockings: []
                - name: Nova etiqueta 2
                  color: '#7fd87d'
                  funnel_step_blockings: []
                - name: Nova etiqueta 3
                  color: '#5e4ff8'
                  funnel_step_blockings: []
              project_term:
                key: called
                en:
                  project_term:
                    singular: called
                    plural: calls
                pt_br:
                  project_term:
                    singular: chamado
                    plural: chamados
              dynamic_form: null
              business_area:
                id: 19
                name: Área de negócio
                frame_id: 019c75de-532c-7047-9563-daf1448ca963
              allow_multi_step: true
              show_cost_info: true
              form:
                id: 7
                title: Formulário para funil
              attachments:
                - id: 3
              access:
                - id: 019c75de-509e-711a-8933-175cb2514cc5
                  name: Test User
                  avatar_url: https://via.placeholder.com/124x124.png/00aa99?text=quas
                  index_all: false
                  index_assigned: true
                  index_created: false
                - id: 019c75de-50f0-7366-a948-b8cbdd1841be
                  name: Cotestr User
                  avatar_url: null
                  index_all: true
                  index_assigned: false
                  index_created: false
              funnel_status:
                - name: Novo status 1
                  color: '#b59ef6'
                  is_conclusive: false
                  funnel_step_blockings: []
                - name: Novo status 2
                  color: '#7fd87d'
                  is_conclusive: false
                  funnel_step_blockings: []
                - name: Novo status 3
                  color: '#b59ef6'
                  is_conclusive: false
                  funnel_step_blockings: []
              condition: active
              allow_execution: true
              template_projects:
                - id: 019c75de-7fcf-70af-b840-1340626e2764
      responses:
        '200':
          description: Funil criado com sucesso
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            Access-Control-Expose-Headers:
              schema:
                type: string
              example: '*'
            Cache-Control:
              schema:
                type: string
              example: no-cache, private
            X-Content-Type-Options:
              schema:
                type: string
              example: nosniff
            X-Frame-Options:
              schema:
                type: string
              example: SAMEORIGIN
            X-Ratelimit-Limit:
              schema:
                type: integer
              example: 160
            X-Ratelimit-Remaining:
              schema:
                type: integer
              example: 159
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: boolean
                  project_funnel:
                    type: object
                    properties:
                      order:
                        type: integer
                      name:
                        type: string
                      condition:
                        type: string
                      allow_multi_step:
                        type: boolean
                      show_cost_info:
                        type: boolean
                      frame_id:
                        type: string
                      allow_execution:
                        type: boolean
                      prefix:
                        type: string
                      form_id:
                        type: integer
                      updated_at:
                        type: string
                        format: date-time
                      created_at:
                        type: string
                        format: date-time
                      id:
                        type: integer
                      business_area_id:
                        type: integer
                      business_area:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          order:
                            type: integer
                          frame_id:
                            type: string
                      steps:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            project_funnel_id:
                              type: integer
                            sensation_amount:
                              type: integer
                            show_contact_form:
                              type: boolean
                            hide_contact_form_when_linked:
                              type: boolean
                            show_customer_form:
                              type: boolean
                            hide_customer_form_when_linked:
                              type: boolean
                            order:
                              type: integer
                            help_text:
                              type: string
                            form_id:
                              type: integer
                            allow_execution:
                              type: boolean
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                            checklists:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  info:
                                    type: string
                                  funnel_step_id:
                                    type: integer
                                  required:
                                    type: boolean
                                  order:
                                    type: integer
                            attachments:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  technical_name:
                                    type: string
                                  extension:
                                    type: string
                                  file_url:
                                    type: string
                                    format: uri
                                  popup_video:
                                    type: integer
                                  watch:
                                    type: boolean
                                  user_id:
                                    type: string
                                  frame_id:
                                    type: string
                                  created_at:
                                    type: string
                                    format: date-time
                                  updated_at:
                                    type: string
                                    format: date-time
                                  pivot:
                                    type: object
                                    properties:
                                      funnel_step_id:
                                        type: integer
                                      step_attachment_id:
                                        type: integer
                            form:
                              type: object
                              properties:
                                id:
                                  type: integer
                                title:
                                  type: string
                                frame_id:
                                  type: string
                                created_at:
                                  type: string
                                  format: date-time
                                updated_at:
                                  type: string
                                  format: date-time
                            restrictions:
                              type: array
                              items: {}
                      tags:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            color:
                              type: string
                            project_funnel_id:
                              type: integer
                      attachments:
                        type: array
                        items: {}
                      funnel_status:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            color:
                              type: string
                            project_funnel_id:
                              type: integer
                            is_conclusive:
                              type: boolean
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                  objects_above_limit:
                    type: array
                    items: {}
              example:
                response: true
                project_funnel:
                  order: 11
                  name: Nome do funil
                  condition: active
                  allow_multi_step: true
                  show_cost_info: true
                  frame_id: 019c75de-532c-7047-9563-daf1448ca963
                  allow_execution: true
                  prefix: PREFIX2
                  form_id: 7
                  updated_at: '2026-03-16T16:34:43.000000Z'
                  created_at: '2026-03-16T16:34:43.000000Z'
                  id: 54
                  business_area_id: 19
                  business_area:
                    id: 19
                    name: Área de negócio
                    order: 0
                    frame_id: 019c75de-532c-7047-9563-daf1448ca963
                    deleted_at: null
                  steps:
                    - id: 240
                      name: Backlog
                      project_funnel_id: 54
                      sensation_amount: 50
                      step_forward_id: null
                      step_backward_id: null
                      show_contact_form: false
                      hide_contact_form_when_linked: false
                      show_customer_form: false
                      hide_customer_form_when_linked: false
                      order: 1
                      help_text: Texto de ajuda da etapa
                      form_id: 7
                      sort_config: null
                      allow_execution: true
                      created_at: '2026-03-16T16:34:43.000000Z'
                      updated_at: '2026-03-16T16:34:43.000000Z'
                      deleted_at: null
                      checklists:
                        - id: 4
                          name: Checklist 1
                          info: Texto informativo da checklist
                          funnel_step_id: 240
                          required: true
                          order: 0
                        - id: 5
                          name: Checklist 2
                          info: null
                          funnel_step_id: 240
                          required: true
                          order: 1
                        - id: 6
                          name: Checklist 3
                          info: null
                          funnel_step_id: 240
                          required: false
                          order: 2
                      attachments:
                        - id: 1
                          name: Captura de tela de 2026-02-12 09-34-45.png
                          technical_name: ''
                          extension: png
                          file_url: >-
                            https://olie-main-dev.s3.amazonaws.com/app/frames/019c75de-532c-7047-9563-daf1448ca963/funnel_attachments/EUCnLFRPVhJkpyq6GKDcmXNgI2S1j9HWs0AZ-captura-de-tela-de-2026-02-12-09-34-45.png
                          popup_video: 0
                          watch: false
                          user_id: 019c75de-509e-711a-8933-175cb2514cc5
                          frame_id: 019c75de-532c-7047-9563-daf1448ca963
                          created_at: '2026-03-16T13:23:06.000000Z'
                          updated_at: '2026-03-16T13:23:06.000000Z'
                          deleted_at: null
                          pivot:
                            funnel_step_id: 240
                            step_attachment_id: 1
                        - id: 2
                          name: Link Vídeo
                          technical_name: link_technical_name
                          extension: link
                          file_url: https://youtu.be/JOopR4MKbhI?si=HNIGI1bcPNXUuTVy
                          popup_video: 1
                          watch: true
                          user_id: 019c75de-509e-711a-8933-175cb2514cc5
                          frame_id: 019c75de-532c-7047-9563-daf1448ca963
                          created_at: '2026-03-16T13:24:05.000000Z'
                          updated_at: '2026-03-16T13:25:13.000000Z'
                          deleted_at: null
                          pivot:
                            funnel_step_id: 240
                            step_attachment_id: 2
                      form:
                        id: 7
                        title: Formulário para funil
                        frame_id: 019c75de-532c-7047-9563-daf1448ca963
                        created_at: '2026-03-16T13:12:12.000000Z'
                        updated_at: '2026-03-16T13:12:12.000000Z'
                        deleted_at: null
                      restrictions: []
                    - id: 241
                      name: Em andamento
                      project_funnel_id: 54
                      sensation_amount: 0
                      step_forward_id: null
                      step_backward_id: null
                      show_contact_form: false
                      hide_contact_form_when_linked: false
                      show_customer_form: false
                      hide_customer_form_when_linked: false
                      order: 2
                      help_text: null
                      form_id: null
                      sort_config: null
                      allow_execution: true
                      created_at: '2026-03-16T16:34:43.000000Z'
                      updated_at: '2026-03-16T16:34:43.000000Z'
                      deleted_at: null
                      checklists: []
                      attachments: []
                      form: null
                      restrictions: []
                    - id: 242
                      name: Concluído
                      project_funnel_id: 54
                      sensation_amount: 0
                      step_forward_id: null
                      step_backward_id: null
                      show_contact_form: false
                      hide_contact_form_when_linked: false
                      show_customer_form: false
                      hide_customer_form_when_linked: false
                      order: 3
                      help_text: null
                      form_id: null
                      sort_config: null
                      allow_execution: true
                      created_at: '2026-03-16T16:34:43.000000Z'
                      updated_at: '2026-03-16T16:34:43.000000Z'
                      deleted_at: null
                      checklists: []
                      attachments: []
                      form: null
                      restrictions: []
                  tags:
                    - id: 6
                      name: Nova etiqueta 1
                      color: '#5e4ff8'
                      project_funnel_id: 54
                      deleted_at: null
                    - id: 7
                      name: Nova etiqueta 2
                      color: '#7fd87d'
                      project_funnel_id: 54
                      deleted_at: null
                    - id: 8
                      name: Nova etiqueta 3
                      color: '#5e4ff8'
                      project_funnel_id: 54
                      deleted_at: null
                  attachments: []
                  funnel_status:
                    - id: 6
                      name: Novo status 1
                      color: '#b59ef6'
                      project_funnel_id: 54
                      is_conclusive: false
                      created_at: '2026-03-16T16:34:43.000000Z'
                      updated_at: '2026-03-16T16:34:43.000000Z'
                      deleted_at: null
                    - id: 7
                      name: Novo status 2
                      color: '#7fd87d'
                      project_funnel_id: 54
                      is_conclusive: false
                      created_at: '2026-03-16T16:34:43.000000Z'
                      updated_at: '2026-03-16T16:34:43.000000Z'
                      deleted_at: null
                    - id: 8
                      name: Novo status 3
                      color: '#b59ef6'
                      project_funnel_id: 54
                      is_conclusive: false
                      created_at: '2026-03-16T16:34:43.000000Z'
                      updated_at: '2026-03-16T16:34:43.000000Z'
                      deleted_at: null
                objects_above_limit: []
        '401':
          description: Não autorizado
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            Access-Control-Expose-Headers:
              schema:
                type: string
              example: '*'
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: boolean
                  message:
                    type: string
                  error:
                    type: string
              example:
                response: false
                message: unauthorized
                error: Unauthenticated.
        '422':
          description: Campos obrigatórios
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            Access-Control-Expose-Headers:
              schema:
                type: string
              example: '*'
            X-Frame-Options:
              schema:
                type: string
              example: SAMEORIGIN
            X-Ratelimit-Limit:
              schema:
                type: integer
              example: 160
            X-Ratelimit-Remaining:
              schema:
                type: integer
              example: 159
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: boolean
                  message:
                    type: string
                  error:
                    type: string
                  validation:
                    type: object
                    properties:
                      name:
                        type: array
                        items:
                          type: string
              example:
                response: false
                message: validation_errors
                error: O campo nome é obrigatório.
                validation:
                  name:
                    - O campo nome é obrigatório.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````