{ "openapi": "3.0.0", "info": { "title": "Olie API", "version": "1.0.0", "description": "# Introdução 👋\n\nOlá! 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.\n\nPara 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.\n\nNo 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.\n" }, "servers": [ { "url": "https://api.olie.ai" } ], "paths": { "/api/management/projects/{id}/restore": { "get": { "summary": "Restaurar um projeto", "responses": { "200": { "description": "Resposta de sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": true } } }, "example": { "response": "" } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "unauthorized" }, "error": { "type": "string", "example": "Unauthenticated." } } }, "example": { "response": "", "message": "", "error": "" } } } }, "404": { "description": "Não encontrado" } }, "tags": [ "projects", "{id}", "restore" ], "description": "Restaura um projeto que foi deletado." }, "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID do projeto", "schema": { "type": "string", "format": "uuid" }, "example": "1ae02989-bd9d-6132-9018-c66ff2a9b41d" } ] }, "/api/management/projects/{id}/media": { "get": { "summary": "Listar conteúdos do projeto", "parameters": [ { "name": "page", "in": "query", "description": "Número da página a ser retornada. Começa em 1", "schema": { "type": "integer" }, "example": 1 }, { "name": "perPage", "in": "query", "description": "Quantidade de itens exibidos por página. Define o tamanho da página de resultados", "schema": { "type": "integer" }, "example": 30 }, { "name": "filter", "in": "query", "description": "Filtro aplicado ao resultado. Valores possíveis: logs, content, default.", "schema": { "type": "string" }, "example": "default" } ], "responses": { "200": { "description": "Lista de conteúdos do projeto retornada com sucesso", "content": { "application/json": { "schema": { "description": "Esquema de um conteúdo", "title": "Resposta de conteúdo", "type": "object", "properties": { "response": { "type": "boolean", "example": true }, "meta": { "type": "object", "title": "Informações de Paginação", "description": "Metadados de paginação", "properties": { "current_page": { "type": "integer", "example": 1 }, "from": { "type": "integer", "example": 1 }, "last_page": { "type": "integer", "example": 19 }, "per_page": { "type": "integer", "example": 30 }, "to": { "type": "integer", "example": 30 }, "total": { "type": "integer", "example": 546 } } }, "medias": { "type": "array", "items": { "title": "Media", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "technical_name": { "type": "string" }, "type": { "type": "integer" }, "extension": { "type": "string" }, "text": { "type": "string" }, "file_url": { "type": "string", "format": "uri" }, "log": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" }, "frame_id": { "type": "string", "format": "uuid" }, "project_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "user": { "type": "object" } } } } } }, "example": { "response": "", "meta": { "current_page": "", "from": "", "last_page": "", "per_page": "", "to": "", "total": "" }, "medias": [ { "id": "", "name": "", "technical_name": "", "type": "", "extension": "", "text": "", "file_url": "", "log": "", "user_id": "", "frame_id": "", "project_id": "", "created_at": "", "updated_at": "", "deleted_at": "", "user": {} }, { "id": "", "name": "", "technical_name": "", "type": "", "extension": "", "text": "", "file_url": "", "log": "", "user_id": "", "frame_id": "", "project_id": "", "created_at": "", "updated_at": "", "deleted_at": "", "user": {} } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "unauthorized" }, "error": { "type": "string", "example": "Unauthenticated." } } }, "example": { "response": "", "message": "", "error": "" } } } } }, "tags": [ "projects", "{id}", "medias" ], "description": "Retorna uma lista de conteúdos do projeto com base nos filtros fornecidos." }, "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID do projeto", "schema": { "type": "string", "format": "uuid" }, "example": "78886ebc-716d-e628-c18d-da3f5bddb068" } ], "post": { "summary": "Listar conteúdos do projeto", "parameters": [ { "name": "page", "in": "query", "description": "Número da página a ser retornada. Começa em 1", "schema": { "type": "integer" }, "example": 1 }, { "name": "perPage", "in": "query", "description": "Quantidade de itens exibidos por página. Define o tamanho da página de resultados", "schema": { "type": "integer" }, "example": 30 }, { "name": "filter", "in": "query", "required": true, "description": "Filtro aplicado ao resultado. Valores possíveis: logs, content, default.", "deprecated": false, "schema": { "type": "string" }, "example": "default" } ], "responses": { "200": { "description": "Lista de conteúdos do projeto retornada com sucesso", "content": { "application/json": { "schema": { "description": "Esquema de um conteúdo", "title": "Resposta de conteúdo", "type": "object", "properties": { "response": { "type": "boolean", "example": true }, "meta": { "type": "object", "title": "Informações de Paginação", "description": "Metadados de paginação", "properties": { "current_page": { "type": "integer", "example": 1 }, "from": { "type": "integer", "example": 1 }, "last_page": { "type": "integer", "example": 19 }, "per_page": { "type": "integer", "example": 30 }, "to": { "type": "integer", "example": 30 }, "total": { "type": "integer", "example": 546 } } }, "medias": { "type": "array", "items": { "title": "Media", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "technical_name": { "type": "string" }, "type": { "type": "integer" }, "extension": { "type": "string" }, "text": { "type": "string" }, "file_url": { "type": "string", "format": "uri" }, "log": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" }, "frame_id": { "type": "string", "format": "uuid" }, "project_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "user": { "type": "object" } } } } } }, "example": { "response": "", "meta": { "current_page": "", "from": "", "last_page": "", "per_page": "", "to": "", "total": "" }, "medias": [ { "id": "", "name": "", "technical_name": "", "type": "", "extension": "", "text": "", "file_url": "", "log": "", "user_id": "", "frame_id": "", "project_id": "", "created_at": "", "updated_at": "", "deleted_at": "", "user": {} }, { "id": "", "name": "", "technical_name": "", "type": "", "extension": "", "text": "", "file_url": "", "log": "", "user_id": "", "frame_id": "", "project_id": "", "created_at": "", "updated_at": "", "deleted_at": "", "user": {} } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "unauthorized" }, "error": { "type": "string", "example": "Unauthenticated." } } }, "example": { "response": "", "message": "", "error": "" } } } } }, "tags": [ "projects", "{id}", "medias" ], "description": "Retorna uma lista de conteúdos do projeto com base nos filtros fornecidos." } }, "/api/management/projects/{project}/step-metrics": { "get": { "tags": [ "projects", "{id}", "step-metrics" ], "summary": "Obter métricas computadas das etapas de um projeto específico no funil", "description": "Obter métricas computadas das etapas de um projeto específico no funil", "operationId": "obterMTricasComputadasDasEtapasDeUmProjetoEspecFicoNoFunil", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "metrics": { "type": "array", "items": { "type": "object", "properties": { "step_id": { "type": "integer", "description": "ID da etapa do funil" }, "max_time": { "type": "object", "properties": { "value": { "type": "integer", "description": "Tempo total que o projeto passou na etapa" }, "unit": { "type": "string", "enum": [ "seconds" ], "description": "Unidade de medida do tempo" }, "meta_data": { "type": "object", "description": "Metadados adicionais da métrica" } }, "required": [ "value", "unit", "meta_data" ] } }, "required": [ "step_id", "max_time" ] } } }, "required": [ "response", "metrics" ] }, "example": { "response": true, "metrics": [ { "step_id": 123, "max_time": { "value": 0, "unit": "seconds", "meta_data": null } }, { "step_id": 124, "max_time": { "value": 0, "unit": "seconds", "meta_data": null } }, { "step_id": 125, "max_time": { "value": 0, "unit": "seconds", "meta_data": null } }, { "step_id": 126, "max_time": { "value": 0, "unit": "seconds", "meta_data": null } }, { "step_id": 127, "max_time": { "value": 0, "unit": "seconds", "meta_data": null } }, { "step_id": 128, "max_time": { "value": 0, "unit": "seconds", "meta_data": null } }, { "step_id": 129, "max_time": { "value": 0, "unit": "seconds", "meta_data": null } }, { "step_id": 130, "max_time": { "value": 0, "unit": "seconds", "meta_data": null } } ] } } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/files": { "get": { "tags": [ "projects", "{id}", "files" ], "summary": "Listar todos os arquivos associados a um projeto", "description": "Retorna todos os arquivos associados a um projeto específico.", "operationId": "listarTodosOsArquivosAssociadosAUmProjeto", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/projects/{project}/clone": { "post": { "tags": [ "projects", "{id}", "clone" ], "summary": "Clonar um projeto", "description": "Cria uma cópia de um projeto existente. Permite configurar quais elementos serão clonados (funis, tags, checklists, respostas de formulários, mídias, fórum, grupos, atribuições, etc.).", "operationId": "clonarUmProjeto", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/projects/{project}/share": { "post": { "tags": [ "projects", "{id}", "share" ], "summary": "Compartilhar um projeto", "description": "Configura ou atualiza as opções de compartilhamento de um projeto, incluindo geração de token de compartilhamento e configurações de acesso.", "operationId": "compartilharProjeto", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/projects/{project}/hierarchy/children": { "get": { "tags": [ "projects", "{id}", "hierarchy" ], "summary": "Listar todos os projetos filhos de um projeto", "description": "Retorna todos os projetos filhos de um projeto específico, incluindo informações sobre o projeto pai. Suporta filtros para projetos excluídos e templates.", "operationId": "listarTodosOsProjetosFilhosDeUmProjeto", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/tree": { "get": { "tags": [ "projects", "{id}", "hierarchy" ], "summary": "Listar a árvore completa da hierarquia de um projeto", "description": "Retorna a árvore completa de hierarquia de um projeto, incluindo todos os descendentes, estatísticas da hierarquia e breadcrumb do projeto atual.", "operationId": "listarARvoreCompletaDeHierarquiaDeUmProjeto", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/stats": { "get": { "tags": [ "projects", "{id}", "hierarchy" ], "summary": "Listar estatísticas da hierarquia de um projeto", "description": "Retorna estatísticas detalhadas da hierarquia de um projeto, incluindo contagem de irmãos, ancestrais e informações sobre a estrutura hierárquica.", "operationId": "listarEstatSticasDaHierarquiaDeUmProjeto", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/analytics": { "get": { "tags": [ "projects", "{id}", "hierarchy" ], "summary": "Listar análises agregadas de todos os projetos descendentes", "description": "Retorna análises agregadas de todos os projetos descendentes.", "operationId": "listarAnLisesAgregadasDeTodosOsProjetosDescendentes", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/attach-child": { "post": { "tags": [ "projects", "{id}", "hierarchy" ], "summary": "Vincular um projeto como filho de outro projeto", "description": "Vincula um projeto como filho de outro projeto, criando uma relação de hierarquia pai-filho.", "operationId": "vincularProjetoComoFilhoDeOutroProjeto", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID do projeto que será pai", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/detach-child/{child}": { "delete": { "tags": [ "projects", "{id}", "hierarchy" ], "summary": "Remover a relação de hierarquia entre um projeto pai e seu projeto filho", "description": "Remove a relação de hierarquia entre um projeto pai e seu projeto filho, promovendo o filho para o nível raiz.", "operationId": "removerARelaODeHierarquiaEntreUmProjetoPaiESeuProjetoFilho", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{project_id}}" }, { "name": "child", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{child_project_Id}}" } ] }, "/api/management/projects/{project}/hierarchy/move-to-parent": { "put": { "tags": [ "projects", "{id}" ], "summary": "Mover um projeto para ser filho de outro projeto", "description": "Move um projeto para ser filho de outro projeto, alterando sua posição na hierarquia.", "operationId": "moverUmProjetoParaSerFilhoDeOutroProjeto", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/projects/{project}/hierarchy/promote-to-root": { "put": { "tags": [ "projects", "{id}", "hierarchy" ], "summary": "Remover um projeto de sua hierarquia atual", "description": "Remove um projeto de sua hierarquia atual, promovendo-o para o nível raiz (sem projeto pai).", "operationId": "removerUmProjetoDeSuaHierarquiaAtual", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/loose-checklist": { "get": { "tags": [ "projects", "{id}", "loose-checklist" ], "summary": "Listar checklists avulsos do projeto", "description": "Lista os checklists avulsos do projeto, ordenados pela posição do item. Cada item já inclui o responsável atribuído e o usuário que marcou como concluído (quando houver).", "operationId": "listarTodosOsChecklistsAvulsosAssociadosAUmProjeto", "responses": { "200": { "description": "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" }, "Content-Encoding": { "schema": { "type": "string" }, "example": "gzip" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 14 May 2026 19:40:20 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Server": { "schema": { "type": "string" }, "example": "nginx" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "Vary": { "schema": { "type": "string" }, "example": "Accept-Encoding" }, "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": 158 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "loose_checklists": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "project_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "order": { "type": "integer" } } } } } }, "example": { "response": true, "loose_checklists": [ { "id": "019e27ab-5064-71f9-aed4-78e0728a42d0", "name": "Fazer deploy", "completed_at": null, "author_id": null, "checked_by_id": null, "project_id": "019e27a5-d444-713b-ac3c-50c01d4ebbab", "created_at": "2026-05-14T18:06:39.000000Z", "updated_at": "2026-05-14T19:04:43.000000Z", "order": 0, "checked_by": null, "author": null }, { "id": "019e27a9-2b1b-7095-955a-3b0cc8bdabeb", "name": "Limpar o estoque", "completed_at": null, "author_id": null, "checked_by_id": null, "project_id": "019e27a5-d444-713b-ac3c-50c01d4ebbab", "created_at": "2026-05-14T18:04:18.000000Z", "updated_at": "2026-05-14T19:04:43.000000Z", "order": 1, "checked_by": null, "author": null } ] } } } } }, "parameters": [ { "name": "Authorization", "in": "header", "description": "Sanctum Personal Access Token do tenant", "schema": { "type": "string" }, "example": "Bearer {{token}}" } ] }, "post": { "tags": [ "projects", "{id}", "loose-checklist" ], "summary": "Criar checklist avulso no projeto", "description": "Cria um novo item de checklist avulso no projeto. O item entra no fim da lista — a posição é atribuída automaticamente pelo servidor.", "operationId": "criarUmNovoItemDeChecklistAvulsoParaUmProjeto", "responses": { "200": { "description": "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" }, "Content-Encoding": { "schema": { "type": "string" }, "example": "gzip" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 14 May 2026 18:04:18 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Server": { "schema": { "type": "string" }, "example": "nginx" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "Vary": { "schema": { "type": "string" }, "example": "Accept-Encoding" }, "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": 158 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } } }, "parameters": [ { "name": "Authorization", "in": "header", "schema": { "type": "string" }, "example": "Bearer {{token}}" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255, "description": "Texto do checklist. Não aceita HTML." }, "author_id": { "type": "string", "description": "UUID do responsável atribuído ao item (assignee). Aceita apenas usuários do mesmo tenant.", "format": "uuid" }, "checked_by_id": { "type": "string", "description": "UUID do usuário que marcou como concluído. Aceita apenas usuários do mesmo tenant.", "format": "uuid" } }, "required": [ "name" ] }, "example": { "name": "", "author_id": null, "checked_by_id": null } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/loose-checklist/{loose_checklist}": { "put": { "tags": [ "projects", "{id}", "loose-checklist" ], "summary": "Atualizar checklist avulso", "description": "Atualiza um item de checklist avulso. Todos os campos do body são opcionais — envie apenas o que deve mudar.\n\nAtribuir um novo responsável (`author_id`) notifica o usuário escolhido. Alterar `order` reposiciona o item na lista; os itens vizinhos são deslocados automaticamente.", "operationId": "atualizarUmItemDeChecklistAvulso", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } } }, "parameters": [ { "name": "Authorization", "in": "header", "schema": { "type": "string" }, "example": "Bearer {{token}}" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255, "description": "Renomeia o item. Não aceita HTML." }, "completed_at": { "type": "string", "description": "Timestamp ISO 8601 para marcar como concluído. null desmarca.", "format": "date-time" }, "author_id": { "type": "string", "description": "UUID do responsável atribuído ao item (assignee). Aceita apenas usuários do mesmo tenant. null remove o responsável.", "format": "uuid" }, "checked_by_id": { "type": "string", "description": "UUID do usuário que marcou como concluído. Aceita apenas usuários do mesmo tenant. Geralmente enviado junto com completed_at.", "format": "uuid" }, "order": { "type": "integer", "minimum": 0, "description": "Nova posição do item na lista (zero-based). Os demais itens são deslocados automaticamente." } } }, "example": { "name": "", "completed_at": null, "author_id": null, "checked_by_id": null, "order": 0 } } } } }, "delete": { "tags": [ "projects", "{id}", "loose-checklist" ], "summary": "Remover checklist avulso do projeto", "description": "Remove um item de checklist avulso do projeto. Os itens posteriores na lista têm sua ordem ajustada automaticamente.", "operationId": "removerUmItemDeChecklistAvulsoDeUmProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } } }, "parameters": [ { "name": "Authorization", "in": "header", "schema": { "type": "string" }, "example": "Bearer {{token}}" } ] }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{project_id}}" }, { "name": "loose_checklist", "in": "path", "required": true, "schema": { "type": "string" }, "example": "" } ] }, "/api/management/projects/{project}/loose-forms": { "get": { "tags": [ "projects", "{id}", "loose-forms" ], "summary": "Listar formulários avulsos associados a um projeto", "description": "Retorna todos os formulários avulsos associados a um projeto específico, incluindo informações do formulário relacionado.", "operationId": "listarFormulRiosAvulsosAssociadosAUmProjeto", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "projects", "{id}", "loose-forms" ], "summary": "Vincular um formulário avulso a um projeto", "description": "Vincular um formulário avulso a um projeto", "operationId": "vinculaUmFormulRioAvulsoAUmProjeto", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/projects/{project}/loose-forms/{loose_form}": { "delete": { "tags": [ "projects", "{id}", "loose-forms" ], "summary": "Desvincular um formulário avulso de um projeto", "description": "Desvincular um formulário avulso de um projeto", "operationId": "desvinculaUmFormulRioAvulsoDeUmProjeto", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" }, { "name": "loose_form", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/projects/{id}": { "get": { "summary": "Obter um projeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "description": "Indica que a requisição foi processada com sucesso." }, "project": { "type": "object", "properties": { "id": { "type": "string", "description": "Identificador do projeto.", "format": "uuid" }, "parent_id": { "type": "string", "description": "ID do projeto pai na hierarquia.", "format": "uuid" }, "old_id": { "type": "string", "description": "Identificador legado, preservado em migrações." }, "code": { "type": "string", "description": "Código curto do projeto (prefixo do funil + número sequencial)." }, "name": { "type": "string" }, "description": { "type": "string" }, "impact": { "type": "integer", "minimum": 0, "maximum": 10, "description": "Impacto declarado do projeto." }, "frame_id": { "type": "string", "description": "ID da empresa (frame) dona do projeto.", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "customer_id": { "type": "string", "format": "uuid" }, "contact_id": { "type": "string", "format": "uuid" }, "share_token": { "type": "string", "description": "Token público para compartilhamento externo." }, "share_settings": { "type": "object" }, "merged_id": { "type": "string", "description": "ID do projeto em que este foi mesclado.", "format": "uuid" }, "status": { "type": "integer", "enum": [ 1, 2, 3, 4 ], "description": "1=Em andamento, 2=Concluído, 3=Arquivado, 4=Pausado." }, "budget": { "type": "number", "description": "Orçamento do projeto." }, "is_template": { "type": "boolean" }, "created_by": { "type": "string", "description": "ID do usuário que criou o projeto.", "format": "uuid" }, "deleted_at": { "type": "string", "format": "date-time" }, "children_count": { "type": "integer", "minimum": 0, "description": "Quantidade de projetos filhos diretos." }, "form": { "type": "object", "description": "Formulário dinâmico hidratado, quando aplicável." }, "executors": { "type": "array", "description": "Usuários executores envolvidos nas tarefas e seus custos.", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "user": { "type": "string", "description": "Nome do executor." }, "hourly_rate": { "type": "number", "description": "Valor-hora declarado no vínculo do usuário com o frame." }, "elapsed": { "type": "integer", "minimum": 0, "description": "Tempo realizado, em segundos." }, "elapsed_amount": { "type": "number", "description": "Custo realizado." }, "expected": { "type": "integer", "minimum": 0, "description": "Tempo previsto, em segundos." }, "expected_amount": { "type": "number", "description": "Custo previsto." } }, "required": [ "id", "user", "hourly_rate", "elapsed", "elapsed_amount", "expected", "expected_amount" ] } }, "customer": { "type": "object", "description": "Cliente vinculado, com os campos do recurso Customer." }, "contact": { "type": "object", "description": "Contato vinculado, com os campos do recurso Contact." }, "funnels": { "type": "array", "description": "Funis em que o projeto está cadastrado, incluindo todas as etapas, etiquetas, status e anexos do funil.", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "prefix": { "type": "string", "description": "Prefixo usado para gerar o código dos projetos." }, "order": { "type": "integer" }, "condition": { "type": "string", "enum": [ "active", "inactive" ] }, "allow_multi_step": { "type": "boolean" }, "show_cost_info": { "type": "boolean" }, "business_area_id": { "type": "integer" }, "form_id": { "type": "integer" }, "frame_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "funnel_config_template_id": { "type": "integer" }, "allow_execution": { "type": "boolean" }, "project_term": { "type": "integer" }, "pivot": { "type": "object", "properties": { "project_id": { "type": "string", "format": "uuid" }, "project_funnel_id": { "type": "integer" }, "id": { "type": "integer" }, "statuses_at": { "type": "string", "format": "date-time" }, "statuses_by": { "type": "string", "format": "uuid" }, "funnel_status_id": { "type": "integer" }, "forecast_date": { "type": "string", "format": "date-time" }, "realized_forecast_date": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "forecast_date_update_count": { "type": "integer", "minimum": 0 } }, "required": [ "project_id", "project_funnel_id", "id", "created_at", "forecast_date_update_count" ] }, "steps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "sensation_amount": { "type": "integer" }, "step_forward_id": { "type": "integer" }, "step_backward_id": { "type": "integer" }, "order": { "type": "integer" }, "help_text": { "type": "string" }, "form_id": { "type": "integer" }, "sort_config": { "type": "object" }, "allow_execution": { "type": "boolean" }, "show_customer_form": { "type": "boolean" }, "show_contact_form": { "type": "boolean" }, "hide_customer_form_when_linked": { "type": "boolean" }, "hide_contact_form_when_linked": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "checklists": { "type": "array", "items": { "type": "object" } }, "attachments": { "type": "array", "items": { "type": "object" } }, "form": { "type": "object" } }, "required": [ "id", "name", "project_funnel_id", "order" ] } }, "form": { "type": "object" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "color": { "type": "string", "description": "Cor em hex (ex.: #ff8d92)." }, "project_funnel_id": { "type": "integer" }, "deleted_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "color", "project_funnel_id" ] } }, "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" }, "deleted_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "color", "project_funnel_id", "is_conclusive" ] } }, "attachments": { "type": "array", "items": { "type": "object" } } }, "required": [ "id", "name", "prefix", "condition", "frame_id", "pivot", "steps", "tags", "funnel_status", "attachments" ] } }, "project_checklists": { "type": "array", "description": "Itens de checklist avulsos vinculados ao projeto.", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "completed_at": { "type": "string", "format": "date-time" }, "author_id": { "type": "string", "description": "Usuário responsável pelo item.", "format": "uuid" }, "checked_by_id": { "type": "string", "description": "Usuário que marcou o item como concluído.", "format": "uuid" }, "project_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "order": { "type": "integer", "minimum": 0 } }, "required": [ "id", "name", "project_id", "order", "created_at", "updated_at" ] } }, "funnel_steps": { "type": "array", "description": "Etapas atualmente ocupadas pelo projeto, com bloqueios herdados da etapa.", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "sensation_amount": { "type": "integer" }, "step_forward_id": { "type": "integer" }, "step_backward_id": { "type": "integer" }, "order": { "type": "integer" }, "help_text": { "type": "string" }, "form_id": { "type": "integer" }, "sort_config": { "type": "object" }, "allow_execution": { "type": "boolean" }, "show_customer_form": { "type": "boolean" }, "show_contact_form": { "type": "boolean" }, "hide_customer_form_when_linked": { "type": "boolean" }, "hide_contact_form_when_linked": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "pivot": { "type": "object", "properties": { "project_id": { "type": "string", "format": "uuid" }, "funnel_step_id": { "type": "integer" }, "id": { "type": "integer" }, "order": { "type": "integer", "minimum": 0 }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "project_id", "funnel_step_id", "id", "order", "created_at" ] }, "funnel_step_blockings": { "type": "array", "items": { "type": "object" } } }, "required": [ "id", "name", "project_funnel_id", "pivot", "funnel_step_blockings" ] } }, "step_form": { "type": "array", "description": "Formulários respondidos por etapa do funil.", "items": { "type": "object" } }, "checklists": { "type": "array", "description": "Checklists das etapas (não confundir com project_checklists).", "items": { "type": "object" } }, "tags": { "type": "array", "description": "Etiquetas atribuídas ao projeto (sempre originárias de um funil).", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "color": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "deleted_at": { "type": "string", "format": "date-time" }, "pivot": { "type": "object", "properties": { "project_id": { "type": "string", "format": "uuid" }, "funnel_tag_id": { "type": "integer" }, "id": { "type": "integer" } }, "required": [ "project_id", "funnel_tag_id", "id" ] } }, "required": [ "id", "name", "color", "project_funnel_id", "pivot" ] } }, "merged_project": { "type": "object", "description": "Projeto resultante de uma fusão (apenas referência mínima).", "properties": { "id": { "type": "string", "format": "uuid" }, "code": { "type": "string" }, "name": { "type": "string" } } }, "loose_forms": { "type": "array", "description": "Formulários avulsos respondidos no projeto.", "items": { "type": "object" } }, "forum": { "type": "object", "description": "Forum dedicado do projeto, quando habilitado." }, "groups": { "type": "array", "description": "Grupos aos quais o projeto pertence.", "items": { "type": "object" } }, "users": { "type": "array", "description": "Membros do projeto. O pivot informa a função (creator, leader, member etc.).", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "avatar_url": { "type": "string", "format": "uri" }, "pivot": { "type": "object", "properties": { "project_id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "format": "uuid" }, "role": { "type": "string", "description": "Função do usuário no projeto (creator, leader, member, ...)." }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "project_id", "user_id", "role" ] } }, "required": [ "id", "name", "pivot" ] } }, "children": { "type": "array", "description": "Projetos filhos diretos na hierarquia (referências resumidas).", "items": { "type": "object" } }, "parent": { "type": "object", "description": "Projeto pai na hierarquia, quando houver." }, "frame": { "type": "object", "description": "Empresa (tenant) dona do projeto.", "properties": { "id": { "type": "string", "format": "uuid" }, "old_id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string", "description": "Tipo de frame (\"1\"=Personal, \"2\"=Company, etc.)." }, "read_only_until": { "type": "string", "description": "Frame em modo somente-leitura até esta data, quando preenchido.", "format": "date-time" }, "status": { "type": "integer", "description": "1=ativo, 0=inativo." }, "subdomain": { "type": "string" }, "frame_billing_data_id": { "type": "string", "format": "uuid" }, "model_forms": { "type": "object" }, "logo_img": { "type": "string", "description": "URL/caminho do logo." }, "cockpit_access": { "type": "integer", "enum": [ 0, 1 ], "description": "Indica se o frame possui acesso ao cockpit." } }, "required": [ "id", "name", "type", "status", "subdomain" ] } }, "required": [ "id", "code", "name", "impact", "frame_id", "status", "budget", "is_template", "created_at", "updated_at", "children_count", "executors", "funnels", "project_checklists", "funnel_steps", "step_form", "checklists", "tags", "loose_forms", "groups", "users", "children", "frame" ] } }, "required": [ "response", "project" ] }, "example": { "response": true, "project": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "parent_id": null, "old_id": null, "code": "TS-4", "name": "Aprovar layout final", "description": "Aprovação do layout antes do envio à gráfica.", "impact": 8, "frame_id": "019def40-4c60-726c-b30f-1ecf669b009a", "created_at": "2026-05-09T22:28:57.000000Z", "updated_at": "2026-05-09T22:28:59.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 1500, "is_template": false, "created_by": "019def40-491f-70cd-9d0a-91b43fa4f10e", "deleted_at": null, "children_count": 0, "form": null, "executors": [ { "id": "019def40-491f-70cd-9d0a-91b43fa4f10e", "user": "Test User", "hourly_rate": 50, "elapsed": 0, "elapsed_amount": 0, "expected": 28800, "expected_amount": 400 } ], "customer": null, "contact": null, "funnels": [ { "id": 35, "name": "Aprovação de Criativos", "prefix": "TS", "order": 2, "condition": "active", "allow_multi_step": false, "show_cost_info": true, "business_area_id": null, "form_id": null, "frame_id": "019def40-4c60-726c-b30f-1ecf669b009a", "created_at": "2026-05-09T22:10:27.000000Z", "updated_at": "2026-05-09T22:10:27.000000Z", "deleted_at": null, "funnel_config_template_id": null, "allow_execution": true, "project_term": null, "pivot": { "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "project_funnel_id": 35, "id": 301, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": "2026-05-09T22:28:57.000000Z", "forecast_date_update_count": 0 }, "steps": [ { "id": 131, "name": "Briefing", "project_funnel_id": 35, "sensation_amount": 0, "step_forward_id": null, "step_backward_id": null, "order": 1, "help_text": null, "form_id": null, "sort_config": null, "allow_execution": true, "show_customer_form": false, "show_contact_form": false, "hide_customer_form_when_linked": false, "hide_contact_form_when_linked": false, "created_at": "2026-05-09T22:10:27.000000Z", "updated_at": "2026-05-09T22:10:27.000000Z", "deleted_at": null, "checklists": [], "attachments": [], "form": null }, { "id": 133, "name": "Revisão", "project_funnel_id": 35, "sensation_amount": 0, "step_forward_id": null, "step_backward_id": null, "order": 2, "help_text": null, "form_id": null, "sort_config": null, "allow_execution": true, "show_customer_form": false, "show_contact_form": false, "hide_customer_form_when_linked": false, "hide_contact_form_when_linked": false, "created_at": "2026-05-09T22:10:27.000000Z", "updated_at": "2026-05-11T17:29:32.000000Z", "deleted_at": null, "checklists": [], "attachments": [], "form": null } ], "form": null, "tags": [ { "id": 1, "name": "Urgente", "color": "#ff8d92", "project_funnel_id": 35, "deleted_at": null } ], "funnel_status": [ { "id": 1, "name": "Concluído", "color": "#7fd87d", "project_funnel_id": 35, "is_conclusive": true, "created_at": "2026-05-09T22:10:27.000000Z", "updated_at": "2026-05-09T22:10:27.000000Z", "deleted_at": null }, { "id": 2, "name": "Em andamento", "color": "#ffe66a", "project_funnel_id": 35, "is_conclusive": false, "created_at": "2026-05-09T22:10:27.000000Z", "updated_at": "2026-05-09T22:10:27.000000Z", "deleted_at": null } ], "attachments": [] } ], "project_checklists": [ { "id": "019e27a9-2b1b-7095-955a-3b0cc8bdabeb", "name": "Limpar o estoque", "completed_at": null, "author_id": "019def40-491f-70cd-9d0a-91b43fa4f10e", "checked_by_id": null, "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "created_at": "2026-05-14T18:04:18.000000Z", "updated_at": "2026-05-14T19:04:43.000000Z", "order": 0 }, { "id": "019e27ab-5064-71f9-aed4-78e0728a42d0", "name": "Fazer deploy", "completed_at": "2026-05-14T19:00:00.000000Z", "author_id": "019def40-491f-70cd-9d0a-91b43fa4f10e", "checked_by_id": "019def40-491f-70cd-9d0a-91b43fa4f10e", "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "created_at": "2026-05-14T18:06:39.000000Z", "updated_at": "2026-05-14T19:04:43.000000Z", "order": 1 } ], "funnel_steps": [ { "id": 131, "name": "Briefing", "project_funnel_id": 35, "sensation_amount": 0, "step_forward_id": null, "step_backward_id": null, "order": 1, "help_text": null, "form_id": null, "sort_config": null, "allow_execution": true, "show_customer_form": false, "show_contact_form": false, "hide_customer_form_when_linked": false, "hide_contact_form_when_linked": false, "created_at": "2026-05-09T22:10:27.000000Z", "updated_at": "2026-05-09T22:10:27.000000Z", "deleted_at": null, "pivot": { "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "funnel_step_id": 131, "id": 351, "order": 0, "created_at": "2026-05-09T22:28:59.000000Z" }, "funnel_step_blockings": [] } ], "step_form": [], "checklists": [], "tags": [ { "id": 1, "name": "Urgente", "color": "#ff8d92", "project_funnel_id": 35, "deleted_at": null, "pivot": { "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "funnel_tag_id": 1, "id": 1 } } ], "merged_project": null, "loose_forms": [], "forum": null, "groups": [], "users": [ { "id": "019def40-491f-70cd-9d0a-91b43fa4f10e", "name": "Test User", "avatar_url": "https://api.dicebear.com/9.x/avataaars/svg?seed=olie-tester&size=80", "pivot": { "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "user_id": "019def40-491f-70cd-9d0a-91b43fa4f10e", "role": "creator", "created_at": "2026-05-09T22:28:57.000000Z", "updated_at": "2026-05-09T22:28:57.000000Z" } } ], "children": [], "parent": null, "frame": { "id": "019def40-4c60-726c-b30f-1ecf669b009a", "old_id": null, "name": "OlieDev Company", "type": "2", "read_only_until": null, "status": 1, "subdomain": "devframe", "frame_billing_data_id": "019df979-ee1d-71a9-8d84-08ad22537c8f", "model_forms": null, "logo_img": null, "cockpit_access": 0 } } } } } }, "401": { "description": "Não autenticado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "unauthorized" }, "error": { "type": "string", "example": "Unauthenticated." } } }, "example": { "response": false, "message": "unauthorized", "error": "Unauthenticated." } } } }, "403": { "description": "Sem permissão", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "permission": { "type": "string" } } }, "example": { "response": false, "message": "permission_required", "error": "User does not have the right permissions.", "permission": "projects.view.019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf" } } } }, "404": { "description": "Projeto não encontrado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "[modelName]_model_not_found" }, "error": { "type": "string", "example": "No query results for model" } } }, "example": { "response": false, "message": "project_model_not_found", "error": "No query results for model [App\\Models\\Project] 00000000-0000-0000-0000-000000000000" } } } } }, "tags": [ "projects", "{id}" ], "description": "Retorna os detalhes completos de um projeto pelo seu ID. O retorno inclui dados do próprio projeto, cliente e contato associados, funis em que o projeto está cadastrado (com todas as etapas, etiquetas, status e anexos), etapas atuais ocupadas, checklists avulsos, formulários respondidos do objeto projeto, grupos de projeto, usuários do projeto (criador e atribuídos), hierarquia (pai e filhos), executores envolvidos, etc.", "parameters": [ { "name": "is_template", "in": "query", "description": "Quando `true`, busca o registro entre projetos do tipo template. Padrão: `false`.", "schema": { "type": "string" }, "example": "" } ] }, "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID do projeto", "schema": { "type": "string" }, "example": "" } ], "put": { "summary": "Editar um projeto", "responses": { "200": { "description": "Editado com sucesso", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 18:49:13 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 159 }, "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" }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "impact": { "type": "integer" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "customer_id": { "type": "string" }, "contact_id": { "type": "integer" }, "status": { "type": "integer" }, "budget": { "type": "integer" }, "is_template": { "type": "boolean" }, "created_by": { "type": "string" }, "form_answers": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "label": { "type": "string" }, "model": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "frame": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "integer" }, "status": { "type": "integer" }, "subdomain": { "type": "string" }, "model_forms": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "class": { "type": "string" } } } }, "cockpit_access": { "type": "integer" } } } } } } }, "example": { "response": true, "project": { "id": "019b277f-e453-733d-a00e-6d26d444008b", "parent_id": null, "old_id": null, "code": "P-83", "name": "Laboratório Hawkins", "description": "Companhia de energia da cidade de Hawkins", "impact": 5, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-16T14:10:51.000000Z", "updated_at": "2025-12-16T18:49:13.000000Z", "customer_id": "019b277d-c615-723f-a1dd-f03940bce866", "contact_id": 12597, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 950000, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "form_answers": [ { "id": 2130, "label": "Texto curto", "answer": null, "model": "Project", "answered_by": null, "updated_at": "2025-12-16T14:45:52.000000Z" }, { "id": 2131, "label": "Texto longo", "answer": null, "model": "Project", "answered_by": null, "updated_at": "2025-12-16T14:45:52.000000Z" } ], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "old_id": null, "name": "OlieDev Company ", "type": "work", "status": 1, "subdomain": "devframe", "frame_billing_data_id": null, "model_forms": [ { "id": 377, "class": "App\\Models\\Project" } ], "logo_img": null, "cockpit_access": 0 } } } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "unauthorized" }, "error": { "type": "string", "example": "Unauthenticated." } } }, "example": { "response": "", "message": "", "error": "" } } } }, "404": { "description": "Model não encontrada", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "[modelName]_model_not_found" }, "error": { "type": "string", "example": "No query results for model" } } }, "example": { "response": "", "message": "", "error": "" } } } }, "422": { "description": "Erro de validação", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 18:52:00 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 158 }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "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" }, "validation": { "type": "object", "properties": { "description": { "type": "array", "items": { "type": "string" } }, "impact": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "The descrição must be a string. (and 1 more error)", "validation": { "description": [ "The descrição must be a string." ], "impact": [ "The impact must not be greater than 10." ] } } } } } }, "tags": [ "projects", "{id}" ], "description": "Atualiza os dados de um projeto existente.", "requestBody": { "content": { "application/json": { "schema": { "title": "Atualização de Projeto", "description": "Campos para atualização de um projeto. Todos os campos são opcionais, permitindo atualizar apenas os campos desejados.", "allOf": [ { "description": "Dados para atualização de um projeto", "title": "Projeto", "type": "object", "properties": { "name": { "type": "string", "maxLength": 191, "example": "Projeto Atualizado", "description": "Nome do projeto. Campo opcional na atualização, máximo de 191 caracteres." }, "description": { "type": "string", "example": "Nova descrição do projeto", "description": "Descrição detalhada do projeto. Campo opcional que permite atualizar as informações adicionais sobre o projeto." }, "impact": { "type": "integer", "minimum": 1, "maximum": 10, "example": 8, "description": "Nível de impacto do projeto em uma escala de 1 a 10." }, "contact_id": { "type": "string", "example": "uuid-do-contato", "description": "ID único (UUID) do contato associado ao projeto. Campo opcional que permite atualizar ou vincular um contato específico ao projeto.", "format": "uuid" }, "customer_id": { "type": "string", "example": "uuid-do-cliente", "description": "ID único (UUID) do cliente associado ao projeto. Campo opcional que permite atualizar ou vincular um cliente específico ao projeto.", "format": "uuid" }, "status": { "type": "number", "enum": [ 1, 2, 3, 4 ], "example": 2, "description": "Status atual do projeto. Valores possíveis: 1 (Em execução), 2 (Concluído), 3 (Arquivado), 4 (Parado)." }, "budget": { "type": "number", "minimum": 0, "maximum": 999999999999.99, "example": 35000.5, "description": "Receita esperada do projeto em valor numérico decimal. Campo opcional que permite atualizar a receita esperada para o projeto.", "format": "float" }, "is_template": { "type": "boolean", "example": false, "description": "Indica se o projeto é um modelo de projeto. Quando true, o projeto pode ser usado como base para criação de outros projetos." }, "form_answers": { "type": "array", "description": "Array de objetos contendo as respostas de formulários dinâmicos associados ao projeto. Cada objeto contém os dados das respostas dos campos do formulário. Permite atualizar as respostas dos formulários.", "items": { "type": "object" } }, "forecast_dates": { "type": "array", "description": "Array de objetos para atualizar datas de previsão por funil. Permite atualizar ou remover datas de previsão de diferentes funis de projeto.", "items": { "type": "object", "properties": { "date": { "type": "string", "example": "2025-08-01", "description": "Data de previsão para o funil de projeto. Pode ser null para remover a data de previsão.", "format": "date" }, "project_funnel_id": { "type": "integer", "example": 4, "description": "ID do funil de projeto ao qual esta data de previsão está associada." } }, "required": [ "project_funnel_id" ] } }, "groups": { "type": "object", "description": "Objeto para gerenciar grupos associados ao projeto. Contém arrays 'to_add' e 'to_rem' para adicionar ou remover grupos. Ambos os arrays devem estar presentes quando este campo for fornecido." }, "tags": { "type": "object", "description": "Objeto para gerenciar **etiquetas de funil associadas ao projeto**. Contém arrays 'to_add' e 'to_rem' para adicionar ou remover etiquetas do projeto. Ambos os arrays devem estar presentes quando este campo for fornecido.", "properties": { "to_add": { "type": "array", "description": "Array de IDs das etiquetas dos funis de projeto serem adicionados ao projeto.", "items": { "type": "integer" } }, "to_rem": { "type": "array", "description": "Array de IDs das etiquetas dos funis de projeto serem removidas do projeto.", "items": { "type": "integer" } } }, "required": [ "to_add", "to_rem" ] }, "funnels": { "type": "object", "description": "Objeto para gerenciar funis que o projeto está vinculado. Contém arrays 'to_add' e 'to_rem' para adicionar ou remover funis. Ambos os arrays devem estar presentes quando este campo for fornecido.", "properties": { "to_add": { "type": "array", "description": "Array de IDs dos funis de projeto a serem adicionados ao projeto.", "items": { "type": "integer" } }, "to_rem": { "type": "array", "description": "Array de IDs dos funis de projeto a serem removidos do projeto.", "items": { "type": "integer" } } }, "required": [ "to_add", "to_rem" ] }, "funnel_status": { "type": "object", "description": "Objeto para vincular ou desvincular um status de funil do projeto.", "properties": { "project_funnel_id": { "type": "integer", "example": 5, "description": "ID do funil de projeto ao qual o status será aplicado." }, "funnel_status_id": { "type": "integer", "example": 3, "description": "ID do status de funil que será atribuído ao projeto dentro do funil especificado." } }, "required": [ "project_funnel_id" ] }, "users": { "type": "array", "description": "Array de objetos para gerenciar usuários associados ao projeto. Permite adicionar ou remover usuários com diferentes papéis do projeto.", "items": { "type": "object", "properties": { "user_id": { "type": "string", "example": "uuid-do-usuario", "description": "ID único (UUID) do usuário a ser associado ou removido do projeto.", "format": "uuid" }, "role": { "type": "string", "example": "assignee", "description": "Papel do usuário no projeto. Valores possíveis: 'creator', 'assignee', 'follower'." }, "action": { "type": "string", "example": "remove", "description": "Ação a ser executada com o usuário. Valores possíveis: 'add' (Adicionar usuário ao projeto), 'remove' (Remover usuário do projeto)." } }, "required": [ "user_id", "role", "action" ] } }, "parent_id": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440000", "format": "uuid", "nullable": true, "description": "ID do projeto pai na hierarquia. Quando null, o projeto fica na raiz." } } } ] }, "example": { "name": "Nome do projeto", "description": "Descrição detalhada do projeto", "impact": 5, "contact_id": "770e8400-e29b-41d4-a716-446655440001", "customer_id": "880e8400-e29b-41d4-a716-446655440001", "status": 3, "budget": 25000, "is_template": false, "parent_id": "550e8400-e29b-41d4-a716-446655440000", "funnels": { "to_add": [ 1, 2, 3 ], "to_rem": [] }, "groups": { "to_add": [ "550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001" ], "to_rem": [ "550e8400-e29b-41d4-a716-446655440001" ] }, "tags": { "to_add": [ 1, 2, 3 ], "to_rem": [] }, "users": [ { "user_id": "550e8400-e29b-41d4-a716-446655440000", "role": "assignee", "action": "add" }, { "user_id": "550e8400-e29b-41d4-a716-446655440001", "role": "follower", "action": "add" } ], "childrens": { "to_add": [ "550e8400-e29b-41d4-a716-446655440002" ], "to_rem": [] }, "forecast_dates": [ { "date": "2025-06-01", "project_funnel_id": 4 }, { "date": "2025-07-15", "project_funnel_id": 5 } ], "funnel_status": { "project_funnel_id": 5, "funnel_status_id": 2 }, "form_answers": [ { "id": 1, "answer": "Resposta do campo" }, { "id": 2, "answer": "Resposta do campo" } ] } } } } }, "delete": { "summary": "Deletar um projeto", "responses": { "200": { "description": "Resposta de sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": true } } }, "example": { "response": "" } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "unauthorized" }, "error": { "type": "string", "example": "Unauthenticated." } } }, "example": { "response": "", "message": "", "error": "" } } } }, "404": { "description": "Model não encontrada", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "[modelName]_model_not_found" }, "error": { "type": "string", "example": "No query results for model" } } }, "example": { "response": "", "message": "", "error": "" } } } } }, "tags": [ "projects", "{id}" ], "description": "Deleta um projeto pelo ID." } }, "/api/management/projects/merge": { "post": { "tags": [ "projects", "merge" ], "summary": "Mesclar projetos", "description": "Mesclar projetos", "operationId": "mesclarProjetos", "responses": { "200": { "description": "200" } } } }, "/api/management/projects/ids": { "post": { "tags": [ "projects", "ids" ], "summary": "Listar IDs de projetos", "description": "Retorna uma lista de IDs de projetos que correspondem aos filtros aplicados na requisição.", "operationId": "listarIdsDeProjetos", "responses": { "200": { "description": "200" } } } }, "/api/management/get-projects-by-forecast-dates": { "post": { "tags": [ "projects", "get-projects-by-forecast-dates" ], "summary": "Obter projetos por datas de previsão", "description": "Obter projetos filtrados por datas de previsão específicas.", "operationId": "obterProjetosPorDatasDePrevisO", "responses": { "200": { "description": "200" } } } }, "/api/management/save-media": { "post": { "summary": "Enviar um conteúdo no projeto", "responses": { "200": { "description": "Conteúdo enviado a vários projetos", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 19:01:51 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 154 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "medias": { "type": "array", "items": { "type": "object", "properties": { "user_id": { "type": "string" }, "type": { "type": "integer" }, "frame_id": { "type": "string" }, "project_id": { "type": "string" }, "name": { "type": "string" }, "technical_name": { "type": "string" }, "text": { "type": "string" }, "id": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "email": { "type": "string", "format": "email" }, "avatar_url": { "type": "string", "format": "uri" }, "status": { "type": "integer" }, "lang": { "type": "string" }, "email_verified_at": { "type": "string" } } } } } } } }, "example": { "response": true, "medias": [ { "user_id": "019b329a-3f1f-7198-89e5-008dc4e2bd60", "type": 1, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "project_id": "019bbcd3-2249-7357-ac43-8ab6209ec54c", "name": "description.4fea17cab04852a3b32d401766a84d5e", "technical_name": "description.4fea17cab04852a3b32d401766a84d5e", "text": "Cada porta pode ser uma porta para outro mundo.", "id": "019bc309-175d-7211-9524-29646278c39f", "updated_at": "2026-01-15T19:01:51.000000Z", "created_at": "2026-01-15T19:01:51.000000Z", "user": { "id": "019b329a-3f1f-7198-89e5-008dc4e2bd60", "old_id": null, "name": "Test User", "description": "Nostrum debitis pariatur dolorum sapiente.", "email": "tester@olie.ai", "avatar_url": "https://via.placeholder.com/124x124.png/00eebb?text=vero", "status": 1, "lang": "en", "email_verified_at": "2025-12-18 14:55:28" } }, { "user_id": "019b329a-3f1f-7198-89e5-008dc4e2bd60", "type": 1, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "project_id": "019bc2c3-5404-707f-be4d-9690f6bb8179", "name": "description.4fea17cab04852a3b32d401766a84d5e", "technical_name": "description.4fea17cab04852a3b32d401766a84d5e", "text": "Cada porta pode ser uma porta para outro mundo.", "id": "019bc309-1777-71e5-98c3-bff91d787182", "updated_at": "2026-01-15T19:01:51.000000Z", "created_at": "2026-01-15T19:01:51.000000Z", "user": { "id": "019b329a-3f1f-7198-89e5-008dc4e2bd60", "old_id": null, "name": "Test User", "description": "Nostrum debitis pariatur dolorum sapiente.", "email": "tester@olie.ai", "avatar_url": "https://via.placeholder.com/124x124.png/00eebb?text=vero", "status": 1, "lang": "en", "email_verified_at": "2025-12-18 14:55:28" } } ] } } } }, "201": { "description": "Conteúdo enviado com sucesso", "content": { "application/json": { "schema": { "description": "Esquema de um conteúdo", "title": "Resposta de conteúdo", "type": "object", "properties": { "response": { "type": "boolean", "example": true }, "media": { "description": "Objeto do conteúdo criado", "type": "object", "title": "Media", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "technical_name": { "type": "string" }, "type": { "type": "integer", "description": "É o tipo do conteúdo enviado" }, "extension": { "type": "string", "description": "Quando um arquivo for enviado a sua extensão aparece aqui" }, "text": { "type": "string" }, "file_url": { "type": "string", "format": "uri" }, "log": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" }, "frame_id": { "type": "string", "format": "uuid" }, "project_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "user": { "type": "object" } } } } }, "example": { "response": true, "media": { "user_id": "019b329a-3f1f-7198-89e5-008dc4e2bd60", "type": 1, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "project_id": "019bbcd3-2249-7357-ac43-8ab6209ec54c", "name": "description.46767bcea2ed5b93a9e55717177d08f0", "technical_name": "description.46767bcea2ed5b93a9e55717177d08f0", "text": "Amigos não mentem", "id": "019bc2e1-e52e-72f5-a30c-f2a6c563188c", "updated_at": "2026-01-15T18:19:02.000000Z", "created_at": "2026-01-15T18:19:02.000000Z", "user": { "id": "019b329a-3f1f-7198-89e5-008dc4e2bd60", "old_id": null, "name": "Test User", "description": "Nostrum debitis pariatur dolorum sapiente.", "email": "tester@olie.ai", "avatar_url": "https://via.placeholder.com/124x124.png/00eebb?text=vero", "status": 1, "lang": "en", "email_verified_at": "2025-12-18 14:55:28" } } } } } }, "422": { "description": "Erro de validação", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 18:21:37 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 150 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "text": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "The texto field is required when type is 1.", "validation": { "text": [ "The texto field is required when type is 1." ] } } } } } }, "tags": [ "projects" ], "description": "Salvar/enviar diferentes tipos de conteúdo (texto, áudio ou arquivo) em um ou múltiplos projetos.\n\n### Tipo 1 - Descrição\n\n- **text** (string, obrigatório): Conteúdo de texto. Menções não são suportadas via API\n \n\n### Tipo 2 - Áudio\n\n- **audio** (file, obrigatório): Arquivo de áudio (multipart/form-data)\n \n\n### Tipo 3 - Arquivo\n\n- **file** (array, obrigatório): Array de arquivos (multipart/form-data)\n \n- **text** (string, opcional): Texto descritivo\n \n\n## Observações\n\n- Projetos merged não podem receber novas mídias\n \n- Múltiplos arquivos geram múltiplas entradas de mídia\n \n- Menções em descrições processam notificações automaticamente\n \n- Quando múltiplas mídias são criadas, o retorno usa `medias` (array) ao invés de `media` (objeto).", "requestBody": { "content": { "application/json": { "schema": { "title": "MediaPayload", "type": "object", "properties": { "type": { "type": "integer", "enum": [ 1, 2, 3 ], "description": "O tipo do conteúdo. Valores possíveis: 1 (Texto), 2 (Arquivo), 3 (Áudio).", "x-markdownDescription": "Tipo a usar" }, "project_ids": { "type": "array", "description": "IDs dos projetos (UUIDs) onde você deseja enviar o conteúdo.", "items": { "type": "string", "format": "uuid" } }, "text": { "type": "string", "maxLength": 50000, "description": "Texto do conteúdo. Obrigatório se 'type' for 1 (Texto)." }, "file[0]": { "type": "string", "description": "Arquivos. Obrigatório se 'type' for 2 (Arquivo). O nome do campo deve seguir o padrão 'file[0]', 'file[1]' ou 'file[2]', dependendo da quantidade de arquivos enviados.", "format": "binary" }, "audio": { "type": "string", "description": "Arquivo de áudio. Obrigatório se 'type' for 3 (Áudio).", "format": "binary" } }, "required": [ "type" ] }, "example": { "type": 1, "project_ids": [ "00000000-0000-0000-0000-000000000000" ], "text": "Texto a ser enviado", "file[0]": "", "audio": "" } } } } } }, "/api/management/projects": { "get": { "summary": "Listar projetos", "parameters": [ { "name": "page", "in": "query", "required": false, "description": "Número da página a ser retornada. Começa em 1", "schema": { "type": "integer", "default": 1, "minLength": 1 }, "example": 1 }, { "name": "perPage", "in": "query", "required": false, "description": "Quantidade de itens exibidos por página. Define o tamanho da página de resultados", "schema": { "type": "integer", "default": 30, "minLength": 1, "maxLength": 100 }, "example": 30 }, { "name": "filter", "in": "query", "description": "Permite aplicar filtros aos resultados da listagem. Use a sintaxe `filter[campo]=valor` para filtrar por campos específicos. Campos disponíveis variam por recurso. Consulte a documentação sobre [filtros básicos](https://docs.olie.ai/api-reference/general/basic-filters)", "schema": { "type": "string", "default": "" }, "example": "" }, { "name": "search", "in": "query", "required": false, "description": "Filtrar projetos pelo nome ou código", "schema": { "type": "string", "default": "" }, "example": "Hopper" }, { "name": "trashed", "in": "query", "required": false, "description": "Filtrar deletados", "schema": { "type": "boolean", "default": "" }, "example": true }, { "name": "template", "in": "query", "required": false, "description": "Filtrar projetos templates", "schema": { "type": "boolean", "default": "" }, "example": true }, { "name": "sort", "in": "query", "required": false, "description": "Campo usado para ordenação. Ex: name, created_at, etc.", "schema": { "type": "string", "default": "" }, "example": "name" }, { "name": "direction", "in": "query", "required": false, "description": "Direção da ordenação: asc (crescente) ou desc (decrescente).", "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "example": "asc" } ], "responses": { "200": { "description": "Sucesso", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 12:23:39 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 158 }, "Access-Control-Allow-Origin": { "schema": { "type": "string" }, "example": "*" }, "Access-Control-Expose-Headers": { "schema": { "type": "string" }, "example": "*" } } }, "401": { "description": "Não autorizado", "headers": { "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "no-cache, private" }, "access-control-allow-origin": { "schema": { "type": "string" }, "example": "*" }, "access-control-expose-headers": { "schema": { "type": "string" }, "example": "*" } } } }, "tags": [ "projects" ], "description": "Esta rota é normalmente utilizada para campos de autocomplete, e buscas mais simples, pois é uma rota que entrega menos informações que uma busca avançada. Se você estiver buscando encontrar projetos baseado em um conjunto de filtros avançados e específicos, considere usar a busca avançada.\n\nPossui paginação e aceita alguns filtros via query params, consulte:\n\n- [Filtro básico](https://docs.olie.ai/api-reference/general/basic-filters)" }, "post": { "summary": "Criar um projeto", "responses": { "200": { "description": "Sucesso", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 12:57:45 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 158 }, "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" }, "project": { "type": "object", "properties": { "frame_id": { "type": "string" }, "status": { "type": "integer" }, "impact": { "type": "integer" }, "description": { "type": "string" }, "name": { "type": "string" }, "budget": { "type": "integer" }, "is_template": { "type": "boolean" }, "code": { "type": "string" }, "id": { "type": "string" }, "created_by": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "frame": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "integer" }, "status": { "type": "integer" }, "subdomain": { "type": "string" }, "cockpit_access": { "type": "integer" } } }, "form_answers": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "label": { "type": "string" }, "answer": { "type": "string" }, "model": { "type": "string" }, "answered_by": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } } } } } } }, "example": { "response": true, "project": { "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "status": 3, "impact": 5, "description": "Eveniet modi inventore laboriosam voluptatum consectetur officia. Et vel blanditiis dolor neque tenetur nam nobis fuga. Eum sequi quis accusamus dolorem ut.", "name": "molestiae consequatur ad", "contact_id": null, "customer_id": null, "budget": 25000, "is_template": false, "code": "P-82", "id": "019b273c-f7c4-71ac-97b5-b96d95512130", "created_by": "019aeaa3-2370-731c-9008-be759795f449", "updated_at": "2025-12-16T12:57:45.000000Z", "created_at": "2025-12-16T12:57:45.000000Z", "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "old_id": null, "name": "OlieDev Company ", "type": "work", "status": 1, "subdomain": "devframe", "frame_billing_data_id": null, "model_forms": null, "logo_img": null, "cockpit_access": 0 }, "form_answers": [ { "id": 1, "label": "eos quod", "answer": "Resposta do campo", "model": "Project", "answered_by": "019bc286-5e87-7168-965d-720b922f8187", "updated_at": "2026-01-15T17:17:16.000000Z" }, { "id": 2, "label": "deleniti veniam", "answer": "Resposta do campo", "model": "Project", "answered_by": "019bc286-5e87-7168-965d-720b922f8187", "updated_at": "2026-01-15T17:17:16.000000Z" }, { "id": 3, "label": "dolorem fugiat", "answer": null, "model": "Project", "answered_by": "019bc286-5e87-7168-965d-720b922f8187", "updated_at": "2026-01-15T17:17:16.000000Z" }, { "id": 4, "label": "sequi qui", "answer": null, "model": "Project", "answered_by": "019bc286-5e87-7168-965d-720b922f8187", "updated_at": "2026-01-15T17:17:16.000000Z" } ] } } } } }, "401": { "description": "Não autorizado", "headers": { "Date": { "schema": { "type": "string" }, "example": "Thu, 11 Dec 2025 23:54:15 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "access-control-allow-origin": { "schema": { "type": "string" }, "example": "*" }, "access-control-expose-headers": { "schema": { "type": "string" }, "example": "*" } } }, "422": { "description": "Erro de validação", "headers": { "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" } } } }, "tags": [ "projects" ], "description": "Cria um novo projeto com os dados fornecidos.", "requestBody": { "content": { "application/json": { "schema": { "title": "Criação de Projeto", "description": "Payload obrigatório para criação de um projeto", "allOf": [ { "description": "Dados para criação ou atualização de um projeto", "title": "Projeto", "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "maxLength": 191, "example": "Novo Projeto", "description": "Nome do projeto. Campo obrigatório na criação, máximo de 191 caracteres." }, "description": { "type": "string", "example": "Descrição do projeto", "description": "Descrição detalhada do projeto. Campo opcional que permite fornecer informações adicionais sobre o projeto." }, "impact": { "type": "integer", "minimum": 1, "maximum": 10, "example": 5, "description": "Nível de impacto do projeto em uma escala de 1 a 10." }, "contact_id": { "type": "string", "example": "uuid-do-contato", "format": "uuid", "description": "ID único (UUID) do contato associado ao projeto. Campo opcional que permite vincular um contato específico ao projeto." }, "customer_id": { "type": "string", "example": "uuid-do-cliente", "format": "uuid", "description": "ID único (UUID) do cliente associado ao projeto. Campo opcional que permite vincular um cliente específico ao projeto." }, "status": { "type": "number", "enum": [ 1, 2, 3, 4 ], "example": 1, "description": "Status atual do projeto. Valores possíveis: 1 (Em execução), 2 (Concluído), 3 (Arquivado), 4 (Parado)." }, "budget": { "type": "number", "example": 15000.5, "format": "float", "description": "Receita esperada do projeto em valor numérico decimal. Campo opcional que permite definir a receita esperada para o projeto. Valor mínimo: 0, máximo: 999999999999.99." }, "is_template": { "type": "boolean", "example": false, "description": "Indica se o projeto é um modelo de projeto. Quando true, o projeto pode ser usado como base para criação de outros projetos." }, "form_answers": { "type": "array", "items": { "type": "object" }, "description": "Array de objetos contendo as respostas de formulários dinâmicos associados ao projeto. Cada objeto contém os dados das respostas dos campos do formulário." }, "forecast_dates": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "example": "2025-06-01", "format": "date", "description": "Data de previsão para o funil de projeto." }, "project_funnel_id": { "type": "integer", "example": 4, "description": "ID do funil de projeto ao qual esta data de previsão está associada." } }, "required": [ "project_funnel_id" ] }, "description": "Array de objetos para definir datas de previsão por funil. Permite associar diferentes datas de previsão a diferentes funis de projeto." }, "groups": { "type": "object", "properties": { "to_add": { "type": "array", "items": { "type": "string" }, "description": "Array de UUIDs dos grupos a serem adicionados ao projeto. Permite associar o projeto a um ou mais grupos." }, "to_rem": { "type": "array", "items": { "type": "string" }, "description": "Array de UUIDs dos grupos a serem removidos do projeto. Permite desassociar o projeto de grupos específicos." } }, "required": [ "to_add", "to_rem" ], "description": "Objeto para gerenciar grupos associados ao projeto. Contém arrays 'to_add' e 'to_rem' para adicionar ou remover grupos." }, "tags": { "type": "object", "properties": { "to_add": { "type": "array", "items": { "type": "integer" }, "description": "Array de IDs das etiquetas a serem adicionadas ao projeto." }, "to_rem": { "type": "array", "items": { "type": "integer" }, "description": "Array de IDs das etiquetas a serem removidas do projeto." } }, "required": [ "to_add", "to_rem" ], "description": "Objeto para gerenciar etiquetas de funil associadas ao projeto. Contém arrays 'to_add' e 'to_rem' para adicionar ou remover etiquetas do projeto." }, "funnels": { "type": "object", "properties": { "to_add": { "type": "array", "items": { "type": "integer" }, "description": "Array de IDs dos funis de projeto a serem adicionados ao projeto." }, "to_rem": { "type": "array", "items": { "type": "integer" }, "description": "Array de IDs dos funis de projeto a serem removidos do projeto." } }, "required": [ "to_add", "to_rem" ], "description": "Objeto para gerenciar funis que o projeto está vinculado. Contém arrays 'to_add' e 'to_rem' para adicionar ou remover funis." }, "funnel_status": { "type": "object", "properties": { "project_funnel_id": { "type": "integer", "example": 5, "description": "ID do funil de projeto ao qual o status será aplicado." }, "funnel_status_id": { "type": "integer", "example": 2, "description": "ID do status de funil que será atribuído ao projeto dentro do funil especificado." } }, "required": [ "project_funnel_id" ], "description": "Objeto para vincular ou desvincular um status de funil do projeto." }, "prefix": { "type": "string", "example": "PRJ", "description": "Prefixo para o código do projeto. Quando fornecido, será usado na geração automática do código do projeto (ex: 'PRJ-001')." }, "users": { "type": "array", "items": { "type": "object", "properties": { "user_id": { "type": "string", "example": "uuid-do-usuario", "format": "uuid", "description": "ID único (UUID) do usuário a ser associado ou removido do projeto. Campo obrigatório dentro do objeto users." }, "role": { "type": "string", "example": "assignee", "description": "Papel do usuário no projeto. Valores possíveis: 'creator', 'assignee', 'follower'." }, "action": { "type": "string", "example": "add", "description": "Ação a ser executada com o usuário. Valores possíveis: 'add' (Adicionar usuário ao projeto), 'remove' (Remover usuário do projeto)." } }, "required": [ "user_id", "role", "action" ] }, "description": "Array de objetos para gerenciar usuários associados ao projeto." }, "childrens": { "type": "object", "properties": { "to_add": { "type": "array", "items": { "type": "string", "format": "uuid" }, "description": "Array de UUIDs dos projetos filhos a serem adicionados ao projeto. Permite criar uma hierarquia de projetos." }, "to_rem": { "type": "array", "items": { "type": "string", "format": "uuid" }, "description": "Array de UUIDs dos projetos filhos a serem removidos do projeto." } }, "required": [ "to_add", "to_rem" ], "description": "Objeto para gerenciar projetos filhos associados ao projeto. Contém arrays 'to_add' e 'to_rem' para adicionar ou remover projetos filhos." }, "parent_id": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440000", "format": "uuid", "nullable": true, "description": "ID do projeto pai na hierarquia. Quando null, o projeto fica na raiz." } } }, {} ] }, "example": { "name": "Nome do projeto", "description": "Descrição detalhada do projeto", "impact": 5, "contact_id": "770e8400-e29b-41d4-a716-446655440001", "customer_id": "880e8400-e29b-41d4-a716-446655440001", "status": 3, "budget": 25000, "is_template": false, "prefix": "PRJ", "parent_id": "550e8400-e29b-41d4-a716-446655440000", "funnels": { "to_add": [ 1, 2, 3 ], "to_rem": [] }, "groups": { "to_add": [ "550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001" ], "to_rem": [ "550e8400-e29b-41d4-a716-446655440001" ] }, "tags": { "to_add": [ 1, 2, 3 ], "to_rem": [] }, "users": [ { "user_id": "550e8400-e29b-41d4-a716-446655440000", "role": "assignee", "action": "add" }, { "user_id": "550e8400-e29b-41d4-a716-446655440001", "role": "follower", "action": "add" } ], "childrens": { "to_add": [ "550e8400-e29b-41d4-a716-446655440002" ], "to_rem": [] }, "forecast_dates": [ { "date": "2025-06-01", "project_funnel_id": 4 }, { "date": "2025-07-15", "project_funnel_id": 5 } ], "funnel_status": { "project_funnel_id": 5, "funnel_status_id": 2 }, "form_answers": [ { "id": 1, "answer": "Resposta do campo" }, { "id": 2, "answer": "Resposta do campo" } ] } } } } } }, "/api/management/projects/search": { "post": { "summary": "Busca avançada de projetos", "parameters": [ { "name": "withPercentage", "in": "query", "description": "Quando `true`, retorna projetos com campos adicionais calculados: percentual de conclusão (`completed_percentage`), contagem de tarefas (`tasks_count`), contagem de tarefas concluídas (`completed_count`), data de término prevista (`expected_finish`) baseada nas predições mais recentes, e informações de matriz (`headquarter`) e filial (`branch`) do cliente.", "schema": { "type": "boolean" }, "example": true } ], "responses": { "200": { "description": "Sucesso", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 14:13:43 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 158 }, "Access-Control-Allow-Origin": { "schema": { "type": "string" }, "example": "*" }, "Access-Control-Expose-Headers": { "schema": { "type": "string" }, "example": "*" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "projects": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "impact": { "type": "integer" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "customer_id": { "type": "string" }, "contact_id": { "type": "integer" }, "status": { "type": "integer" }, "budget": { "type": "number" }, "is_template": { "type": "boolean" }, "form_answers": { "type": "array", "items": {} }, "tasks": { "type": "array", "items": {} }, "customer": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "contact": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "role": { "type": "string" }, "email": { "type": "string", "format": "email" }, "phone": { "type": "string" }, "description": { "type": "string" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "customers": { "type": "array", "items": {} } } }, "funnels": { "type": "array", "items": {} }, "funnel_steps": { "type": "array", "items": {} }, "tags": { "type": "array", "items": {} }, "groups": { "type": "array", "items": {} }, "users": { "type": "array", "items": {} }, "frame": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "subdomain": { "type": "string" } } }, "executors": { "type": "array", "items": {} } } } }, "meta": { "type": "object", "properties": { "current_page": { "type": "integer" }, "from": { "type": "integer" }, "last_page": { "type": "integer" }, "per_page": { "type": "integer" }, "to": { "type": "integer" }, "total": { "type": "integer" } } }, "response": { "type": "boolean" } } }, "example": { "projects": [ { "id": "019aeaa3-b2d5-71f6-84c5-322f66c1a406", "old_id": null, "code": "P-1", "name": "Paz-Sepúlveda assumenda", "description": "Nemo nemo porro ut sed. Nostrum nihil iste ab. Qui minus aliquid id iusto. Omnis quis velit suscipit dolores tenetur odio non culpa.", "impact": 3, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": "019aeaa3-afaa-7294-b6f9-c9ab2653c84e", "contact_id": 12560, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 990014.63, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": { "id": "019aeaa3-afaa-7294-b6f9-c9ab2653c84e", "name": "Customer Name Example", "parent_id": null, "parent": null }, "contact": { "id": 12560, "name": "Contact Name Example", "role": "blanditiis", "email": "email@example.org", "phone": "(91) 99999-0000", "description": "Omnis molestias qui nobis voluptas quis sunt sapiente neque.", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:07.000000Z", "updated_at": "2025-12-04T18:33:07.000000Z", "deleted_at": null, "customers": [] }, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b2e4-7033-955b-13959cf7ce81", "old_id": null, "code": "P-2", "name": "Toledo e Barros et", "description": "Placeat nulla possimus enim quam quis fugiat aut nam. Aut ea sed consequatur consequatur expedita ea similique. Aut qui quas ipsa culpa sunt.", "impact": 8, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": "019aeaa3-b015-700c-8318-9821b94d6d32", "contact_id": 12551, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 336598.07, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": { "id": "019aeaa3-b015-700c-8318-9821b94d6d32", "name": "Nome do cliente", "parent_id": null, "parent": null }, "contact": { "id": 12551, "name": "Nome do contato", "role": "doloribus", "email": "email@example.org", "phone": "(91) 99999-0000", "description": "Hic error ut sunt aut qui dolorem porro. Repellat qui aut eos debitis.", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:07.000000Z", "updated_at": "2025-12-04T18:33:07.000000Z", "deleted_at": null, "customers": [ { "id": "019aeaa3-af8b-71d8-bb89-e65353073ee3", "name": "Nome do cliente", "pivot": { "contact_id": 12551, "customer_id": "019aeaa3-af8b-71d8-bb89-e65353073ee3" } }, { "id": "019aeaa3-afb2-709a-ae6b-28fd68cdb8b7", "name": "Nome do cliente", "pivot": { "contact_id": 12551, "customer_id": "019aeaa3-afb2-709a-ae6b-28fd68cdb8b7" } }, { "id": "019aeaa3-aff3-70d7-9c56-4333b119fd61", "name": "Nome do cliente", "pivot": { "contact_id": 12551, "customer_id": "019aeaa3-aff3-70d7-9c56-4333b119fd61" } } ] }, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b2ee-70c5-a5dd-5bdb5159eeec", "old_id": null, "code": "P-3", "name": "Esteves e Filhos in", "description": "Tempora cumque consequatur voluptas. Minima sapiente ea in soluta suscipit. Molestiae ut sed laboriosam veniam possimus. Et accusamus qui fugiat delectus.", "impact": 1, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": "019aeaa3-b015-700c-8318-9821b94d6d32", "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 970388.83, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": { "id": "019aeaa3-b015-700c-8318-9821b94d6d32", "name": "Nome do cliente", "parent_id": null, "parent": null }, "contact": null, "funnels": [ { "id": 666, "name": "Inovação", "pivot": { "project_id": "019aeaa3-b2ee-70c5-a5dd-5bdb5159eeec", "project_funnel_id": 666, "id": 42750, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3814, "name": "Criação de Prototipagem", "project_funnel_id": 666, "sensation_amount": 50, "step_forward_id": null, "step_backward_id": null, "order": 45, "help_text": null, "form_id": null, "sort_config": null, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "pivot": { "project_id": "019aeaa3-b2ee-70c5-a5dd-5bdb5159eeec", "funnel_step_id": 3814, "id": 144127, "order": 0, "created_at": "2025-12-04T18:33:09.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b2f9-7304-a344-b05bed96c9d9", "old_id": null, "code": "P-4", "name": "Rodrigues S.A. non", "description": "Sint impedit voluptatem earum omnis quisquam. Aut eum recusandae et dicta velit dolores eius. Tempore voluptas a velit. Nostrum possimus et rerum.", "impact": 5, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 707596.04, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b304-7324-bdfe-e23c45c0eb00", "old_id": null, "code": "P-5", "name": "Vasques-Santacruz vitae", "description": "Natus incidunt facere eum rerum eum. Vel consequatur aut molestiae magni corrupti voluptatibus. Dignissimos consequatur consequatur et et omnis.", "impact": 7, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 657683.24, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [ { "id": 665, "name": "Educação Corporativa", "pivot": { "project_id": "019aeaa3-b304-7324-bdfe-e23c45c0eb00", "project_funnel_id": 665, "id": 42740, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3808, "name": "Gestão de Mudanças", "project_funnel_id": 665, "sensation_amount": 25, "step_forward_id": null, "step_backward_id": null, "order": 40, "help_text": null, "form_id": null, "sort_config": null, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "pivot": { "project_id": "019aeaa3-b304-7324-bdfe-e23c45c0eb00", "funnel_step_id": 3808, "id": 144117, "order": 0, "created_at": "2025-12-04T18:33:09.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b30f-7114-9609-14d3ad82342f", "old_id": null, "code": "P-6", "name": "Teles-Perez voluptas", "description": "Corrupti ut quos laudantium maxime sunt officia dolores. Ut labore sit delectus voluptatem. Et sed ea vel dolor aut sit.", "impact": 4, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 942876.45, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b318-70e7-9806-482b56f78338", "old_id": null, "code": "P-7", "name": "Leon e Faria sint", "description": "At itaque aliquid voluptatem dolore harum qui iste. Dolor cumque asperiores autem voluptatem debitis. Vel modi sint consequuntur dolore vitae et ab.", "impact": 2, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": 12540, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 402351.89, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": { "id": 12540, "name": "Nome do contato", "role": "repudiandae", "email": "email@example.org", "phone": "(91) 99999-0000", "description": "Aperiam quam quaerat necessitatibus et nostrum ea harum.", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:07.000000Z", "updated_at": "2025-12-04T18:33:07.000000Z", "deleted_at": null, "customers": [] }, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b325-7088-8892-15bcbb1d4942", "old_id": null, "code": "P-8", "name": "Nome do projeto", "description": "Dolorum ducimus non provident saepe. Vel veritatis sed ex temporibus dolore numquam neque vel. Vitae repellat eligendi fugit ut.", "impact": 1, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": "019aeaa3-afba-7085-bdd4-a0107165c261", "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 505013.5, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": { "id": "019aeaa3-afba-7085-bdd4-a0107165c261", "name": "Dr. Talita Assunção", "parent_id": null, "parent": null }, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b330-72ab-9b23-ee58ffda374d", "old_id": null, "code": "P-9", "name": "Salas e Leon reiciendis", "description": "Qui dolor sunt cupiditate aliquam. Et ut animi incidunt veritatis.", "impact": 1, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": "019aeaa3-afaa-7294-b6f9-c9ab2653c84e", "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 846712.4, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": { "id": "019aeaa3-afaa-7294-b6f9-c9ab2653c84e", "name": "Customer Name Example", "parent_id": null, "parent": null }, "contact": null, "funnels": [ { "id": 665, "name": "Educação Corporativa", "pivot": { "project_id": "019aeaa3-b330-72ab-9b23-ee58ffda374d", "project_funnel_id": 665, "id": 42738, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3808, "name": "Gestão de Mudanças", "project_funnel_id": 665, "sensation_amount": 25, "step_forward_id": null, "step_backward_id": null, "order": 40, "help_text": null, "form_id": null, "sort_config": null, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "pivot": { "project_id": "019aeaa3-b330-72ab-9b23-ee58ffda374d", "funnel_step_id": 3808, "id": 144115, "order": 0, "created_at": "2025-12-04T18:33:09.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b33a-7151-98c4-87119443e8b8", "old_id": null, "code": "P-10", "name": "Maldonado-Soto ut", "description": "Iste qui minus recusandae voluptas est possimus inventore adipisci. Qui laudantium eum ut recusandae ea. Ut enim saepe nihil iste. Exercitationem dolorem et est distinctio iste et quaerat est.", "impact": 2, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": "019aeaa3-afce-720f-b0d0-8f3031890129", "contact_id": 12534, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 673359.37, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": { "id": "019aeaa3-afce-720f-b0d0-8f3031890129", "name": "Nome do cliente", "parent_id": null, "parent": null }, "contact": { "id": 12534, "name": "Nome do contato", "role": "esse", "email": "email@example.org", "phone": "(91) 99999-0000", "description": "Dolores nobis similique tempora vero. Eos alias ut quis maxime aliquam.", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:07.000000Z", "updated_at": "2025-12-04T18:33:07.000000Z", "deleted_at": null, "customers": [ { "id": "019aeaa3-af8b-71d8-bb89-e65353073ee3", "name": "Nome do cliente", "pivot": { "contact_id": 12534, "customer_id": "019aeaa3-af8b-71d8-bb89-e65353073ee3" } } ] }, "funnels": [ { "id": 665, "name": "Educação Corporativa", "pivot": { "project_id": "019aeaa3-b33a-7151-98c4-87119443e8b8", "project_funnel_id": 665, "id": 42747, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3808, "name": "Gestão de Mudanças", "project_funnel_id": 665, "sensation_amount": 25, "step_forward_id": null, "step_backward_id": null, "order": 40, "help_text": null, "form_id": null, "sort_config": null, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "pivot": { "project_id": "019aeaa3-b33a-7151-98c4-87119443e8b8", "funnel_step_id": 3808, "id": 144124, "order": 0, "created_at": "2025-12-04T18:33:09.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b345-728c-8bab-8dcd2001b0c4", "old_id": null, "code": "P-11", "name": "Azevedo e Filhos autem", "description": "Ipsum magnam omnis consectetur dolor architecto beatae. Aut sed vero sint. A voluptatem expedita harum numquam. Quo esse accusamus omnis nam a neque ut.", "impact": 6, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 551319, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [ { "id": 665, "name": "Educação Corporativa", "pivot": { "project_id": "019aeaa3-b345-728c-8bab-8dcd2001b0c4", "project_funnel_id": 665, "id": 42744, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3808, "name": "Gestão de Mudanças", "project_funnel_id": 665, "sensation_amount": 25, "step_forward_id": null, "step_backward_id": null, "order": 40, "help_text": null, "form_id": null, "sort_config": null, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "pivot": { "project_id": "019aeaa3-b345-728c-8bab-8dcd2001b0c4", "funnel_step_id": 3808, "id": 144121, "order": 0, "created_at": "2025-12-04T18:33:09.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b350-71dd-a096-3b0571038cc0", "old_id": null, "code": "P-12", "name": "Aragão e Mendonça est", "description": "Error doloribus quaerat ex veniam qui illum consequatur. Necessitatibus nam officiis veniam voluptas voluptatem corporis. Sunt id quibusdam autem eum.", "impact": 1, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-12T17:08:29.000000Z", "customer_id": null, "contact_id": 12545, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 2.5, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": { "id": 12545, "name": "Dr. Elisa Medina", "role": "quaerat", "email": "email@example.org", "phone": "(91) 99999-0000", "description": "Sunt id repellendus at dolores. Soluta minima magnam sed temporibus.", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:07.000000Z", "updated_at": "2025-12-04T18:33:07.000000Z", "deleted_at": null, "customers": [ { "id": "019aeaa3-af8b-71d8-bb89-e65353073ee3", "name": "Nome do cliente", "pivot": { "contact_id": 12545, "customer_id": "019aeaa3-af8b-71d8-bb89-e65353073ee3" } }, { "id": "019aeaa3-af96-71d3-aa82-ac0fb8ed5ee6", "name": "Juliana Oliveira Filho", "pivot": { "contact_id": 12545, "customer_id": "019aeaa3-af96-71d3-aa82-ac0fb8ed5ee6" } }, { "id": "019aeaa3-afc3-72a8-aca4-ff5d8687e31f", "name": "Denis Enzo Pedrosa Jr.", "pivot": { "contact_id": 12545, "customer_id": "019aeaa3-afc3-72a8-aca4-ff5d8687e31f" } } ] }, "funnels": [ { "id": 667, "name": "Inovação", "pivot": { "project_id": "019aeaa3-b350-71dd-a096-3b0571038cc0", "project_funnel_id": 667, "id": 42770, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3818, "name": "Planejamento Orçamentário", "project_funnel_id": 667, "sensation_amount": 49, "step_forward_id": null, "step_backward_id": null, "order": 3, "help_text": null, "form_id": null, "sort_config": null, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-11T14:13:14.000000Z", "pivot": { "project_id": "019aeaa3-b350-71dd-a096-3b0571038cc0", "funnel_step_id": 3818, "id": 144231, "order": 0, "created_at": "2025-12-12T17:08:31.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b35b-7064-be98-57b5ee358843", "old_id": null, "code": "P-13", "name": "Zambrano e Maldonado S.A. molestias", "description": "Animi dolores natus sapiente. Est aliquid enim voluptatem dolorum vero atque. Suscipit sed non eum dignissimos qui.", "impact": 3, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": 12560, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 276114.81, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": { "id": 12560, "name": "Contact Name Example", "role": "blanditiis", "email": "email@example.org", "phone": "(91) 99999-0000", "description": "Omnis molestias qui nobis voluptas quis sunt sapiente neque.", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:07.000000Z", "updated_at": "2025-12-04T18:33:07.000000Z", "deleted_at": null, "customers": [] }, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b365-70cb-8d2a-dc56d009c0e3", "old_id": null, "code": "P-14", "name": "Aguiar-Bezerra fugiat", "description": "Voluptatem ut enim voluptatem laudantium. Nobis ut autem officia maiores veniam quam sit velit. Error sunt dolores nisi facilis qui ipsum. Ab ab repellat ut omnis vero sit placeat.", "impact": 7, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": 12562, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 419390.97, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": { "id": 12562, "name": "Dr. Luis Rosa Filho", "role": "sunt", "email": "email@example.org", "phone": "(91) 99999-0000", "description": "Est eius dicta quod facere dolores ut quo.", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:07.000000Z", "updated_at": "2025-12-04T18:33:07.000000Z", "deleted_at": null, "customers": [] }, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b372-7239-9fc1-9dff67a223ff", "old_id": null, "code": "P-15", "name": "Dias Comercial Ltda. sunt", "description": "Perferendis rerum debitis hic quod dolorem. Doloribus consequuntur praesentium eum odio est. Facilis atque autem atque et.", "impact": 1, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": "019aeaa3-af8b-71d8-bb89-e65353073ee3", "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 971235.1, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": { "id": "019aeaa3-af8b-71d8-bb89-e65353073ee3", "name": "Nome do cliente", "parent_id": null, "parent": null }, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b37d-7167-ba8d-ca4e7327edf8", "old_id": null, "code": "P-16", "name": "Pacheco e Santana voluptatem", "description": "Veritatis voluptate sit fugit maiores. Et similique mollitia rerum qui facilis possimus possimus. Id ut ut eaque ipsa. Officia quam quaerat excepturi deleniti ipsam.", "impact": 9, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": "019aeaa3-afce-720f-b0d0-8f3031890129", "contact_id": 12554, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 563563.1, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": { "id": "019aeaa3-afce-720f-b0d0-8f3031890129", "name": "Nome do cliente", "parent_id": null, "parent": null }, "contact": { "id": 12554, "name": "Sara Maya Uchoa Neto", "role": "et", "email": "email@example.org", "phone": "(91) 99999-0000", "description": "Itaque quo quo voluptates rerum ut eum saepe.", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:07.000000Z", "updated_at": "2025-12-04T18:33:07.000000Z", "deleted_at": null, "customers": [ { "id": "019aeaa3-afea-7332-9ec0-b1e89385f0a3", "name": "Dr. Ivana Matos Teles Neto", "pivot": { "contact_id": 12554, "customer_id": "019aeaa3-afea-7332-9ec0-b1e89385f0a3" } }, { "id": "019aeaa3-affb-73cc-afff-f5f2688a5659", "name": "Clara Faro Soto", "pivot": { "contact_id": 12554, "customer_id": "019aeaa3-affb-73cc-afff-f5f2688a5659" } }, { "id": "019aeaa3-b003-7298-8acb-29800025af3b", "name": "Edilson Maldonado Jr.", "pivot": { "contact_id": 12554, "customer_id": "019aeaa3-b003-7298-8acb-29800025af3b" } } ] }, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b388-709f-ba2c-99558d8b9926", "old_id": null, "code": "P-17", "name": "Marques-Aguiar aut", "description": "Cum quo enim corporis dolore molestiae. Ducimus voluptatum sequi alias quia nulla. Accusantium repellendus odit aut temporibus non. Non corporis maxime cum accusamus nam qui rerum.", "impact": 4, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": 12552, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 207289.81, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": { "id": 12552, "name": "Srta. Léia Delatorre Sobrinho", "role": "aut", "email": "email@example.org", "phone": "(91) 99999-0000", "description": "Architecto eaque sunt ab magnam maiores ut aut.", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:07.000000Z", "updated_at": "2025-12-04T18:33:07.000000Z", "deleted_at": null, "customers": [ { "id": "019aeaa3-afb2-709a-ae6b-28fd68cdb8b7", "name": "Nome do cliente", "pivot": { "contact_id": 12552, "customer_id": "019aeaa3-afb2-709a-ae6b-28fd68cdb8b7" } }, { "id": "019aeaa3-affb-73cc-afff-f5f2688a5659", "name": "Clara Faro Soto", "pivot": { "contact_id": 12552, "customer_id": "019aeaa3-affb-73cc-afff-f5f2688a5659" } }, { "id": "019aeaa3-b003-7298-8acb-29800025af3b", "name": "Edilson Maldonado Jr.", "pivot": { "contact_id": 12552, "customer_id": "019aeaa3-b003-7298-8acb-29800025af3b" } } ] }, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b494-72f9-95ae-f8a472700bb5", "old_id": null, "code": "P-18", "name": "(Root) Ortega Ltda. enim", "description": "Tempora voluptatem aperiam magni numquam. Facilis expedita quaerat id omnis. Inventore ad fugiat aut accusantium nesciunt enim. Sed quo velit minus architecto placeat est.", "impact": 3, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 128993.22, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [ { "id": 667, "name": "Inovação", "pivot": { "project_id": "019aeaa3-b494-72f9-95ae-f8a472700bb5", "project_funnel_id": 667, "id": 42756, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3817, "name": "Desenvolvimento Conceitual", "project_funnel_id": 667, "sensation_amount": 87, "step_forward_id": null, "step_backward_id": null, "order": 2, "help_text": null, "form_id": null, "sort_config": { "field": "budget", "arguments": [], "direction": "desc" }, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-11T14:33:58.000000Z", "pivot": { "project_id": "019aeaa3-b494-72f9-95ae-f8a472700bb5", "funnel_step_id": 3817, "id": 144230, "order": 4, "created_at": "2025-12-12T17:08:04.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b4a0-702e-83ab-1042f8fd23b0", "old_id": null, "code": "P-19", "name": "(Root) Medina S.A. et", "description": "Aut sunt voluptatem eum ducimus ipsum voluptates. Ad numquam et quaerat esse rerum assumenda. Ut ut consequatur est aut officiis. Corporis asperiores fugiat ut velit asperiores rem mollitia.", "impact": 8, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 389478.16, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b4ac-71cb-b90c-39c9032b4b93", "old_id": null, "code": "P-20", "name": "(Root) Correia e Roque Ltda. repudiandae", "description": "Ullam iste amet adipisci eius. Nihil maxime necessitatibus deleniti beatae. In odio et consequatur exercitationem. Laboriosam a dolore nostrum et labore quia eum.", "impact": 3, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 923726.28, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b4ba-71a6-8560-853a8526da81", "old_id": null, "code": "P-21", "name": "Projeto Hierárquico Principal", "description": "Rerum amet quia et sit voluptas. Porro omnis possimus nihil similique velit occaecati. A consequatur rem maiores quidem reiciendis ut alias dolorem.", "impact": 1, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 118440.4, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b4ca-71e2-af76-60fd1fce1cd8", "old_id": null, "code": "P-22", "name": "Projeto Hierárquico Principal - incidunt", "description": "Rem doloribus repellat eos est provident voluptatum. Occaecati a ipsum deserunt pariatur. Iste ex aut iure.", "impact": 10, "parent_id": "019aeaa3-b4ba-71a6-8560-853a8526da81", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 394028.34, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b4d7-71f1-a499-44aba4446db2", "old_id": null, "code": "P-23", "name": "Projeto Hierárquico Principal - accusantium", "description": "Qui voluptates fugit eos et rerum aut laudantium consequatur. Omnis sint reprehenderit iste magni reiciendis dolores ut. Amet aut tenetur quo est perferendis.", "impact": 9, "parent_id": "019aeaa3-b4ba-71a6-8560-853a8526da81", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 70737.15, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b4e6-7167-9b21-84fa4fad34ba", "old_id": null, "code": "P-24", "name": "Projeto Hierárquico Principal - adipisci", "description": "Illum rem cum nihil fuga exercitationem quis. Id officia et porro voluptates laboriosam. Qui pariatur reprehenderit et et quia. At consequuntur et fugiat reprehenderit debitis adipisci amet.", "impact": 5, "parent_id": "019aeaa3-b4ba-71a6-8560-853a8526da81", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 857204.35, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [ { "id": 667, "name": "Inovação", "pivot": { "project_id": "019aeaa3-b4e6-7167-9b21-84fa4fad34ba", "project_funnel_id": 667, "id": 42757, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3817, "name": "Desenvolvimento Conceitual", "project_funnel_id": 667, "sensation_amount": 87, "step_forward_id": null, "step_backward_id": null, "order": 2, "help_text": null, "form_id": null, "sort_config": { "field": "budget", "arguments": [], "direction": "desc" }, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-11T14:33:58.000000Z", "pivot": { "project_id": "019aeaa3-b4e6-7167-9b21-84fa4fad34ba", "funnel_step_id": 3817, "id": 144134, "order": 2, "created_at": "2025-12-04T18:33:09.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b4f9-732c-b15e-e2bbe40e8065", "old_id": null, "code": "P-25", "name": "Projeto Hierárquico Principal - incidunt - sed", "description": "Est dolores consequatur consequatur eligendi enim. Quia harum libero sint ut perferendis aspernatur et. Dolorem illo magnam et voluptates minima ad ut.", "impact": 2, "parent_id": "019aeaa3-b4ca-71e2-af76-60fd1fce1cd8", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 151571.28, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [ { "id": 666, "name": "Inovação", "pivot": { "project_id": "019aeaa3-b4f9-732c-b15e-e2bbe40e8065", "project_funnel_id": 666, "id": 42753, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] }, { "id": 667, "name": "Inovação", "pivot": { "project_id": "019aeaa3-b4f9-732c-b15e-e2bbe40e8065", "project_funnel_id": 667, "id": 42759, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3814, "name": "Criação de Prototipagem", "project_funnel_id": 666, "sensation_amount": 50, "step_forward_id": null, "step_backward_id": null, "order": 45, "help_text": null, "form_id": null, "sort_config": null, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "pivot": { "project_id": "019aeaa3-b4f9-732c-b15e-e2bbe40e8065", "funnel_step_id": 3814, "id": 144130, "order": 15, "created_at": "2025-12-04T18:33:09.000000Z" }, "funnel_step_blockings": [] }, { "id": 3817, "name": "Desenvolvimento Conceitual", "project_funnel_id": 667, "sensation_amount": 87, "step_forward_id": null, "step_backward_id": null, "order": 2, "help_text": null, "form_id": null, "sort_config": { "field": "budget", "arguments": [], "direction": "desc" }, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-11T14:33:58.000000Z", "pivot": { "project_id": "019aeaa3-b4f9-732c-b15e-e2bbe40e8065", "funnel_step_id": 3817, "id": 144215, "order": 11, "created_at": "2025-12-11T14:33:36.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b509-7282-af78-a14202c6c236", "old_id": null, "code": "P-26", "name": "Projeto Hierárquico Principal - incidunt - nihil", "description": "Voluptatum doloremque et eos. Enim nam id fugiat doloribus. Est corrupti a mollitia est fuga omnis nobis. Itaque in blanditiis dolore amet. Eos distinctio enim quis vel iusto.", "impact": 6, "parent_id": "019aeaa3-b4ca-71e2-af76-60fd1fce1cd8", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 873077.55, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [ { "id": 667, "name": "Inovação", "pivot": { "project_id": "019aeaa3-b509-7282-af78-a14202c6c236", "project_funnel_id": 667, "id": 42762, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3817, "name": "Desenvolvimento Conceitual", "project_funnel_id": 667, "sensation_amount": 87, "step_forward_id": null, "step_backward_id": null, "order": 2, "help_text": null, "form_id": null, "sort_config": { "field": "budget", "arguments": [], "direction": "desc" }, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-11T14:33:58.000000Z", "pivot": { "project_id": "019aeaa3-b509-7282-af78-a14202c6c236", "funnel_step_id": 3817, "id": 144139, "order": 1, "created_at": "2025-12-04T18:33:09.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b51b-72f1-a7e8-d7821a2a98d8", "old_id": null, "code": "P-27", "name": "Projeto Hierárquico Principal - incidunt - sed - amet", "description": "Incidunt beatae non dolor voluptas. Nulla quis totam aperiam ut itaque. Harum numquam corrupti dolores ad illum maxime.", "impact": 8, "parent_id": "019aeaa3-b4f9-732c-b15e-e2bbe40e8065", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 633662.3, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b52c-71c5-b7e4-fdab5a502b71", "old_id": null, "code": "P-28", "name": "Projeto Hierárquico Principal - incidunt - nihil - iusto", "description": "Ea excepturi iure et beatae occaecati dolorum. Ut accusantium dignissimos distinctio vel aut facere. Deserunt eum aliquam amet sunt ab. Adipisci id corrupti fuga quaerat sit illo.", "impact": 9, "parent_id": "019aeaa3-b509-7282-af78-a14202c6c236", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 997619.02, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b53d-72ff-bfdb-d94173d9234a", "old_id": null, "code": "P-29", "name": "Projeto Hierárquico Principal - accusantium - numquam", "description": "Impedit velit blanditiis sint quisquam sunt. Sapiente ut recusandae quis eos at molestiae ab et. Reiciendis ad ipsam aut voluptatum quaerat.", "impact": 5, "parent_id": "019aeaa3-b4d7-71f1-a499-44aba4446db2", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 93584.8, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [ { "id": 667, "name": "Inovação", "pivot": { "project_id": "019aeaa3-b53d-72ff-bfdb-d94173d9234a", "project_funnel_id": 667, "id": 42761, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": null, "forecast_date_update_count": 0 }, "tags": [] } ], "funnel_steps": [ { "id": 3817, "name": "Desenvolvimento Conceitual", "project_funnel_id": 667, "sensation_amount": 87, "step_forward_id": null, "step_backward_id": null, "order": 2, "help_text": null, "form_id": null, "sort_config": { "field": "budget", "arguments": [], "direction": "desc" }, "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-11T14:33:58.000000Z", "pivot": { "project_id": "019aeaa3-b53d-72ff-bfdb-d94173d9234a", "funnel_step_id": 3817, "id": 144228, "order": 8, "created_at": "2025-12-12T17:08:03.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b550-71a6-8566-25d68eaaa389", "old_id": null, "code": "P-30", "name": "Projeto Hierárquico Principal - accusantium - non", "description": "Voluptas ipsum tempora et inventore est voluptatum provident. Est aut saepe voluptatem culpa non esse. Ab ipsum eum voluptatem laudantium. Officiis cupiditate quia perferendis omnis quia.", "impact": 8, "parent_id": "019aeaa3-b4d7-71f1-a499-44aba4446db2", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:08.000000Z", "updated_at": "2025-12-04T18:33:08.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 947843.18, "is_template": false, "created_by": null, "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null } ], "meta": { "current_page": 1, "from": 1, "last_page": 3, "per_page": 30, "to": 30, "total": 81 }, "response": true } } } }, "401": { "description": "Não autorizado", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 14:15:28 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "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": "Filtro inválido", "headers": { "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" } } } }, "tags": [ "projects" ], "description": "Retorna uma lista de projetos, com alguns detalhes adicionais.\n\nConsulte:\n\n- [Busca avançada](https://docs.olie.ai/api-reference/general/advanced-search)", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "filters": { "type": "array", "description": "Array de objetos, sendo cada objeto um filtro personalizado", "items": { "description": "Filtro personalizado", "type": "object", "properties": { "field": { "type": "string", "example": "name", "description": "Atributo relacionado ao filtro" }, "operator": { "type": "string", "example": "equals" }, "value": { "type": "string" }, "logical_operator": { "type": "string", "enum": [ "and", "or" ] }, "arguments": { "type": "array", "items": { "type": "string" } } } } }, "sorting": { "type": "array", "items": { "type": "object", "properties": { "field": { "type": "string" }, "direction": { "type": "string" }, "arguments": { "type": "array", "items": { "type": "string" } } } } }, "page": { "type": "integer" }, "perPage": { "type": "integer" }, "template": { "type": "boolean" }, "trashed": { "type": "boolean" } } }, "example": { "filters": [], "sorting": [], "page": 1 } } } } } }, "/api/management/projects/quick-store": { "post": { "summary": "Criação rápida", "responses": { "200": { "description": "Sucesso", "headers": { "Date": { "schema": { "type": "string" }, "example": "Fri, 12 Dec 2025 19:29:36 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 159 }, "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" }, "project": { "type": "object", "properties": { "code": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "impact": { "type": "integer" }, "frame_id": { "type": "string" }, "customer_id": { "type": "string" }, "contact_id": { "type": "integer" }, "status": { "type": "integer" }, "budget": { "type": "integer" }, "is_template": { "type": "boolean" }, "created_by": { "type": "string" }, "id": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "medias": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "integer" }, "text": { "type": "string" }, "log": { "type": "string" }, "frame_id": { "type": "string" }, "project_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "funnels": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "order": { "type": "integer" }, "condition": { "type": "string" }, "allow_multi_step": { "type": "boolean" }, "show_cost_info": { "type": "boolean" }, "business_area_id": { "type": "integer" }, "form_id": { "type": "integer" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "allow_execution": { "type": "boolean" }, "pivot": { "type": "object", "properties": { "project_id": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "forecast_date_update_count": { "type": "integer" } } } } } }, "funnel_steps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "sensation_amount": { "type": "integer" }, "order": { "type": "integer" }, "allow_execution": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "pivot": { "type": "object", "properties": { "project_id": { "type": "string" }, "funnel_step_id": { "type": "integer" }, "id": { "type": "integer" }, "order": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" } } } } } }, "tags": { "type": "array", "items": {} }, "checklists": { "type": "array", "items": {} } } } } }, "example": { "response": true, "project": { "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "status": 1, "impact": 10, "description": "Criação rápida", "name": "Nome do projeto", "contact_id": null, "customer_id": null, "code": "ZXC2HQA-22", "id": "019dd427-bb01-70ec-8f2e-c36442ac755f", "created_by": "019c75de-509e-711a-8933-175cb2514cc5", "updated_at": "2026-04-28T12:54:26.000000Z", "created_at": "2026-04-28T12:54:26.000000Z", "form_answers": [ { "id": 36, "label": "Link", "answer": null, "model": "Project", "answered_by": null, "updated_at": "2026-04-01T13:03:13.000000Z" }, { "id": 37, "label": "Link", "answer": null, "model": "Project", "answered_by": null, "updated_at": "2026-04-06T17:14:50.000000Z" } ], "frame": { "id": "019c75de-532c-7047-9563-daf1448ca963", "old_id": null, "name": "Olie Company", "type": "2", "status": 1, "subdomain": "olieframe", "frame_billing_data_id": null, "model_forms": [ { "id": 3, "class": "App\\Models\\FrameRelationship" }, { "id": 14, "class": "App\\Models\\Contact" }, { "id": 12, "class": "App\\Models\\Project" }, { "id": 13, "class": "App\\Models\\Customer" } ], "logo_img": null, "cockpit_access": 1 } } } } } }, "401": { "description": "Não autorizado", "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" }, "Date": { "schema": { "type": "string" }, "example": "Mon, 30 Mar 2026 17:03:31 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Server": { "schema": { "type": "string" }, "example": "nginx" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "X-Content-Type-Options": { "schema": { "type": "string" }, "example": "nosniff" }, "X-Frame-Options": { "schema": { "type": "string" }, "example": "SAMEORIGIN" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "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": "Campo inválido", "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" }, "Date": { "schema": { "type": "string" }, "example": "Mon, 30 Mar 2026 17:04:04 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Server": { "schema": { "type": "string" }, "example": "nginx" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "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 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "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." ] } } } } } }, "tags": [ "projects" ], "description": "O endpoint de criação rápida de projetos permite criar um novo projeto com apenas as informações essenciais, que no endpoint de criação comum, são obrigatórias. Este método é ideal para criação rápida de projetos quando você não precisa configurar todos os detalhes imediatamente.", "requestBody": { "content": { "application/json": { "schema": { "title": "Create Project Payload", "type": "object", "properties": { "name": { "type": "string", "example": "Nome do projeto", "description": "Nome do projeto" }, "funnel_step_id": { "type": "integer", "example": 207, "description": "ID da etapa do funil" }, "prefix": { "type": "string", "example": "PREFIX", "description": "Prefixo do projeto" }, "customer_id": { "type": "string", "example": "019c75de-7e5d-726a-8667-a13179dfad68", "description": "ID do cliente", "format": "uuid" }, "contact_id": { "type": "integer", "example": 123, "description": "ID do contato" }, "from_project_template_id": { "type": "string", "example": "019d2617-fa10-73da-91c3-4f096e703eb4", "description": "ID do template de projeto", "format": "uuid" } }, "required": [ "name" ] }, "example": { "name": "Nome do projeto", "funnel_step_id": 207, "prefix": "PREFIX", "customer_id": "019c75de-7e5d-726a-8667-a13179dfad68", "contact_id": 123, "from_project_template_id": "019d2617-fa10-73da-91c3-4f096e703eb4" } } } } } }, "/api/management/project-funnel-link-toggle": { "post": { "tags": [ "project-funnels", "{project_funnel_id}" ], "summary": "Alternar vínculo do funil de projeto", "description": "Alternar o estado do vínculo entre projeto e funil.", "operationId": "alternarVNculoDoFunilDeProjeto", "responses": { "200": { "description": "200" } } } }, "/api/management/update-project-funnel-status": { "post": { "tags": [ "project-funnels", "{project_funnel_id}" ], "summary": "Atualizar status do funil de projeto", "description": "Atualizar o status de um funil de projeto específico.", "operationId": "atualizarStatusDoFunilDeProjeto", "responses": { "200": { "description": "200" } } } }, "/api/management/get-project-funnels": { "post": { "tags": [ "project-funnels", "get-project-funnels" ], "summary": "Obter um funil de projeto", "description": "Retorna os dados completos de um funil de projeto específico, incluindo todas as suas etapas, configurações de visualização, restrições de fluxo e recursos disponíveis.\n\n**Objetos retornados:**\n\n- **project_funnel**: Dados do funil incluindo:\n \n - **steps**: Etapas sequenciais do funil com suas restrições de movimentação, assistentes de IA, checklists e formulário\n \n - **restrictions**: Regras que controlam a movimentação de itens entre etapas (incoming/outgoing)\n \n - **assistants**: Assistentes de IA configurados para executar ações automatizadas em etapas específicas\n \n - **business_area**: Área de negócio à qual o funil pertence\n \n - **tags**: Etiquetas disponíveis para categorizar itens no funil\n \n - **funnel_status**: Status disponíveis para itens (ex: Urgente) com seus bloqueios de etapa\n \n - **form**: Formulário principal associado ao funil", "operationId": "obterFunilDeProjeto", "responses": { "200": { "description": "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 20:33:09 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 159 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "description": "Indica se a requisição foi bem-sucedida" }, "project_funnel": { "type": "object", "description": "Dados completos do funil de projeto incluindo etapas, restrições, tags e configurações do funil de projeto", "properties": { "id": { "type": "integer", "description": "Identificador único do funil de projeto" }, "name": { "type": "string", "description": "Nome do funil de projeto" }, "prefix": { "type": "string", "description": "Prefixo usado na criação de projetos para que o prefixo do código do projeto seja criado com esse prefixo" }, "order": { "type": "integer", "description": "Ordem de exibição do funil em relação a outros funis" }, "condition": { "type": "string", "enum": [ "active", "inactive" ], "description": "Condição atual do funil (ativo ou inativo)" }, "business_area_id": { "type": "integer", "description": "ID da área de negócio à qual o funil pertence" }, "form_id": { "type": "integer", "description": "ID do formulário associado ao funil (opcional)" }, "frame_id": { "type": "string", "description": "UUID do frame/contexto no qual o funil está inserido", "format": "uuid" }, "created_at": { "type": "string", "description": "Data e hora de criação do funil", "format": "date-time" }, "updated_at": { "type": "string", "description": "Data e hora da última atualização do funil", "format": "date-time" }, "deleted_at": { "type": "string", "description": "Data e hora de exclusão (soft delete), null se não excluído", "format": "date-time" }, "funnel_config_template_id": { "type": "integer", "description": "ID do template de configuração (visualização do usuário)" }, "access": { "type": "array", "description": "Lista de controles de acesso/permissões para o funil", "items": {} }, "steps": { "type": "array", "description": "Etapas do funil em ordem sequencial", "items": { "description": "Uma etapa individual do funil com suas configurações e restrições", "type": "object", "properties": { "id": { "type": "integer", "description": "ID único da etapa" }, "name": { "type": "string", "description": "Nome da etapa do funil" }, "project_funnel_id": { "type": "integer", "description": "ID do funil ao qual a etapa pertence" }, "sensation_amount": { "type": "integer", "description": "Valor de sensação/peso associado à etapa" }, "step_forward_id": { "type": "integer", "description": "ID da etapa seguinte padrão (opcional)" }, "step_backward_id": { "type": "integer", "description": "ID da etapa anterior padrão (opcional)" }, "order": { "type": "integer", "description": "Ordem sequencial da etapa no funil" }, "help_text": { "type": "string", "description": "Texto de ajuda/orientação para a etapa" }, "form_id": { "type": "integer", "description": "ID do formulário associado à etapa (opcional)" }, "sort_config": { "type": "object", "description": "Configuração de ordenação dos itens dentro da etapa", "properties": { "field": { "type": "string", "description": "Campo usado para ordenação" }, "arguments": { "type": "array", "description": "Argumentos adicionais para a ordenação", "items": {} }, "direction": { "type": "string", "enum": [ "asc", "desc" ], "description": "Direção da ordenação (ascendente ou descendente)" } } }, "created_at": { "type": "string", "description": "Data e hora de criação da etapa", "format": "date-time" }, "updated_at": { "type": "string", "description": "Data e hora da última atualização da etapa", "format": "date-time" }, "checklists": { "type": "array", "description": "Lista de checklists associados à etapa", "items": {} }, "restrictions": { "type": "array", "description": "Restrições de movimentação de/para esta etapa", "items": { "description": "Regra que controla a movimentação de itens entre etapas", "type": "object", "properties": { "id": { "type": "integer", "description": "Identificador único da restrição" }, "name": { "type": "string", "description": "Nome descritivo da restrição (opcional)" }, "step_id": { "type": "integer", "description": "ID da etapa à qual a restrição pertence" }, "direction": { "type": "string", "enum": [ "incoming", "outgoing" ], "description": "Direção da restrição (entrada ou saída da etapa)" }, "restriction_type": { "type": "string", "enum": [ "step", "filter", "tag", "status" ], "description": "Tipo de restrição aplicada" }, "target_step_id": { "type": "integer", "description": "ID da etapa alvo (quando restriction_type é 'step')" }, "target_tag_id": { "type": "integer", "description": "ID da tag alvo (quando restriction_type é 'tag')" }, "target_status_id": { "type": "integer", "description": "ID do status alvo (quando restriction_type é 'status')" }, "target_saved_filter_id": { "type": "string", "description": "UUID do filtro salvo (quando restriction_type é 'filter')", "format": "uuid" }, "hierarchy_scope": { "type": "string", "enum": [ "current", "parent", "child", "all" ], "description": "Escopo hierárquico da restrição" }, "hierarchy_depth": { "type": "integer", "description": "Profundidade hierárquica da restrição (opcional)" }, "created_at": { "type": "string", "description": "Data e hora de criação da restrição", "format": "date-time" }, "updated_at": { "type": "string", "description": "Data e hora da última atualização da restrição", "format": "date-time" } } } }, "attachments": { "type": "array", "description": "Anexos associados à etapa", "items": {} }, "assistants": { "type": "array", "description": "Assistentes de IA configurados para esta etapa", "items": { "description": "Assistente de IA que executa ações automatizadas na etapa", "type": "object", "properties": { "id": { "type": "string", "description": "UUID do assistente", "format": "uuid" }, "name": { "type": "string", "description": "Nome do assistente de IA" }, "active": { "type": "boolean", "description": "Indica se o assistente está ativo" }, "funnel_step_id": { "type": "integer", "description": "ID da etapa à qual o assistente pertence" }, "ai_agent_id": { "type": "string", "description": "UUID do agente de IA usado pelo assistente", "format": "uuid" }, "prompt": { "type": "string", "description": "Template do prompt enviado ao agente de IA" }, "execute_on": { "type": "string", "enum": [ "manual", "automatic", "scheduled" ], "description": "Momento de execução do assistente" }, "manual_execution_enabled": { "type": "boolean", "description": "Permite execução manual pelo usuário" }, "result_as_media": { "type": "boolean", "description": "Salva o resultado como mídia/anexo" }, "result_as_dynamic_form": { "type": "object", "description": "Configuração para transformar resultado em formulário dinâmico", "properties": { "edge_id": { "type": "integer", "description": "ID da aresta/conexão do formulário" }, "form_id": { "type": "integer", "description": "ID do formulário dinâmico" }, "project_id": { "type": "string", "description": "Template para ID do projeto (usa variáveis)" }, "pivot_class": { "type": "string", "description": "Classe do modelo pivot para relacionamento" }, "project_funnel_id": { "type": "integer", "description": "ID do funil do projeto" } } }, "failure_funnel_step_id": { "type": "integer", "description": "ID da etapa para onde mover em caso de falha (opcional)" }, "created_at": { "type": "string", "description": "Data e hora de criação do assistente", "format": "date-time" }, "updated_at": { "type": "string", "description": "Data e hora da última atualização do assistente", "format": "date-time" }, "deleted_at": { "type": "string", "description": "Data e hora de exclusão (soft delete)", "format": "date-time" } } } } } } }, "business_area": { "type": "object", "description": "Área de negócio à qual o funil pertence", "properties": { "id": { "type": "integer", "description": "Identificador único da área de negócio" }, "name": { "type": "string", "description": "Nome da área de negócio" }, "order": { "type": "integer", "description": "Ordem de exibição da área de negócio" }, "frame_id": { "type": "string", "description": "UUID do frame/contexto da área", "format": "uuid" }, "deleted_at": { "type": "string", "description": "Data e hora de exclusão (soft delete)", "format": "date-time" } } }, "attachments": { "type": "array", "description": "Anexos associados ao funil", "items": {} }, "form": { "type": "object", "description": "Formulário principal associado ao funil", "properties": { "id": { "type": "integer", "description": "Identificador único do formulário" }, "title": { "type": "string", "description": "Título do formulário" } } }, "template_projects": { "type": "array", "description": "Projetos template associados ao funil", "items": {} }, "tags": { "type": "array", "description": "Etiquetas/tags disponíveis para categorizar itens no funil", "items": { "description": "Etiqueta para categorização de itens no funil", "type": "object", "properties": { "id": { "type": "integer", "description": "Identificador único da tag" }, "name": { "type": "string", "description": "Nome da tag" }, "color": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$", "description": "Cor da tag em formato hexadecimal" }, "project_funnel_id": { "type": "integer", "description": "ID do funil ao qual a tag pertence" }, "deleted_at": { "type": "string", "description": "Data e hora de exclusão (soft delete)", "format": "date-time" }, "funnel_step_blockings": { "type": "array", "description": "Bloqueios de etapas associados a esta tag", "items": {} } } } }, "funnel_status": { "type": "array", "description": "Status de funil disponíveis para projetos no funil", "items": { "description": "Status que pode ser atribuído a projetos no funil", "type": "object", "properties": { "id": { "type": "integer", "description": "ID único do status" }, "name": { "type": "string", "description": "Nome do status" }, "color": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$", "description": "Cor do status em formato hexadecimal" }, "project_funnel_id": { "type": "integer", "description": "ID do funil ao qual o status pertence" }, "is_conclusive": { "type": "boolean", "description": "Indica se este status marca o item como concluído no prazo" }, "created_at": { "type": "string", "description": "Data e hora de criação do status", "format": "date-time" }, "updated_at": { "type": "string", "description": "Data e hora da última atualização do status", "format": "date-time" }, "deleted_at": { "type": "string", "description": "Data e hora de exclusão (soft delete)", "format": "date-time" }, "funnel_step_blockings": { "type": "array", "description": "Bloqueios de etapas quando este status está ativo", "items": { "description": "Bloqueio que impede movimentação de item em determinada etapa", "type": "object", "properties": { "id": { "type": "integer", "description": "Identificador único do bloqueio" }, "automation_bypass": { "type": "boolean", "description": "Permite que automações ignorem este bloqueio" }, "funnel_step_id": { "type": "integer", "description": "ID da etapa bloqueada" }, "funnel_status_id": { "type": "integer", "description": "ID do status que causa o bloqueio (opcional)" }, "funnel_tag_id": { "type": "integer", "description": "ID da tag que causa o bloqueio (opcional)" }, "created_at": { "type": "string", "description": "Data e hora de criação do bloqueio", "format": "date-time" }, "updated_at": { "type": "string", "description": "Data e hora da última atualização do bloqueio", "format": "date-time" } } } } } } } } }, "funnel_view_configs": { "type": "array", "description": "Configurações de visualização do funil (visibilidade de campos, botões, etc.)", "items": { "description": "Uma configuração específica de visualização", "type": "object", "properties": { "key": { "type": "string", "description": "Chave da configuração (ex: 'card.weight', 'info.show.tags')" }, "value": { "description": "Valor da configuração (pode ser string, boolean ou número)", "oneOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "integer" }, { "type": "number" } ] }, "form_edge_id": { "type": "integer", "description": "ID da aresta do formulário relacionada (opcional)" } } } } } }, "example": "{\n \"response\": true,\n \"project_funnel\": {\n \"id\": 74,\n \"name\": \"Desenvolvimento\",\n \"prefix\": \"DL\",\n \"order\": 0,\n \"condition\": \"active\",\n \"business_area_id\": 83,\n \"form_id\": 18,\n \"frame_id\": \"019b329a-4346-7064-bba3-e7c19057cda4\",\n \"created_at\": \"2026-01-09T20:51:29.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:29.000000Z\",\n \"deleted_at\": null,\n \"funnel_config_template_id\": null,\n \"access\": [],\n \"steps\": [\n {\n \"id\": 441,\n \"name\": \"Levantamento de Requisitos\",\n \"project_funnel_id\": 74,\n \"sensation_amount\": 0,\n \"step_forward_id\": null,\n \"step_backward_id\": null,\n \"order\": 1,\n \"help_text\": \"Entender o problema a ser resolvido\",\n \"form_id\": null,\n \"sort_config\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\",\n \"step_forward\": null,\n \"step_backward\": null,\n \"checklists\": [],\n \"restrictions\": [\n {\n \"id\": 190,\n \"name\": null,\n \"step_id\": 441,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 442,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n }\n ],\n \"attachments\": [],\n \"form\": null,\n \"assistants\": []\n },\n {\n \"id\": 442,\n \"name\": \"Planejamento\",\n \"project_funnel_id\": 74,\n \"sensation_amount\": 0,\n \"step_forward_id\": null,\n \"step_backward_id\": null,\n \"order\": 2,\n \"help_text\": null,\n \"form_id\": null,\n \"sort_config\": {\n \"field\": \"impact\",\n \"arguments\": [],\n \"direction\": \"desc\"\n },\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\",\n \"step_forward\": null,\n \"step_backward\": null,\n \"checklists\": [],\n \"restrictions\": [\n {\n \"id\": 191,\n \"name\": null,\n \"step_id\": 442,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 443,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 192,\n \"name\": null,\n \"step_id\": 442,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 444,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 193,\n \"name\": null,\n \"step_id\": 442,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 441,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 194,\n \"name\": null,\n \"step_id\": 442,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 444,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 195,\n \"name\": null,\n \"step_id\": 442,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 443,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 196,\n \"name\": null,\n \"step_id\": 442,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 441,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n }\n ],\n \"attachments\": [],\n \"form\": null,\n \"assistants\": [\n {\n \"id\": \"019ba487-5289-734a-ab6f-30fc0c22cf61\",\n \"name\": \"Gerador de branch\",\n \"active\": true,\n \"funnel_step_id\": 442,\n \"ai_agent_id\": \"019ba487-5276-7333-968f-90d353740216\",\n \"prompt\": \"Sugira um nome de branch para: \"{{project.name}}\"\",\n \"execute_on\": \"manual\",\n \"manual_execution_enabled\": false,\n \"result_as_media\": true,\n \"result_as_dynamic_form\": {\n \"edge_id\": 1,\n \"form_id\": 1,\n \"project_id\": \"{{project.id}}\",\n \"pivot_class\": \"App\\\\Models\\\\ProjectFunnelAssignment\",\n \"project_funnel_id\": 1\n },\n \"failure_funnel_step_id\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\",\n \"deleted_at\": null\n }\n ]\n },\n {\n \"id\": 443,\n \"name\": \"Design\",\n \"project_funnel_id\": 74,\n \"sensation_amount\": 0,\n \"step_forward_id\": null,\n \"step_backward_id\": null,\n \"order\": 3,\n \"help_text\": null,\n \"form_id\": null,\n \"sort_config\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\",\n \"step_forward\": null,\n \"step_backward\": null,\n \"checklists\": [],\n \"restrictions\": [\n {\n \"id\": 197,\n \"name\": null,\n \"step_id\": 443,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 442,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 198,\n \"name\": null,\n \"step_id\": 443,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 444,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 199,\n \"name\": null,\n \"step_id\": 443,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 444,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 200,\n \"name\": null,\n \"step_id\": 443,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 442,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 201,\n \"name\": null,\n \"step_id\": 443,\n \"direction\": \"incoming\",\n \"restriction_type\": \"filter\",\n \"target_step_id\": null,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": \"019ba487-4f91-72d0-82c1-ecd757e034ed\",\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n }\n ],\n \"attachments\": [],\n \"form\": null,\n \"assistants\": []\n },\n {\n \"id\": 444,\n \"name\": \"Desenvolvimento\",\n \"project_funnel_id\": 74,\n \"sensation_amount\": 0,\n \"step_forward_id\": null,\n \"step_backward_id\": null,\n \"order\": 4,\n \"help_text\": null,\n \"form_id\": null,\n \"sort_config\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\",\n \"step_forward\": null,\n \"step_backward\": null,\n \"checklists\": [],\n \"restrictions\": [\n {\n \"id\": 202,\n \"name\": null,\n \"step_id\": 444,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 442,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 203,\n \"name\": null,\n \"step_id\": 444,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 443,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 204,\n \"name\": null,\n \"step_id\": 444,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 445,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 205,\n \"name\": null,\n \"step_id\": 444,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 442,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 206,\n \"name\": null,\n \"step_id\": 444,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 443,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 207,\n \"name\": null,\n \"step_id\": 444,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 446,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 208,\n \"name\": \"Atribua uma etiqueta que defina o item\",\n \"step_id\": 444,\n \"direction\": \"incoming\",\n \"restriction_type\": \"filter\",\n \"target_step_id\": null,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": \"019ba487-4f94-714b-aa68-49f59e07c9ce\",\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n }\n ],\n \"attachments\": [],\n \"form\": null,\n \"assistants\": []\n },\n {\n \"id\": 445,\n \"name\": \"Correção\",\n \"project_funnel_id\": 74,\n \"sensation_amount\": 0,\n \"step_forward_id\": null,\n \"step_backward_id\": null,\n \"order\": 5,\n \"help_text\": null,\n \"form_id\": null,\n \"sort_config\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\",\n \"step_forward\": null,\n \"step_backward\": null,\n \"checklists\": [],\n \"restrictions\": [\n {\n \"id\": 209,\n \"name\": null,\n \"step_id\": 445,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 446,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 210,\n \"name\": null,\n \"step_id\": 445,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 444,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 211,\n \"name\": null,\n \"step_id\": 445,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 447,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n }\n ],\n \"attachments\": [],\n \"form\": null,\n \"assistants\": []\n },\n {\n \"id\": 446,\n \"name\": \"Testes\",\n \"project_funnel_id\": 74,\n \"sensation_amount\": 0,\n \"step_forward_id\": null,\n \"step_backward_id\": null,\n \"order\": 6,\n \"help_text\": null,\n \"form_id\": null,\n \"sort_config\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\",\n \"step_forward\": null,\n \"step_backward\": null,\n \"checklists\": [],\n \"restrictions\": [\n {\n \"id\": 212,\n \"name\": null,\n \"step_id\": 446,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 444,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 213,\n \"name\": null,\n \"step_id\": 446,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 447,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 214,\n \"name\": null,\n \"step_id\": 446,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 445,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n }\n ],\n \"attachments\": [],\n \"form\": null,\n \"assistants\": []\n },\n {\n \"id\": 447,\n \"name\": \"Finalizado\",\n \"project_funnel_id\": 74,\n \"sensation_amount\": 0,\n \"step_forward_id\": null,\n \"step_backward_id\": null,\n \"order\": 7,\n \"help_text\": null,\n \"form_id\": null,\n \"sort_config\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\",\n \"step_forward\": null,\n \"step_backward\": null,\n \"checklists\": [],\n \"restrictions\": [\n {\n \"id\": 215,\n \"name\": null,\n \"step_id\": 447,\n \"direction\": \"incoming\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 446,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n },\n {\n \"id\": 216,\n \"name\": null,\n \"step_id\": 447,\n \"direction\": \"outgoing\",\n \"restriction_type\": \"step\",\n \"target_step_id\": 445,\n \"target_tag_id\": null,\n \"target_status_id\": null,\n \"target_saved_filter_id\": null,\n \"target_filter\": null,\n \"hierarchy_scope\": \"current\",\n \"hierarchy_depth\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n }\n ],\n \"attachments\": [],\n \"form\": null,\n \"assistants\": []\n }\n ],\n \"business_area\": {\n \"id\": 83,\n \"name\": \"Desenvolvimento de software\",\n \"order\": 4,\n \"frame_id\": \"019b329a-4346-7064-bba3-e7c19057cda4\",\n \"deleted_at\": null\n },\n \"attachments\": [],\n \"form\": {\n \"id\": 18,\n \"title\": \"Informações adicionais do desenvolvimento\"\n },\n \"template_projects\": [],\n \"tags\": [\n {\n \"id\": 22,\n \"name\": \"Função\",\n \"color\": \"#28a745\",\n \"project_funnel_id\": 74,\n \"deleted_at\": null,\n \"funnel_step_blockings\": []\n },\n {\n \"id\": 23,\n \"name\": \"Bug\",\n \"color\": \"#ff8d92\",\n \"project_funnel_id\": 74,\n \"deleted_at\": null,\n \"funnel_step_blockings\": []\n },\n {\n \"id\": 24,\n \"name\": \"Ajuste\",\n \"color\": \"#258aff\",\n \"project_funnel_id\": 74,\n \"deleted_at\": null,\n \"funnel_step_blockings\": []\n }\n ],\n \"funnel_status\": [\n {\n \"id\": 8,\n \"name\": \"Urgente\",\n \"color\": \"#dc3545\",\n \"project_funnel_id\": 74,\n \"is_conclusive\": false,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\",\n \"deleted_at\": null,\n \"funnel_step_blockings\": [\n {\n \"id\": 8,\n \"automation_bypass\": false,\n \"funnel_step_id\": 447,\n \"funnel_status_id\": 8,\n \"funnel_tag_id\": null,\n \"created_at\": \"2026-01-09T20:51:30.000000Z\",\n \"updated_at\": \"2026-01-09T20:51:30.000000Z\"\n }\n ]\n }\n ]\n },\n \"funnel_view_configs\": [\n {\n \"key\": \"card.weight\",\n \"value\": \"medium\",\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.tags\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.task_summary\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.customer\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.contact\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.assigned_to\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.created_by\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.impact\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.status\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.budget\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.expected_cost\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.elapsed_cost\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.costs_per_user\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.created_at\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.description\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.forecast_date\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"info.show.groups\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show_buttons_on_hover\",\n \"value\": false,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.content\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.funnel_tags\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.collect_data\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.checklists\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.files\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.forms\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.project_edit\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.hierarchy\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.forum\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.funnel_status\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"buttons.show.copy_link\",\n \"value\": true,\n \"form_edge_id\": null\n },\n {\n \"key\": \"df_project_funnel\",\n \"value\": true,\n \"form_edge_id\": 61\n },\n {\n \"key\": \"df_project_funnel\",\n \"value\": true,\n \"form_edge_id\": 62\n },\n {\n \"key\": \"df_project_funnel\",\n \"value\": true,\n \"form_edge_id\": 63\n }\n ]\n}" } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_funnel_id": { "type": "integer", "description": "ID do funil de projeto" } }, "required": [ "project_funnel_id" ] }, "example": { "project_funnel_id": 0 } } } } }, "get": { "summary": "Listar funis de projeto", "responses": { "200": { "description": "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 20:29:44 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 159 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "project_funnels": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "condition": { "type": "string" }, "business_area": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "business_area_id": { "type": "integer" }, "form_id": { "type": "integer" }, "attachments_count": { "type": "integer" }, "projects_count": { "type": "integer" }, "status_count": { "type": "integer" }, "steps_count": { "type": "integer" }, "tags_count": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } } }, "example": { "response": true, "project_funnels": [ { "id": 74, "name": "Desenvolvimento", "prefix": "DL19", "condition": "active", "business_area": { "id": 83, "name": "Desenvolvimento de software-1-2-3-4" }, "business_area_id": 83, "form_id": 18, "attachments_count": 0, "projects_count": 0, "status_count": 1, "steps_count": 7, "tags_count": 3, "created_at": "2026-01-09T20:51:29.000000Z", "updated_at": "2026-01-09T20:51:29.000000Z", "deleted_at": null }, { "id": 23, "name": "Captação de Recursos", "prefix": "CR", "condition": "active", "business_area": { "id": 10, "name": "Serviços Financeiros 69444026ba810" }, "business_area_id": 10, "form_id": null, "attachments_count": 0, "projects_count": 22, "status_count": 0, "steps_count": 8, "tags_count": 0, "created_at": "2025-12-18T17:55:50.000000Z", "updated_at": "2025-12-18T17:55:51.000000Z", "deleted_at": null }, { "id": 53, "name": "Auditoria", "prefix": "JIHJ10", "condition": "active", "business_area": null, "business_area_id": null, "form_id": null, "attachments_count": 0, "projects_count": 0, "status_count": 0, "steps_count": 6, "tags_count": 0, "created_at": "2026-01-09T20:39:32.000000Z", "updated_at": "2026-01-09T20:39:32.000000Z", "deleted_at": null }, { "id": 71, "name": "Vendas", "prefix": "VDS", "condition": "active", "business_area": null, "business_area_id": null, "form_id": null, "attachments_count": 0, "projects_count": 0, "status_count": 0, "steps_count": 7, "tags_count": 0, "created_at": "2026-01-09T20:51:29.000000Z", "updated_at": "2026-01-09T20:51:30.000000Z", "deleted_at": null } ] } } } } }, "tags": [ "project-funnels", "get-project-funnels" ], "description": "Listar todos os funis de projeto com informações simples." } }, "/api/management/toggle-funnel-tag": { "post": { "tags": [ "project-funnels", "{project_funnel_id}" ], "summary": "Alternar vínculo de etiqueta do funil de um projeto", "description": "Alternar vínculo de etiqueta do funil de um projeto.", "operationId": "alternarVNculoDeEtiquetaDoFunilDeUmProjeto", "responses": { "200": { "description": "200" } } } }, "/api/management/delete-funnel": { "post": { "tags": [ "project-funnels", "{project_funnel_id}" ], "summary": "Arquivar um funil", "description": "Arquivar um funil específico.", "operationId": "arquivarFunil", "responses": { "200": { "description": "200" } } } }, "/api/management/restore-funnel": { "post": { "tags": [ "project-funnels", "{project_funnel_id}" ], "summary": "Restaurar um funil", "description": "Restaurar um funil que foi arquivado anteriormente.", "operationId": "restaurarFunil", "responses": { "200": { "description": "200" } } } }, "/api/management/clone-funnel": { "post": { "tags": [ "project-funnels", "{project_funnel_id}" ], "summary": "Clonar um funil", "description": "Clonar um funil existente criando uma cópia.", "operationId": "clonarFunil", "responses": { "200": { "description": "200" } } } }, "/api/management/project-funnels/reorder": { "post": { "tags": [ "project-funnels", "{project_funnel_id}" ], "summary": "Reordenar funis de projeto", "description": "Reordenar funis de projeto no sistema.", "operationId": "reordenarFunisDeProjeto", "responses": { "200": { "description": "200" } } } }, "/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", "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." ] } } } } } }, "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" } ] } } } } } }, "/api/management/project-funnels/{project_funnel}": { "put": { "tags": [ "project-funnels" ], "summary": "Atualizar um funil de projeto", "description": "Atualizar dados de um funil de projeto específico.", "operationId": "atualizarFunilDeProjeto", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "funnel_config_template_id": { "type": "number", "example": 5 } } }, "examples": { "Atualizar funil de projeto": { "value": { "funnel_config_template_id": 5 } } } } } }, "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project_funnel", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/funnel-steps/{funnel_step_id}/projects": { "post": { "summary": "Vincular um projeto a uma etapa", "responses": { "200": { "description": "Projeto vinculado com sucesso", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 14:24:13 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 136 }, "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" }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "impact": { "type": "integer" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "customer_id": { "type": "string" }, "contact_id": { "type": "integer" }, "status": { "type": "integer" }, "budget": { "type": "integer" }, "is_template": { "type": "boolean" }, "created_by": { "type": "string" }, "funnels": { "type": "array", "items": {} }, "funnel_steps": { "type": "array", "items": {} }, "tags": { "type": "array", "items": {} } } } } }, "example": { "response": true, "project": { "id": "019b277f-e453-733d-a00e-6d26d444008b", "parent_id": null, "old_id": null, "code": "P-83", "name": "Laboratório Hawkins", "description": "Companhia de energia", "impact": 1, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-16T14:10:51.000000Z", "updated_at": "2025-12-16T14:10:51.000000Z", "customer_id": "019b277d-c615-723f-a1dd-f03940bce866", "contact_id": 12597, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 950000, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "funnels": [], "funnel_steps": [], "tags": [] } } } } }, "401": { "description": "Não autorizado", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 14:27:44 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "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", "example": false }, "message": { "type": "string", "example": "unauthorized" }, "error": { "type": "string", "example": "Unauthenticated." } } }, "example": { "response": false, "message": "unauthorized", "error": "Unauthenticated." } } } }, "422": { "description": "Erro: projeto já vinculado", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 14:28:34 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 159 }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "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" }, "service": { "type": "string" }, "message": { "type": "string" }, "error": { "type": "string" }, "requirements": { "type": "array", "items": {} } } }, "example": { "response": false, "service": "App\\Exceptions\\Services\\ProjectFunnel\\FunnelSteps\\LinkProjectToFunnelStepException", "message": "project_already_linked_to_that_step", "error": "The project already is linked with that funnel step", "requirements": [] } } } } }, "tags": [ "funnel-steps", "{funnel_step_id}", "projects" ], "description": "Vincula um projeto a uma etapa do funil", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_id": { "type": "string", "example": "d75b593c-0609-42bf-a722-f99ba9a07daf", "description": "ID do projeto", "format": "uuid" }, "unlink_others": { "type": "boolean", "example": true, "description": "Desvincular projeto das outras etapas do mesmo funil. Use como verdadeiro se estiver tentando mudar o projeto de etapa no funil." }, "force_funnel_link": { "type": "boolean", "example": true, "description": "Forçar vínculo do projeto ao funil caso ele não esteja vinculado" } }, "required": [ "project_id" ] }, "example": { "project_id": "00000000-0000-0000-0000-000000000000", "unlink_others": true, "force_funnel_link": true } } } } }, "parameters": [ { "name": "funnel_step_id", "in": "path", "required": true, "description": "ID da etapa do funil", "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/project-bulk-step-move": { "post": { "tags": [ "funnel-steps", "project-bulk-step-move" ], "summary": "Mover múltiplos projetos de etapa", "description": "Mover múltiplos projetos de etapa em uma única operação.", "operationId": "moverMLtiplosProjetosDeEtapa", "responses": { "200": { "description": "200" } } } }, "/api/management/get-available-steps": { "get": { "tags": [ "funnel-steps", "get-available-steps" ], "summary": "Listar etapas disponíveis", "description": "Listar todas as etapas disponíveis para associação com projetos.", "operationId": "listarEtapasDisponVeis", "responses": { "200": { "description": "200" } } } }, "/api/management/unlink-project-from-funnel-step": { "post": { "tags": [ "funnel-steps", "unlink-project-from-funnel-step" ], "summary": "Desvincular um projeto da etapa do funil", "description": "Desvincular um projeto de uma etapa específica do funil.", "operationId": "desvincularProjetoDaEtapaDoFunil", "responses": { "200": { "description": "200" } } } }, "/api/management/get-step-data": { "post": { "tags": [ "funnel-steps", "get-step-data" ], "summary": "Obter dados da etapa", "description": "Obter dados e informações de uma etapa específica.", "operationId": "obterDadosDaEtapa", "responses": { "200": { "description": "200" } } } }, "/api/management/get-step-attachments": { "get": { "tags": [ "funnel-steps", "get-step-attachments" ], "summary": "Obter anexos da etapa", "description": "Obter todos os anexos associados a uma etapa específica.", "operationId": "obterAnexosDaEtapa", "responses": { "200": { "description": "200" } } } }, "/api/management/update-required-step-attachment": { "post": { "tags": [ "funnel-steps", "update-required-step-attachment" ], "summary": "Atualizar vídeo obrigatório da etapa", "description": "Atualizar a configuração de vídeo obrigatório de uma etapa.", "operationId": "atualizarVDeoObrigatRioDaEtapa", "responses": { "200": { "description": "200" } } } }, "/api/management/steps/{step}/metrics": { "get": { "tags": [ "funnel-steps", "metrics" ], "summary": "Obter métricas da etapa", "description": "Obter métricas e estatísticas de uma etapa específica.", "operationId": "obterMTricasDaEtapa", "responses": { "200": { "description": "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 21:45:19 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 155 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "metrics": { "type": "object", "properties": { "all_time": { "type": "object", "properties": { "average_time": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" } } }, "entry_count": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" }, "meta_data": { "type": "object", "properties": { "user_frequency": { "type": "array", "items": {} } } } } }, "max_time": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" }, "meta_data": { "type": "object", "properties": {} } } }, "min_time": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" }, "meta_data": { "type": "object", "properties": {} } } } } }, "last_seven_days": { "type": "object", "properties": { "average_time": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" } } }, "entry_count": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" }, "meta_data": { "type": "object", "properties": { "user_frequency": { "type": "array", "items": {} } } } } }, "max_time": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" }, "meta_data": { "type": "object", "properties": {} } } }, "min_time": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" }, "meta_data": { "type": "object", "properties": {} } } } } }, "last_thirty_days": { "type": "object", "properties": { "average_time": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" } } }, "entry_count": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" }, "meta_data": { "type": "object", "properties": { "user_frequency": { "type": "array", "items": {} } } } } }, "max_time": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" }, "meta_data": { "type": "object", "properties": {} } } }, "min_time": { "type": "object", "properties": { "value": { "type": "integer" }, "unit": { "type": "string" }, "meta_data": { "type": "object", "properties": {} } } } } } } } } }, "example": { "response": true, "metrics": { "all_time": { "average_time": { "value": 0, "unit": "seconds", "meta_data": null }, "entry_count": { "value": 0, "unit": "count", "meta_data": { "user_frequency": [] } }, "max_time": { "value": 0, "unit": "seconds", "meta_data": { "max_project_id": null } }, "min_time": { "value": 0, "unit": "seconds", "meta_data": { "min_project_id": null } } }, "last_seven_days": { "average_time": { "value": 0, "unit": "seconds", "meta_data": null }, "entry_count": { "value": 0, "unit": "count", "meta_data": { "user_frequency": [] } }, "max_time": { "value": 0, "unit": "seconds", "meta_data": { "max_project_id": null } }, "min_time": { "value": 0, "unit": "seconds", "meta_data": { "min_project_id": null } } }, "last_thirty_days": { "average_time": { "value": 0, "unit": "seconds", "meta_data": null }, "entry_count": { "value": 0, "unit": "count", "meta_data": { "user_frequency": [] } }, "max_time": { "value": 0, "unit": "seconds", "meta_data": { "max_project_id": null } }, "min_time": { "value": 0, "unit": "seconds", "meta_data": { "min_project_id": null } } } } } } } } } }, "parameters": [ { "name": "step", "in": "path", "required": true, "description": "ID da etapa", "schema": { "type": "integer" }, "example": 6419 } ] }, "/api/management/step-assistants/{step_assistant}/execute-manually": { "post": { "tags": [ "step-assistants", "execute-manually" ], "summary": "Executar assistente de etapa manualmente", "description": "Executar manualmente um assistente de etapa específico.", "operationId": "executarAssistenteDeEtapaManualmente", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "step_assistant", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/steps/{step}/assistants/execution-logs": { "get": { "tags": [ "step-assistants", "execution-logs" ], "summary": "Obter registros de execução dos assistentes", "description": "Obter registros de execução dos assistentes associados a uma etapa específica.", "operationId": "obterRegistrosDeExecuODosAssistentes", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "step", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/step-assistants": { "get": { "tags": [ "step-assistants" ], "summary": "Listar todos os assistentes de etapa", "description": "Listar todos os assistentes de etapa cadastrados no sistema.", "operationId": "listarTodosOsAssistentesDeEtapa", "responses": { "200": { "description": "200" } } } }, "/api/management/steps/{step}/assistants": { "get": { "tags": [ "step-assistants" ], "summary": "Listar assistentes de uma etapa específica", "description": "Listar todos os assistentes associados a uma etapa específica.", "operationId": "listarAssistentesDeUmaEtapaEspecFica", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "step-assistants" ], "summary": "Criar um assistente da etapa", "description": "Criar um novo assistente para uma etapa específica.", "operationId": "criarAssistenteDaEtapa", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "active": { "type": "number", "example": 1 }, "ai_agent_id": { "type": "string", "example": "sample_text" }, "execute_on": { "type": "string", "example": "sample_text" }, "failure_funnel_step_id": { "type": "string", "example": "sample_text" }, "funnel_step_id": { "type": "number", "example": 3 }, "manual_execution_enabled": { "type": "number", "example": 0 }, "name": { "type": "string", "example": "sample_text" }, "prompt": { "type": "string", "example": "sample_text" }, "result_as_dynamic_form": { "type": "object", "properties": { "edge_id": { "type": "number", "example": 9 }, "form_id": { "type": "number", "example": 8 }, "funnel_step_id": { "type": "string", "example": "sample_text" }, "id": { "type": "string", "example": "sample_text" }, "loose_form_id": { "type": "string", "example": "sample_text" }, "pivot_class": { "type": "string", "example": "sample_text" }, "project_funnel_id": { "type": "string", "example": "sample_text" }, "project_id": { "type": "string", "example": "sample_text" } } }, "result_as_media": { "type": "number", "example": 1 } } }, "examples": { "Criar assistente da etapa": { "value": { "active": 1, "ai_agent_id": "sample_text", "execute_on": "sample_text", "failure_funnel_step_id": "sample_text", "funnel_step_id": 3, "manual_execution_enabled": 0, "name": "sample_text", "prompt": "sample_text", "result_as_dynamic_form": { "edge_id": 9, "form_id": 8, "funnel_step_id": "sample_text", "id": "sample_text", "loose_form_id": "sample_text", "pivot_class": "sample_text", "project_funnel_id": "sample_text", "project_id": "sample_text" }, "result_as_media": 1 } } } } } }, "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "step", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/steps/{step}/assistants/{assistant}": { "get": { "tags": [ "step-assistants" ], "summary": "Obter assistente da etapa", "description": "Obter detalhes de um assistente específico de uma etapa.", "operationId": "obterAssistenteDaEtapa", "responses": { "200": { "description": "200" } } }, "put": { "tags": [ "step-assistants" ], "summary": "Atualizar um assistente da etapa", "description": "Atualizar dados de um assistente específico de uma etapa.", "operationId": "atualizarAssistenteDaEtapa", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "active": { "type": "number", "example": 1 }, "ai_agent_id": { "type": "string", "example": "sample_text" }, "execute_on": { "type": "string", "example": "sample_text" }, "failure_funnel_step_id": { "type": "string", "example": "sample_text" }, "funnel_step_id": { "type": "number", "example": 3 }, "manual_execution_enabled": { "type": "number", "example": 0 }, "name": { "type": "string", "example": "sample_text" }, "prompt": { "type": "string", "example": "sample_text" }, "result_as_dynamic_form": { "type": "object", "properties": { "edge_id": { "type": "number", "example": 7 }, "form_id": { "type": "number", "example": 8 }, "funnel_step_id": { "type": "string", "example": "sample_text" }, "id": { "type": "string", "example": "sample_text" }, "loose_form_id": { "type": "string", "example": "sample_text" }, "pivot_class": { "type": "string", "example": "sample_text" }, "project_funnel_id": { "type": "string", "example": "sample_text" }, "project_id": { "type": "string", "example": "sample_text" } } }, "result_as_media": { "type": "number", "example": 1 } } }, "examples": { "Atualizar assistente da etapa": { "value": { "active": 1, "ai_agent_id": "sample_text", "execute_on": "sample_text", "failure_funnel_step_id": "sample_text", "funnel_step_id": 3, "manual_execution_enabled": 0, "name": "sample_text", "prompt": "sample_text", "result_as_dynamic_form": { "edge_id": 7, "form_id": 8, "funnel_step_id": "sample_text", "id": "sample_text", "loose_form_id": "sample_text", "pivot_class": "sample_text", "project_funnel_id": "sample_text", "project_id": "sample_text" }, "result_as_media": 1 } } } } } }, "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "step-assistants" ], "summary": "Deletar um assistente da etapa", "description": "Deletar um assistente específico de uma etapa.", "operationId": "deletarAssistenteDaEtapa", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "step", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" }, { "name": "assistant", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/customers/search": { "post": { "tags": [ "customers", "search" ], "summary": "Busca avançada de clientes", "description": "Buscar clientes com filtros e critérios específicos. Leia [aqui sobre busca avançada](https://docs.olie.ai/api-reference/general/advanced-search).", "operationId": "buscaAvanAdaDeClientes", "responses": { "200": { "description": "Sucesso: Filtro por telefone", "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" }, "Date": { "schema": { "type": "string" }, "example": "Fri, 16 Jan 2026 18:11:44 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 159 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "customers": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "headquarter": { "type": "string" }, "company_name": { "type": "string" }, "document_type": { "type": "integer" }, "customer_type": { "type": "integer" }, "document": { "type": "string" }, "email": { "type": "string", "format": "email" }, "phone": { "type": "string" }, "address": { "type": "string" }, "status": { "type": "integer" }, "form_answers": { "type": "array", "items": {} }, "contacts": { "type": "array", "items": {} }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "created_by_user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "avatar_url": { "type": "string", "format": "uri" } } }, "created_by": { "type": "string" }, "contacts_count": { "type": "integer" }, "projects_count": { "type": "integer" }, "tags": { "type": "array", "items": {} } } } }, "meta": { "type": "object", "properties": { "current_page": { "type": "integer" }, "from": { "type": "integer" }, "last_page": { "type": "integer" }, "per_page": { "type": "integer" }, "to": { "type": "integer" }, "total": { "type": "integer" } } }, "response": { "type": "boolean" } } }, "example": { "customers": [ { "id": "019bc7f9-f586-7386-a27d-a070e8ae5ac2", "name": "Cliente Exemplo - Filial Rio Preto", "headquarter": "Cliente Exemplo - Filial Rio Preto", "branch": null, "company_name": "Cliente Exemplo Comércio LTDA", "document_type": 2, "customer_type": 1, "parent": null, "document": "12.345.678/0000-00", "main_activity": null, "email": "rp@clienteexemplo.com.br", "phone": "(99) 99999-9999", "address": "Av. Exemplo, 456 - Campinas/SP", "description": null, "custom_fields": null, "status": 1, "form_answers": [], "contacts": [], "parent_id": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "created_at": "2026-01-16T18:03:25.000000Z", "updated_at": "2026-01-16T18:03:25.000000Z", "deleted_at": null, "created_by_user": { "id": "019b329a-3f1f-7198-89e5-008dc4e2bd60", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/00eebb?text=vero" }, "created_by": "019b329a-3f1f-7198-89e5-008dc4e2bd60", "contacts_count": 0, "projects_count": 0, "tags": [] } ], "meta": { "current_page": 1, "from": 1, "last_page": 1, "per_page": 30, "to": 1, "total": 1 }, "response": true } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "filters": { "type": "array", "description": "Array de filtros a serem aplicados na busca", "items": { "type": "object", "properties": { "field": { "type": "string", "description": "Campo a ser filtrado. Consulte os campos disponíveis de cada modelo [rota de listagem de parâmetros `/api/management/system/params/{model_name}`](https://docs.olie.ai/api-reference/system/listar-par%C3%A2metros-dispon%C3%ADveis-para-filtragem-de-um-modelo)", "x-markdownDescription": "Campo a ser filtrado. Consulte os campos disponíveis de cada modelo [rota de listagem de parâmetros `/api/management/system/params/{model_name}`](https://docs.olie.ai/api-reference/system/listar-par%C3%A2metros-dispon%C3%ADveis-para-filtragem-de-um-modelo)" }, "operator": { "type": "string", "enum": [ "equals", "not_equals", "contains", "not_contains", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals", "is_null", "is_not_null" ], "description": "Operador relacional a ser usado no filtro" }, "value": { "description": "Valor a ser filtrado (pode ser string, number, boolean, object com id, ou null)", "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "object", "properties": { "id": { "type": "string" } }, "required": [ "id" ] } ] }, "logical_operator": { "type": "string", "enum": [ "and", "or" ], "description": "Operador lógico para combinar com outros filtros (padrão: 'and')", "default": "and" }, "arguments": { "type": "array", "description": "Argumentos adicionais para filtros especiais (ex: answer_pool requer edge_id)", "items": { "type": "object", "properties": { "argument_key": { "type": "string", "description": "Chave do argumento" }, "argument_value_id": { "type": "string", "description": "ID do valor do argumento" }, "argument_value_type": { "type": "string", "description": "Tipo do valor do argumento (classe do modelo)" } }, "required": [ "argument_key", "argument_value_id", "argument_value_type" ] } } }, "required": [ "field", "operator" ] } }, "sorting": { "type": "array", "description": "Array de ordenações a serem aplicadas", "items": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "name", "status", "email", "company_name", "document", "customer_type", "main_activity", "address", "description", "created_at" ], "description": "Campo para ordenação" }, "direction": { "type": "string", "enum": [ "asc", "desc" ], "description": "Direção da ordenação" }, "arguments": { "type": "array", "description": "Argumentos adicionais para ordenações especiais", "items": { "type": "object" } } }, "required": [ "field", "direction" ] } }, "page": { "type": "integer", "minimum": 1, "description": "Número da página (paginação Laravel)", "default": 1 }, "per_page": { "type": "integer", "minimum": 1, "maximum": 100, "description": "Quantidade de itens por página", "default": 15 } } }, "example": { "filters": [ { "field": "name", "operator": "contains", "value": "Le" } ] } } } } } }, "/api/management/customers/{customer}/restore": { "post": { "tags": [ "customers", "restore" ], "summary": "Restaurar um cliente", "description": "Restaurar um cliente que foi arquivado anteriormente.", "operationId": "restaurarCliente", "responses": { "200": { "description": "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 20:09:32 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 157 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } } } }, "parameters": [ { "name": "customer", "in": "path", "required": true, "description": "UUID do cliente a restaurar", "schema": { "type": "string", "format": "uuid" }, "example": "019b329a-8ef0-71ac-8997-dc62f1486a70" } ] }, "/api/management/customers/{customer}/media": { "get": { "tags": [ "customers", "media" ], "summary": "Listar conteúdos de projetos associados ao cliente", "description": "Listar conteúdos de projetos associados ao cliente", "operationId": "listarConteDosDeProjetosAssociadosAoCliente", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "customer", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/customers/{customer}/project-medias": { "get": { "tags": [ "customers", "project-medias" ], "summary": "Listar conteúdos de projetos associados ao cliente com arquivos", "description": "Listar conteúdos de projetos associados ao cliente com arquivos", "operationId": "listarConteDosDeProjetosAssociadosAoClienteComArquivos", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "customer", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/customers": { "get": { "tags": [ "customers" ], "summary": "Listar clientes", "description": "Listar todos os clientes.", "operationId": "listarClientes", "responses": { "200": { "description": "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" }, "Date": { "schema": { "type": "string" }, "example": "Fri, 16 Jan 2026 18:06:16 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 159 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "enum": [ true ], "description": "Indicador de sucesso da requisição" }, "customers": { "type": "array", "description": "Array com os objetos de clientes", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Identificador único do cliente", "format": "uuid" }, "name": { "type": "string", "description": "Nome do cliente" }, "headquarter": { "type": "string", "description": "Nome da matriz (atributo computado)" }, "branch": { "type": "string", "description": "Nome da filial (atributo computado)" }, "company_name": { "type": "string", "description": "Razão social da empresa" }, "document_type": { "type": "integer", "enum": [ 1, 2 ], "description": "Tipo de documento: 1 = CPF, 2 = CNPJ" }, "customer_type": { "type": "integer", "enum": [ 1, 2 ], "description": "Tipo de cliente: 1 = Matriz, 2 = Filial" }, "parent": { "type": "object", "description": "Dados da matriz (apenas quando há relacionamento)", "properties": { "id": { "type": "string", "description": "ID da matriz", "format": "uuid" }, "name": { "type": "string", "description": "Nome da matriz" } } }, "document": { "type": "string", "description": "Número do CPF ou CNPJ" }, "main_activity": { "type": "string", "description": "Atividade principal da empresa" }, "email": { "type": "string", "description": "E-mail do cliente", "format": "email" }, "phone": { "type": "string", "description": "Telefone do cliente" }, "address": { "type": "string", "description": "Endereço do cliente" }, "description": { "type": "string", "description": "Descrição adicional do cliente" }, "custom_fields": { "type": "object", "description": "Campos personalizados" }, "status": { "type": "boolean", "description": "Status do cliente (true = ativo, false = inativo)" }, "form_answers": { "type": "array", "description": "Respostas de formulários dinâmicos", "items": {}, "default": [] }, "contacts": { "type": "array", "description": "Contatos vinculados ao cliente (apenas se carregado)", "items": { "type": "object" } }, "parent_id": { "type": "string", "description": "ID do cliente matriz (se for filial)", "format": "uuid" }, "frame_id": { "type": "string", "description": "ID do frame/organização", "format": "uuid" }, "created_at": { "type": "string", "description": "Data de criação do registro", "format": "date-time" }, "updated_at": { "type": "string", "description": "Data da última atualização", "format": "date-time" }, "deleted_at": { "type": "string", "description": "Data de exclusão (soft delete)", "format": "date-time" }, "created_by": { "type": "integer", "description": "ID do usuário que criou o registro" }, "created_by_user": { "type": "object", "description": "Dados do usuário criador (apenas se carregado)", "properties": { "id": { "type": "integer", "description": "ID do usuário" }, "name": { "type": "string", "description": "Nome do usuário" }, "avatar_url": { "type": "string", "description": "URL do avatar do usuário" } } }, "contacts_count": { "type": "integer", "description": "Quantidade de contatos vinculados (apenas se contado)" }, "projects_count": { "type": "integer", "description": "Quantidade de projetos vinculados (apenas se contado)" }, "tags": { "type": "array", "description": "Tags vinculadas ao cliente (apenas se carregadas)", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID da tag", "format": "uuid" }, "name": { "type": "string", "description": "Nome da tag" }, "color": { "type": "string", "description": "Cor da tag em formato hexadecimal" } } } } }, "required": [ "id", "name", "document_type", "customer_type", "frame_id", "created_at", "updated_at" ] } }, "meta": { "type": "object", "description": "Metadados da paginação", "properties": { "current_page": { "type": "integer", "minimum": 1, "description": "Página atual" }, "from": { "type": "integer", "description": "Índice do primeiro item na página atual" }, "last_page": { "type": "integer", "minimum": 1, "description": "Número da última página" }, "per_page": { "type": "integer", "minimum": 1, "description": "Quantidade de itens por página" }, "to": { "type": "integer", "description": "Índice do último item na página atual" }, "total": { "type": "integer", "minimum": 0, "description": "Total de registros disponíveis" } }, "required": [ "current_page", "from", "last_page", "per_page", "to", "total" ] } }, "required": [ "response", "customers", "meta" ] }, "example": { "response": true, "customers": [ { "id": "9d4e5f6a-7b8c-9d0e-1f2a-3b4c5d6e7f8a", "name": "Cliente Exemplo LTDA", "headquarter": "Cliente Exemplo LTDA", "branch": null, "company_name": "Cliente Exemplo Comércio LTDA", "document_type": 2, "customer_type": 1, "document": "12.345.678/0001-90", "main_activity": "Comércio de produtos alimentícios", "email": "contato@clienteexemplo.com.br", "phone": "(91) 99999-0000", "address": "Rua Exemplo, 123 - Centro - São Paulo/SP", "description": "Cliente do segmento de alimentação", "custom_fields": null, "status": true, "form_answers": [], "parent_id": null, "frame_id": "8c3d4e5f-6a7b-8c9d-0e1f-2a3b4c5d6e7f", "created_at": "2026-01-15T10:30:00.000000Z", "updated_at": "2026-01-15T10:30:00.000000Z", "deleted_at": null, "created_by": 123, "contacts_count": 2, "projects_count": 5 } ], "meta": { "current_page": 1, "from": 1, "last_page": 10, "per_page": 15, "to": 15, "total": 150 } } } } } } }, "post": { "tags": [ "customers" ], "summary": "Criar um cliente", "description": "Criar um novo cliente.", "operationId": "criarCliente", "responses": { "200": { "description": "Sucesso (CNPJ)", "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" }, "Date": { "schema": { "type": "string" }, "example": "Fri, 16 Jan 2026 18:03:26 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 157 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } }, "201": { "description": "Sucesso (CNPJ)", "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" }, "Date": { "schema": { "type": "string" }, "example": "Fri, 16 Jan 2026 18:03:26 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 157 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "customer": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "headquarter": { "type": "string" }, "company_name": { "type": "string" }, "document_type": { "type": "integer" }, "customer_type": { "type": "integer" }, "document": { "type": "string" }, "email": { "type": "string", "format": "email" }, "phone": { "type": "string" }, "address": { "type": "string" }, "status": { "type": "boolean" }, "form_answers": { "type": "array", "items": {} }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "created_by": { "type": "string" } } }, "response": { "type": "boolean" } } }, "example": { "customer": { "id": "019bc7f9-f586-7386-a27d-a070e8ae5ac2", "name": "Cliente Exemplo - Filial Rio Preto", "headquarter": "Cliente Exemplo - Filial Rio Preto", "branch": null, "company_name": "Cliente Exemplo Comércio LTDA", "document_type": 2, "customer_type": 1, "document": "12.345.678/0000-00", "main_activity": null, "email": "rp@clienteexemplo.com.br", "phone": "(91) 99999-0000", "address": "Av. Exemplo, 456 - Campinas/SP", "description": null, "custom_fields": null, "status": true, "form_answers": [], "parent_id": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "created_at": "2026-01-16T18:03:25.000000Z", "updated_at": "2026-01-16T18:03:25.000000Z", "deleted_at": null, "created_by": "019b329a-3f1f-7198-89e5-008dc4e2bd60" }, "response": true } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255, "description": "Nome do contato" }, "role": { "type": "string", "description": "Cargo do contato" }, "email": { "type": "string", "maxLength": 254, "description": "E-mail do contato", "format": "email" }, "phone": { "type": "string", "maxLength": 30, "description": "Telefone do contato" }, "description": { "type": "string", "maxLength": 255, "description": "Descrição do contato" }, "customers": { "type": "object", "description": "Clientes vinculados ao contato. Envie to_add (clientes a adicionar) e to_rem (clientes a remover).", "properties": { "to_add": { "type": "array", "description": "IDs dos clientes a adicionar", "items": { "type": "string", "format": "uuid" } }, "to_rem": { "type": "array", "description": "IDs dos clientes a remover", "items": { "type": "string", "format": "uuid" } } }, "required": [ "to_add", "to_rem" ] }, "tags": { "type": "object", "description": "Etiquetas do contato. Envie to_add (etiquetas a adicionar) e to_rem (etiquetas a remover).", "properties": { "to_add": { "type": "array", "description": "Etiquetas a adicionar: use id para vincular etiqueta existente ou name (e opcionalmente color) para criar nova", "items": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string", "description": "ID da etiqueta existente", "format": "uuid" } }, "required": [ "id" ] }, { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255, "description": "Nome da nova etiqueta" }, "color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$", "description": "Cor em hex (ex: #FF0000)" } }, "required": [ "name" ] } ] } }, "to_rem": { "type": "array", "description": "Etiquetas a remover", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID da etiqueta a remover", "format": "uuid" } }, "required": [ "id" ] } } }, "required": [ "to_add", "to_rem" ] }, "form_answers": { "type": "array", "description": "Respostas do formulário dinâmico", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "ID da pergunta do formulário (form_edge id)" }, "answer": { "type": "string", "description": "Resposta para a pergunta" } }, "required": [ "id", "answer" ] } } }, "required": [ "name" ] }, "example": { "name": "Cliente Exemplo - Filial Rio Preto", "document_type": 2, "customer_type": 1, "company_name": "Cliente Exemplo Comércio LTDA", "document": "12.345.678/0002-71", "email": "rp@clienteexemplo.com.br", "phone": "(91) 99999-0000", "address": "Av. Exemplo, 456 - Campinas/SP", "status": true, "parent_id": null, "tags": { "to_add": [], "to_rem": [] } } } } } } }, "/api/management/customers/{customer}": { "get": { "tags": [ "customers" ], "summary": "Obter cliente específico", "description": "Retorna os detalhes de um cliente pelo ID.", "operationId": "obterClienteEspecifico", "parameters": [ { "name": "customer", "in": "path", "required": true, "description": "UUID do cliente", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Cliente encontrado" }, "401": { "description": "Não autorizado" } } }, "put": { "tags": [ "customers" ], "summary": "Atualizar cliente", "description": "Atualiza os dados de um cliente existente. Todos os campos são opcionais; envie apenas os que deseja alterar.", "operationId": "atualizarCliente", "parameters": [ { "name": "customer", "in": "path", "required": true, "description": "UUID do cliente", "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255, "description": "Nome do cliente" }, "company_name": { "type": "string", "maxLength": 100 }, "document_type": { "type": "integer", "enum": [ 1, 2 ], "description": "1 = CPF, 2 = CNPJ" }, "customer_type": { "type": "integer", "enum": [ 1, 2 ], "description": "1 = Matriz, 2 = Filial" }, "document": { "type": "string", "maxLength": 40 }, "main_activity": { "type": "string", "maxLength": 255 }, "email": { "type": "string", "maxLength": 254, "format": "email" }, "phone": { "type": "string", "maxLength": 30 }, "address": { "type": "string", "maxLength": 255 }, "description": { "type": "string", "maxLength": 255 }, "status": { "type": "boolean" }, "parent_id": { "type": "string", "description": "ID do cliente matriz (obrigatório se customer_type = 2)", "format": "uuid" }, "form_answers": { "type": "array", "items": {} }, "tags": { "type": "object", "description": "Etiquetas do cliente. Envie to_add (etiquetas a adicionar) e to_rem (etiquetas a remover).", "properties": { "to_add": { "type": "array", "description": "Etiquetas a adicionar: use id para vincular etiqueta existente ou name (e opcionalmente color) para criar nova", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID da etiqueta existente", "format": "uuid" }, "name": { "type": "string", "description": "Nome da nova etiqueta" }, "color": { "type": "string", "description": "Cor em hex (ex: #FF0000)" } } } }, "to_rem": { "type": "array", "description": "Etiquetas a remover", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID da etiqueta a remover", "format": "uuid" } } } } } } } }, "example": { "name": "Cliente Atualizado", "email": "novo@email.com.br", "status": true, "tags": { "to_add": [], "to_rem": [] } } } }, "required": false }, "responses": { "200": { "description": "Cliente atualizado com sucesso" }, "401": { "description": "Não autorizado" } } }, "delete": { "tags": [ "customers" ], "summary": "Arquivar cliente", "description": "Arquivar cliente específico", "operationId": "arquivarCliente", "responses": { "200": { "description": "200", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 20:08:38 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 155 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } } } }, "parameters": [ { "name": "customer", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "example": "70ced5b7-48f7-3efe-80c6-627cfd6dae17" } ] }, "/api/management/contacts/search": { "post": { "tags": [ "contacts", "search" ], "summary": "Busca avançada de contatos", "description": "Buscar contatos com filtros e critérios específicos. Leia [aqui sobre busca avançada](https://docs.olie.ai/api-reference/general/advanced-search).", "operationId": "buscaAvanAdaDeContatos", "responses": { "200": { "description": "Busca avançada de contatos", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 19:50:33 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 152 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "contacts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "role": { "type": "string" }, "email": { "type": "string", "format": "email" }, "phone": { "type": "string" }, "description": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "frame_id": { "type": "string" }, "customers": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "pivot": { "type": "object", "properties": { "contact_id": { "type": "integer" }, "customer_id": { "type": "string" } } } } } }, "form_answers": { "type": "array", "items": {} }, "frame": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } } } }, "meta": { "type": "object", "properties": { "current_page": { "type": "integer" }, "from": { "type": "integer" }, "last_page": { "type": "integer" }, "per_page": { "type": "integer" }, "to": { "type": "integer" }, "total": { "type": "integer" } } }, "response": { "type": "boolean" } } }, "example": { "contacts": [ { "id": 159, "name": "Thalia Pietra Lira", "role": "sunt", "email": "goncalves.malena@example.net", "phone": "(99) 99999-9999", "description": "In aut et aliquam odio in aut. Sapiente modi dolorum sunt vitae.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [ { "id": "019b329a-8ef0-71ac-8997-dc62f1486a70", "name": "Sra. Mariah Valentin Sobrinho", "pivot": { "contact_id": 159, "customer_id": "019b329a-8ef0-71ac-8997-dc62f1486a70" } }, { "id": "019b329a-8efa-70dd-ad42-60dd2431804b", "name": "Elias Montenegro", "pivot": { "contact_id": 159, "customer_id": "019b329a-8efa-70dd-ad42-60dd2431804b" } }, { "id": "019b329a-8f00-716b-9c61-0777df2c3714", "name": "Guilherme Thales Paz", "pivot": { "contact_id": 159, "customer_id": "019b329a-8f00-716b-9c61-0777df2c3714" } } ], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 160, "name": "Ariane Valéria Alves", "role": "laboriosam", "email": "juliano67@example.com", "phone": "(99) 99999-9999", "description": "Ratione quia consequatur nam unde consequatur.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [ { "id": "019b329a-8ef0-71ac-8997-dc62f1486a70", "name": "Sra. Mariah Valentin Sobrinho", "pivot": { "contact_id": 160, "customer_id": "019b329a-8ef0-71ac-8997-dc62f1486a70" } }, { "id": "019b329a-8f00-716b-9c61-0777df2c3714", "name": "Guilherme Thales Paz", "pivot": { "contact_id": 160, "customer_id": "019b329a-8f00-716b-9c61-0777df2c3714" } } ], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 161, "name": "Sra. Júlia Brito Deverso", "role": "eius", "email": "allison.fonseca@example.com", "phone": "(99) 99999-9999", "description": "Qui id voluptatibus culpa praesentium qui.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 162, "name": "Ricardo Sérgio Valente Neto", "role": "fugit", "email": "ohana36@example.com", "phone": "(99) 99999-9999", "description": "Pariatur optio voluptatem sed eveniet eveniet.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [ { "id": "019b329a-8efa-70dd-ad42-60dd2431804b", "name": "Elias Montenegro", "pivot": { "contact_id": 162, "customer_id": "019b329a-8efa-70dd-ad42-60dd2431804b" } } ], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 163, "name": "Lia Samanta Valentin", "role": "accusamus", "email": "norma47@example.net", "phone": "(99) 99999-9999", "description": "Veritatis et dolorum omnis voluptas officia temporibus architecto.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 164, "name": "Elisa Renata Barreto", "role": "totam", "email": "valdez.wilson@example.com", "phone": "(99) 99999-9999", "description": "At similique recusandae molestias fugit unde reiciendis.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [ { "id": "019b329a-8efa-70dd-ad42-60dd2431804b", "name": "Elias Montenegro", "pivot": { "contact_id": 164, "customer_id": "019b329a-8efa-70dd-ad42-60dd2431804b" } } ], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 165, "name": "Franco Abreu", "role": "nemo", "email": "qgalindo@example.org", "phone": "(99) 99999-9999", "description": "Quaerat provident sint quia.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [ { "id": "019b329a-8f00-716b-9c61-0777df2c3714", "name": "Guilherme Thales Paz", "pivot": { "contact_id": 165, "customer_id": "019b329a-8f00-716b-9c61-0777df2c3714" } } ], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 166, "name": "Dr. Luiz Serna Filho", "role": "soluta", "email": "mares.sophie@example.org", "phone": "(99) 99999-9999", "description": "Provident deleniti qui aspernatur velit repudiandae dolor.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 167, "name": "Sr. Ricardo Benites", "role": "ullam", "email": "cesar.domingues@example.com", "phone": "(99) 99999-9999", "description": "Est omnis assumenda laboriosam tenetur magnam deleniti aspernatur.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 168, "name": "Flávio Emílio Quintana Neto", "role": "non", "email": "noemi.rico@example.org", "phone": "(99) 99999-9999", "description": "Consectetur quidem et ducimus consequatur.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [ { "id": "019b329a-8ef0-71ac-8997-dc62f1486a70", "name": "Sra. Mariah Valentin Sobrinho", "pivot": { "contact_id": 168, "customer_id": "019b329a-8ef0-71ac-8997-dc62f1486a70" } } ], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 169, "name": "Henrique Marin da Rosa", "role": "est", "email": "pacheco.naiara@example.org", "phone": "(99) 99999-9999", "description": "Non ea sapiente numquam tempore tenetur voluptate accusantium.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 170, "name": "Maurício Dias Gil", "role": "natus", "email": "wpadrao@example.net", "phone": "(99) 99999-9999", "description": "Officiis exercitationem ipsum nobis voluptates quia tempore labore.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [ { "id": "019b329a-8efa-70dd-ad42-60dd2431804b", "name": "Elias Montenegro", "pivot": { "contact_id": 170, "customer_id": "019b329a-8efa-70dd-ad42-60dd2431804b" } }, { "id": "019b329a-8f07-71ca-bff1-ab68831f5b7b", "name": "Dr. Artur Verdugo", "pivot": { "contact_id": 170, "customer_id": "019b329a-8f07-71ca-bff1-ab68831f5b7b" } }, { "id": "019b329a-8f0f-7265-9d8d-a90f96671967", "name": "César Sepúlveda Mascarenhas Sobrinho", "pivot": { "contact_id": 170, "customer_id": "019b329a-8f0f-7265-9d8d-a90f96671967" } } ], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 171, "name": "Dr. Sara Medina Bonilha", "role": "quaerat", "email": "noel.davila@example.org", "phone": "(99) 99999-9999", "description": "Cumque sed nam dolor et neque repudiandae.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 172, "name": "Sra. Heloise Rocha Rodrigues Sobrinho", "role": "neque", "email": "emilio91@example.com", "phone": "(99) 99999-9999", "description": "Laudantium nostrum necessitatibus et voluptatem dolores ipsa.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [ { "id": "019b329a-8ef0-71ac-8997-dc62f1486a70", "name": "Sra. Mariah Valentin Sobrinho", "pivot": { "contact_id": 172, "customer_id": "019b329a-8ef0-71ac-8997-dc62f1486a70" } }, { "id": "019b329a-8efa-70dd-ad42-60dd2431804b", "name": "Elias Montenegro", "pivot": { "contact_id": 172, "customer_id": "019b329a-8efa-70dd-ad42-60dd2431804b" } }, { "id": "019b329a-8f07-71ca-bff1-ab68831f5b7b", "name": "Dr. Artur Verdugo", "pivot": { "contact_id": 172, "customer_id": "019b329a-8f07-71ca-bff1-ab68831f5b7b" } } ], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 173, "name": "Dr. Luciana Cíntia Lira Neto", "role": "nihil", "email": "flores.pedro@example.com", "phone": "(99) 99999-9999", "description": "Ut voluptatem fugiat consequatur in quod temporibus nobis.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [ { "id": "019b329a-8ef0-71ac-8997-dc62f1486a70", "name": "Sra. Mariah Valentin Sobrinho", "pivot": { "contact_id": 173, "customer_id": "019b329a-8ef0-71ac-8997-dc62f1486a70" } }, { "id": "019b329a-8f00-716b-9c61-0777df2c3714", "name": "Guilherme Thales Paz", "pivot": { "contact_id": 173, "customer_id": "019b329a-8f00-716b-9c61-0777df2c3714" } }, { "id": "019b329a-8f07-71ca-bff1-ab68831f5b7b", "name": "Dr. Artur Verdugo", "pivot": { "contact_id": 173, "customer_id": "019b329a-8f07-71ca-bff1-ab68831f5b7b" } } ], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 174, "name": "Daniella Esther Valentin", "role": "possimus", "email": "theo68@example.net", "phone": "(99) 99999-9999", "description": "Est debitis quo iusto magnam hic molestiae molestias.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 175, "name": "Manuel Colaço Jr.", "role": "commodi", "email": "santana.jonas@example.com", "phone": "(99) 99999-9999", "description": "Dolore est accusantium corrupti aut. Esse maxime facere ullam.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } }, { "id": 176, "name": "Dr. Melinda Benites Filho", "role": "repellendus", "email": "augusto40@example.org", "phone": "(99) 99999-9999", "description": "Itaque quae debitis voluptatem deserunt. Ea nihil iusto saepe ut provident ea.", "created_at": "2025-12-18T17:55:48.000000Z", "updated_at": "2025-12-18T17:55:48.000000Z", "deleted_at": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "customers": [ { "id": "019b329a-8efa-70dd-ad42-60dd2431804b", "name": "Elias Montenegro", "pivot": { "contact_id": 176, "customer_id": "019b329a-8efa-70dd-ad42-60dd2431804b" } }, { "id": "019b329a-8f07-71ca-bff1-ab68831f5b7b", "name": "Dr. Artur Verdugo", "pivot": { "contact_id": 176, "customer_id": "019b329a-8f07-71ca-bff1-ab68831f5b7b" } }, { "id": "019b329a-8f0f-7265-9d8d-a90f96671967", "name": "César Sepúlveda Mascarenhas Sobrinho", "pivot": { "contact_id": 176, "customer_id": "019b329a-8f0f-7265-9d8d-a90f96671967" } } ], "form_answers": [], "frame": { "id": "019b329a-4346-7064-bba3-e7c19057cda4", "name": "OlieDev Company " } } ], "meta": { "current_page": 1, "from": 1, "last_page": 1, "per_page": 30, "to": 18, "total": 18 }, "response": true } } } } } } }, "/api/management/contacts/{contact}/restore": { "post": { "tags": [ "contacts", "restore" ], "summary": "Restaurar contato", "description": "Restaurar um contato que foi arquivado anteriormente.", "operationId": "restaurarContato", "responses": { "200": { "description": "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 19:54:06 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 157 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } } } }, "parameters": [ { "name": "contact", "in": "path", "required": true, "schema": { "type": "string" }, "example": "159" } ] }, "/api/management/contacts": { "get": { "tags": [ "contacts" ], "summary": "Listar contatos", "description": "Listar todos os contatos.", "operationId": "listarContatos", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "contacts" ], "summary": "Criar um contato", "description": "Criar um novo contato.", "operationId": "criarContato", "responses": { "200": { "description": "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" }, "Date": { "schema": { "type": "string" }, "example": "Fri, 16 Jan 2026 18:03:26 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 157 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255, "description": "Nome do contato" }, "role": { "type": "string", "description": "Cargo/função do contato" }, "email": { "type": "string", "maxLength": 254, "description": "E-mail do contato", "format": "email" }, "phone": { "type": "string", "maxLength": 30, "description": "Telefone do contato" }, "description": { "type": "string", "maxLength": 255, "description": "Descrição do contato" }, "customers": { "type": "object", "description": "Clientes vinculados ao contato. Envie to_add (clientes a adicionar) e to_rem (clientes a remover).", "properties": { "to_add": { "type": "array", "description": "IDs dos clientes a adicionar", "items": { "type": "string", "format": "uuid" } }, "to_rem": { "type": "array", "description": "IDs dos clientes a remover", "items": { "type": "string", "format": "uuid" } } } }, "tags": { "type": "object", "description": "Etiquetas do contato. Envie to_add (etiquetas a adicionar) e to_rem (etiquetas a remover).", "properties": { "to_add": { "type": "array", "description": "Etiquetas a adicionar: use id para vincular etiqueta existente ou name (e opcionalmente color) para criar nova", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID da etiqueta existente", "format": "uuid" }, "name": { "type": "string", "maxLength": 255, "description": "Nome da nova etiqueta" }, "color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$", "description": "Cor em hex (ex: #FF0000)" } } } }, "to_rem": { "type": "array", "description": "Etiquetas a remover", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID da etiqueta a remover", "format": "uuid" } } } } } }, "form_answers": { "type": "array", "description": "Respostas do formulário dinâmico", "items": {} } }, "required": [ "name" ] }, "example": { "name": "João Silva", "role": "Gerente de Vendas", "email": "joao.silva@exemplo.com.br", "phone": "(91) 99999-0000", "description": "Contato principal da empresa", "customers": { "to_add": [], "to_rem": [] }, "tags": { "to_add": [], "to_rem": [] } } } } } } }, "/api/management/contacts/{contact}": { "get": { "tags": [ "contacts" ], "summary": "Obter contato específico", "description": "Obter detalhes de um contato específico.", "operationId": "obterContatoEspecFico", "responses": { "200": { "description": "200" } } }, "put": { "tags": [ "contacts" ], "summary": "Atualizar contato", "description": "Atualizar dados de um contato específico.", "operationId": "atualizarContato", "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "contacts" ], "summary": "Arquivar contato", "description": "Arquivar um contato específico.", "operationId": "arquivarContato", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "contact", "in": "path", "required": true, "schema": { "type": "integer" }, "example": 159 } ] }, "/api/management/save-form": { "post": { "tags": [ "forms" ], "summary": "Salvar um formulário", "description": "Salvar um novo formulário ou atualizar um formulário existente.", "operationId": "salvarFormulRio", "responses": { "200": { "description": "200" } } } }, "/api/management/get-forms": { "get": { "tags": [ "forms" ], "summary": "Listar formulários", "description": "Lista os formulários do frame. Por padrão retorna apenas formulários ativos.\n\n**Filtro de formulários deletados (soft delete):**\n\nUtilize o parâmetro `filter[trashed]` para controlar a exibição:\n\n| Valor | Comportamento |\n| --- | --- |\n| _(omitido)_ | Retorna apenas formulários ativos (padrão) |\n| `with` | Retorna ativos + deletados |\n| `only` | Retorna apenas os deletados |\n\n**Exemplo:** `GET /api/management/get-forms?filter[trashed]=with`", "operationId": "listarFormulRios", "responses": { "200": { "description": "200" } }, "parameters": [ { "name": "filter[trashed]", "in": "query", "description": "Filtra formulários deletados (soft delete). Valores aceitos: `with` (ativos + deletados), `only` (somente deletados). Omita para retornar apenas ativos (padrão).", "schema": { "type": "string" }, "example": "with" } ] } }, "/api/management/get-form": { "post": { "tags": [ "forms" ], "summary": "Obter formulário", "description": "Obter detalhes de um formulário específico.", "operationId": "obterFormulRio", "responses": { "200": { "description": "200" } } } }, "/api/management/delete-form": { "post": { "tags": [ "forms" ], "summary": "Deletar formulário", "description": "Deletar formulário", "operationId": "deletarFormulRio", "responses": { "200": { "description": "200" } } } }, "/api/management/set-model-forms": { "post": { "tags": [ "forms" ], "summary": "Definir formulários do objeto", "description": "Definir quais formulários estão associados a um objeto específico.", "operationId": "definirFormulRiosDoObjeto", "responses": { "200": { "description": "200" } } } }, "/api/management/dynamic-forms/pivot-accessor/reply": { "post": { "tags": [ "dynamic-forms", "pivot-accessor", "reply" ], "summary": "Responder um formulário dinâmico através de uma URL assinada", "description": "Permite responder um formulário dinâmico através de uma URL assinada de pivot accessor. Valida expiração e uso único antes de processar a resposta.", "operationId": "responderFormulRioDinMicoAtravSDeUmaUrlAssinada", "responses": { "200": { "description": "200" } } } }, "/api/management/dynamic-forms/pivot-accessor/decode": { "get": { "tags": [ "dynamic-forms", "pivot-accessor", "decode" ], "summary": "Decodificar a URL assinada de pivot accessor", "description": "Decodifica uma URL assinada de pivot accessor e retorna as informações do formulário, respostas existentes e URL de resposta. Valida expiração e uso único.", "operationId": "decodificarUrlAssinadaDePivotAccessor", "responses": { "200": { "description": "200" } } } }, "/api/management/dynamic-forms/pivot-accessor/url-generate": { "post": { "tags": [ "dynamic-forms", "pivot-accessor", "url-generate" ], "summary": "Gerar uma URL assinada para acesso temporário a um formulário dinâmico", "description": "Gera URLs assinadas para acesso temporário a formulários dinâmicos através de um pivot accessor, permitindo controle de expiração e acesso único.", "operationId": "gerarUrlAssinadaParaAcessoTemporRioAUmFormulRioDinMico", "responses": { "200": { "description": "200" } } } }, "/api/management/dynamic-forms-answers-file": { "post": { "tags": [ "dynamic-forms", "dynamic-forms-answers-file" ], "summary": "Enviar um arquivo de resposta de formulário dinâmico", "description": "Enviar arquivo como resposta em um formulário dinâmico.", "operationId": "enviarArquivoDeRespostaDeFormulRioDinMico", "responses": { "200": { "description": "200" } } } }, "/api/management/dynamic-forms/{model}/{model_id}": { "get": { "tags": [ "dynamic-forms" ], "summary": "Listar todos os formulários dinâmicos relacionados a um modelo específico", "description": "Listar todos os formulários dinâmicos relacionados a um modelo específico", "operationId": "listarTodosOsFormulRiosDinMicosRelacionadosAUmModeloEspecFico", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "model", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" }, { "name": "model_id", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/dynamic-forms/set-form-answers": { "post": { "summary": "Responder um formulário dinâmico", "responses": { "200": { "description": "Resposta: Formulário objeto projeto", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 14:49:55 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 154 }, "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" }, "edges": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "label": { "type": "string" }, "answer": { "type": "string" }, "model": { "type": "string" }, "answered_by": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } } } } }, "example": { "response": true, "edges": [ { "id": 2130, "label": "Texto curto", "answer": "Exemplo de resposta no formulário do objeto projeto: Voluptates ipsam amet vel mollitia.", "model": "Project", "answered_by": "019aeaa3-2370-731c-9008-be759795f449", "updated_at": "2025-12-16T14:49:55.000000Z" }, { "id": 2131, "label": "Texto longo", "answer": "Exemplo de resposta no formulário do objeto projeto: Quia perspiciatis voluptates maiores.", "model": "Project", "answered_by": "019aeaa3-2370-731c-9008-be759795f449", "updated_at": "2025-12-16T14:49:55.000000Z" } ] } } } }, "401": { "description": "Erro: Não autorizado", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 15:01:12 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "Access-Control-Allow-Origin": { "schema": { "type": "string" }, "example": "*" }, "Access-Control-Expose-Headers": { "schema": { "type": "string" }, "example": "*" } } }, "404": { "description": "Erro: Objeto não encontrado", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 15:03:37 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 159 }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "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": "project_model_not_found", "error": "No query results for model [App\\Models\\Project] 00000000-0000-0000-0000-000000000000" } } } }, "422": { "description": "Erro: Objeto sem relação com o formulário", "headers": { "Date": { "schema": { "type": "string" }, "example": "Tue, 16 Dec 2025 15:06:23 GMT" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" }, "Cache-Control": { "schema": { "type": "string" }, "example": "private, must-revalidate" }, "X-RateLimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "example": 154 }, "pragma": { "schema": { "type": "string" }, "example": "no-cache" }, "expires": { "schema": { "type": "integer" }, "example": -1 }, "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" }, "service": { "type": "string" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "service": "App\\Exceptions\\Services\\Form\\FormException", "message": "father_df_options_has_none_compatible_possibility", "error": "The father class possibilities has none compatible form with given attributes" } } } } }, "tags": [ "dynamic-forms" ], "description": "Responder um formulário dinâmico. Essa requisição recebe dois principais atributos:\n\n- Identificação do formulário (`target`): Aqui é usado um objeto com propriedades variáveis, são usados para identificar qual formulário será respondido.\n \n- Respostas (`answers`): Um array com objetos, cada objeto contendo `id` e `answer`, sendo o ID do campo do formulário e answer sendo a resposta que este campo receberá.", "requestBody": { "content": { "application/json": { "schema": { "description": "Dados para responder um formulário dinâmico", "title": "SetFormAnswers", "type": "object", "properties": { "target": { "type": "object", "title": "Target", "description": "Objeto que descreve o alvo do formulário dinâmico", "properties": { "pivot_class": { "type": "string", "enum": [ "project", "contact", "customer", "projectfunnelassignment", "projectlooseform", "projectstepform" ], "example": "project" }, "father_class": { "type": "string", "enum": [ "project", "contact", "customer", "projectfunnelassignment", "projectlooseform", "projectstepform" ], "example": "project" }, "form_id": { "type": "integer", "example": 43, "description": "ID do formulário" }, "related_model_attribute_id": { "type": "string", "example": "9ee8c42a-909e-4502-a1e9-4431245c5455", "description": "Necessário quando pivot_class é 'Project'.", "format": "uuid" }, "id": { "example": "9ee8c42a-909e-4502-a1e9-4431245c5455", "description": "Necessário quando pivot_class é 'Project' ou 'ProjectLooseForm'. É o ID da classe que detém o formulário", "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "project_funnel_id": { "type": "integer", "example": 129, "description": "Necessário quando pivot_class é 'ProjectFunnelAssignment'." }, "project_id": { "type": "string", "example": "9ee8c42a-909e-4502-a1e9-4431245c5455", "description": "Necessário quando pivot_class é 'ProjectFunnelAssignment', 'ProjectLooseForm' ou 'ProjectStepForm'.", "format": "uuid" }, "funnel_step_id": { "type": "integer", "example": 402, "description": "Necessário quando pivot_class é 'ProjectStepForm'." }, "father_id": { "type": "string", "example": "9ee8c42a-909e-4502-a1e9-4431245c5455", "format": "uuid" } }, "required": [ "father_class", "father_id", "pivot_class", "form_id" ] }, "form_answers": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "example": 179, "description": "ID do campo do formulário" }, "answer": { "example": "exemple", "anyOf": [ { "type": "string" }, { "type": "array", "items": {} } ] } }, "required": [ "id", "answer" ] } } } }, "example": { "target": { "father_class": "project", "father_id": "00000000-0000-0000-0000-000000000000", "pivot_class": "project", "form_id": 0, "related_model_attribute_id": "00000000-0000-0000-0000-000000000000", "id": "00000000-0000-0000-0000-000000000000", "project_funnel_id": 0, "project_id": "00000000-0000-0000-0000-000000000000", "funnel_step_id": 0 }, "form_answers": [ { "id": 0, "answer": "" }, { "id": 0, "answer": "" } ] } } } } } }, "/api/management/dynamic-forms/get-form-answers": { "post": { "summary": "Consultar respostas de formulário dinâmico", "responses": { "200": { "description": "Respostas do formulário retornadas com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": true }, "answers": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "example": 179 }, "label": { "type": "string", "example": "Texto curto" }, "answer": { "type": "string", "example": "exemplo de texto" }, "model": { "type": "string", "example": "Project" }, "answered_by": { "type": "string", "example": "9e1392ce-36ff-4984-bb9f-d69fd018b819", "format": "uuid" }, "updated_at": { "type": "string", "example": "2025-05-15T13:25:01.000000Z", "format": "date-time" } } } }, "last_updated_at": { "type": "string", "example": "2025-05-15T13:25:01.000000Z", "format": "date-time" } } }, "example": { "response": "", "answers": [ { "id": "", "label": "", "answer": "", "model": "", "answered_by": "", "updated_at": "" }, { "id": "", "label": "", "answer": "", "model": "", "answered_by": "", "updated_at": "" } ], "last_updated_at": "" } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "unauthorized" }, "error": { "type": "string", "example": "Unauthenticated." } } }, "example": { "response": "", "message": "", "error": "" } } } }, "422": { "description": "Erro de validação", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "validation_errors" }, "error": { "type": "string", "example": "O campo [nome_campo] é obrigatório." }, "validation": { "type": "object", "example": { "[nome_campo]": [ "O campo [nome_campo] é obrigatório." ] } } } }, "example": { "response": "", "message": "", "error": "", "validation": {} } } } } }, "tags": [ "dynamic-forms" ], "description": "Recebe informações de vínculo entre um modelo e um formulário dinâmico, e retorna as respostas previamente salvas para esse formulário.", "requestBody": { "content": { "application/json": { "schema": { "description": "Objeto que descreve o alvo do formulário dinâmico", "title": "Target", "type": "object", "properties": { "pivot_class": { "type": "string", "example": "App\\Models\\Project" }, "form_id": { "type": "integer", "example": 43 }, "related_model_attribute_id": { "type": "string", "example": "9ee8c42a-909e-4502-a1e9-4431245c5455", "description": "Necessário quando pivot_class é 'Project'.", "format": "uuid" }, "id": { "type": "string", "example": "9ee8c42a-909e-4502-a1e9-4431245c5455", "description": "Necessário quando pivot_class é 'Project' ou 'ProjectLooseForm'." }, "project_funnel_id": { "type": "integer", "example": 129, "description": "Necessário quando pivot_class é 'ProjectFunnelAssignment'." }, "project_id": { "type": "string", "example": "9ee8c42a-909e-4502-a1e9-4431245c5455", "description": "Necessário quando pivot_class é 'ProjectFunnelAssignment', 'ProjectLooseForm' ou 'ProjectStepForm'.", "format": "uuid" }, "funnel_step_id": { "type": "integer", "example": 402, "description": "Necessário quando pivot_class é 'ProjectStepForm'." }, "father_class": { "type": "string", "example": "project" }, "father_id": { "type": "string", "example": "9ee8c42a-909e-4502-a1e9-4431245c5455", "format": "uuid" } }, "required": [ "father_class", "father_id", "pivot_class", "form_id" ] }, "example": { "father_class": "", "father_id": "", "pivot_class": "", "form_id": "", "related_model_attribute_id": "", "id": "", "project_funnel_id": "", "project_id": "", "funnel_step_id": "" } } } } } }, "/api/management/form-publications/{form_publication_token}/form": { "get": { "tags": [ "form-publications", "form" ], "summary": "Obter formulário da publicação de formulário", "description": "Obter formulário da publicação de formulário", "operationId": "obterFormulRioDaPublicaODeFormulRio", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "form_publication_token", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/form-publications/{form_publication_id}/restore": { "post": { "tags": [ "form-publications", "restore" ], "summary": "Restaurar publicação do formulário", "description": "Restaura uma publicação de formulário que foi deletada.", "operationId": "restaurarPublicaODoFormulRio", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": {} } } } }, "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "form_publication_id", "in": "path", "required": true, "schema": { "type": "string", "example": "019b8f40-ce05-73b8-8c20-b29eb6e5b299" }, "example": "019b8f40-ce05-73b8-8c20-b29eb6e5b299" } ] }, "/api/management/form-publications/{form_publication}/change-token": { "post": { "tags": [ "form-publications", "change-token" ], "summary": "Alterar token de uma publicação de formulário", "description": "Altera o token de acesso de uma publicação de formulário.", "operationId": "alterarTokenDeUmaPublicaODeFormulRio", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "form_publication", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/form-publications/{form_publication}/responses": { "get": { "tags": [ "form-publications", "responses" ], "summary": "Obter respostas de uma publicação de formulário", "description": "Lista todas as respostas de uma publicação de formulário.", "operationId": "obterRespostasDeUmaPublicaODeFormulRio", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "form_publication", "in": "path", "required": true, "schema": { "type": "string", "example": "" }, "example": "" } ] }, "/api/management/form-publications": { "get": { "tags": [ "form-publications" ], "summary": "Listar publicações de formulários", "description": "Lista todas as publicações de formulários.", "operationId": "listarPublicaEsDeFormulRios", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "form-publications" ], "summary": "Criar publicação de formulário", "description": "Cria uma nova publicação de formulário.", "operationId": "criarPublicaODeFormulRio", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": {}, "example": [] }, "examples": { "Criar publicação de formulário": { "value": [] } } } } }, "responses": { "200": { "description": "200" } } } }, "/api/management/form-publications/{form_publication}": { "get": { "tags": [ "form-publications" ], "summary": "Obter uma publicação de formulário", "description": "Exibe os detalhes de uma publicação de formulário.", "operationId": "obterUmaPublicaODeFormulRio", "responses": { "200": { "description": "200" } } }, "put": { "tags": [ "form-publications" ], "summary": "Editar publicação de formulário", "description": "Atualiza uma publicação de formulário.", "operationId": "editarPublicaODeFormulRio", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": {}, "example": [] }, "examples": { "Editar publicação de formulário": { "value": [] } } } } }, "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "form-publications" ], "summary": "Deletar publicação de formulário", "description": "Deleta uma publicação de formulário.", "operationId": "deletarPublicaODeFormulRio", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "form_publication", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/answers-history/index": { "post": { "tags": [ "answers-history", "index" ], "summary": "Listar histórico de respostas de formulário", "description": "Listar registros do histórico de respostas de formulário com filtros e critérios específicos.", "operationId": "listarHistRicoDeRespostasDeFormulRio", "responses": { "200": { "description": "200" } } } }, "/api/management/answers-history": { "post": { "tags": [ "answers-history" ], "summary": "Criar histórico de respostas de um formulário", "description": "Criar um novo registro de histórico de respostas de um formulário.", "operationId": "criarHistRicoDeRespostasDeUmFormulRio", "responses": { "200": { "description": "200" } } } }, "/api/management/answers-history/{answers_history}": { "get": { "tags": [ "answers-history" ], "summary": "Obter histórico de respostas de formulário específico", "description": "Obter detalhes de um registro específico do histórico de respostas de formulário.", "operationId": "obterHistRicoDeRespostasDeFormulRioEspecFico", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "answers_history", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/ai/agents/executions": { "get": { "tags": [ "ai-agents", "agents", "executions" ], "summary": "Listar execuções de agentes", "description": "Listar todas as execuções de agentes de IA.", "operationId": "listarExecuEsDeAgentes", "responses": { "200": { "description": "200" } } } }, "/api/management/ai/agents/executions/{execution}": { "get": { "tags": [ "ai-agents", "agents", "executions" ], "summary": "Obter execução de agente específica", "description": "Obter detalhes de uma execução específica de agente de IA.", "operationId": "obterExecuODeAgenteEspecFica", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "execution", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/ai/agents/{agentId}/execute": { "post": { "tags": [ "ai-agents", "agents", "execute" ], "summary": "Executar agente", "description": "Executar um agente de IA específico.", "operationId": "executarAgente", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/ai/agents/{agentId}/contexts/reorder": { "put": { "tags": [ "ai-agents", "agents", "contexts", "reorder" ], "summary": "Reordenar contextos do agente", "description": "Reordenar a sequência dos contextos de um agente de IA.", "operationId": "reordenarContextosDoAgente", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/ai/agents/{agentId}/contexts": { "get": { "tags": [ "ai-agents", "agents", "contexts" ], "summary": "Listar contextos do agente", "description": "Listar todos os contextos associados a um agente de IA específico.", "operationId": "listarContextosDoAgente", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "ai-agents", "agents", "contexts" ], "summary": "Criar contexto do agente", "description": "Criar um novo contexto para um agente de IA específico.", "operationId": "criarContextoDoAgente", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/ai/agents/{agentId}/contexts/{contextId}": { "put": { "tags": [ "ai-agents", "agents", "contexts" ], "summary": "Atualizar contexto do agente", "description": "Atualizar dados de um contexto específico de um agente de IA.", "operationId": "atualizarContextoDoAgente", "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "ai-agents", "agents", "contexts" ], "summary": "Deletar contexto do agente", "description": "Deletar um contexto específico de um agente de IA.", "operationId": "deletarContextoDoAgente", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" }, { "name": "contextId", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/ai/agents": { "get": { "tags": [ "ai-agents", "agents" ], "summary": "Listar agentes de IA", "description": "Listar todos os agentes de IA.", "operationId": "listarAgentesDeIa", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "ai-agents", "agents" ], "summary": "Criar agente de IA", "description": "Criar um novo agente de IA.", "operationId": "criarAgenteDeIa", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "base_prompt": { "type": "string", "example": "sample_text" }, "default_model": { "type": "string", "example": "sample_text" }, "default_provider": { "type": "string", "example": "sample_text" }, "description": { "type": "string", "example": "sample_text" }, "name": { "type": "string", "example": "sample_text" }, "tools": { "type": "array", "items": {}, "example": [] } } }, "examples": { "Criar agente de IA": { "value": { "base_prompt": "sample_text", "default_model": "sample_text", "default_provider": "sample_text", "description": "sample_text", "name": "sample_text", "tools": [] } } } } } }, "responses": { "200": { "description": "200" } } } }, "/api/management/ai/agents/{agent}": { "get": { "tags": [ "ai-agents", "agents" ], "summary": "Obter agente de IA específico", "description": "Obter detalhes de um agente de IA específico.", "operationId": "obterAgenteDeIaEspecFico", "responses": { "200": { "description": "200" } } }, "put": { "tags": [ "ai-agents", "agents" ], "summary": "Atualizar agente de IA", "description": "Atualizar dados de um agente de IA específico.", "operationId": "atualizarAgenteDeIa", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "base_prompt": { "type": "string", "example": "sample_text" }, "default_model": { "type": "string", "example": "sample_text" }, "default_provider": { "type": "string", "example": "sample_text" }, "description": { "type": "string", "example": "sample_text" }, "name": { "type": "string", "example": "sample_text" }, "tools": { "type": "array", "items": {}, "example": [] } } }, "examples": { "Atualizar agente de IA": { "value": { "base_prompt": "sample_text", "default_model": "sample_text", "default_provider": "sample_text", "description": "sample_text", "name": "sample_text", "tools": [] } } } } } }, "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "ai-agents", "agents" ], "summary": "Deletar agente de IA", "description": "Deletar um agente de IA específico do sistema.", "operationId": "deletarAgenteDeIa", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "agent", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/ai/available-models": { "get": { "tags": [ "ai-agents", "available-models" ], "summary": "Listar modelos disponíveis", "description": "Listar todos os modelos de IA disponíveis para uso.", "operationId": "listarModelosDisponVeis", "responses": { "200": { "description": "200" } } } }, "/api/management/ai/available-tools": { "get": { "tags": [ "ai-agents", "available-tools" ], "summary": "Listar ferramentas disponíveis", "description": "Listar todas as ferramentas disponíveis para uso com agentes de IA.", "operationId": "listarFerramentasDisponVeis", "responses": { "200": { "description": "200" } } } }, "/api/management/business-areas/{id}/restore": { "post": { "tags": [ "business-areas", "restore" ], "summary": "Restaurar área de negócio", "description": "Restaurar uma área de negócio que foi arquivada anteriormente.", "operationId": "restaurarReaDeNegCio", "responses": { "200": { "description": "Restaurar área de negócio", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 19:57:11 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 153 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" }, "example": 1444 } ] }, "/api/management/business-areas/reorder": { "post": { "tags": [ "business-areas", "reorder" ], "summary": "Reordenar áreas de negócio", "description": "Reordenar a sequência das áreas de negócio no sistema.", "operationId": "reordenarReasDeNegCio", "responses": { "200": { "description": "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 19:58:55 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 150 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "business_area_ids": { "type": "array", "items": {} } } }, "example": { "business_area_ids": [] } } } } } }, "/api/management/business-areas": { "get": { "tags": [ "business-areas" ], "summary": "Listar áreas de negócio", "description": "Listar todas as áreas de negócio.", "operationId": "listarReasDeNegCio", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "business-areas" ], "summary": "Criar uma área de negócio", "description": "Criar uma nova área de negócio.", "operationId": "criarReaDeNegCio", "responses": { "200": { "description": "200" } } } }, "/api/management/business-areas/{business_area}": { "put": { "tags": [ "business-areas" ], "summary": "Atualizar uma área de negócio", "description": "Atualizar dados de uma área de negócio específica.", "operationId": "atualizarReaDeNegCio", "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "business-areas" ], "summary": "Arquivar uma área de negócio", "description": "Arquivar uma área de negócio específica do sistema.", "operationId": "arquivarReaDeNegCio", "responses": { "200": { "description": "200", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 15 Jan 2026 19:56:39 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 149 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } } } }, "parameters": [ { "name": "business_area", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/goals/{goal}/results": { "get": { "tags": [ "goals", "results" ], "summary": "Listar resultados de uma meta", "description": "Retorna todos os resultados de uma meta específica, ordenados por período (period).", "operationId": "listarResultadosDeUmaMeta", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "goal", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/goals/{goal}/results/{result}": { "delete": { "tags": [ "goals", "results" ], "summary": "Deletar um resultado específico de uma meta", "description": "Deletar resultado específico de uma meta", "operationId": "deletarResultadoEspecFicoDeUmaMeta", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "goal", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" }, { "name": "result", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/goals": { "get": { "tags": [ "goals" ], "summary": "Listar metas", "description": "Retorna a lista paginada de metas, ordenada por status (ativas primeiro) e por data de criação decrescente. Cada meta inclui suas metas filhas, a contagem de resultados e a variação percentual de progresso em relação ao último resultado registrado.", "operationId": "listarMetas", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "goals": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "string" }, "start_date": { "type": "string", "format": "date" }, "end_date": { "type": "string", "format": "date" }, "periodicity": { "type": "integer" }, "type": { "type": "string" }, "user_id": { "type": "string", "description": "ID do usuário associado à meta (tipos projects_created_by_user e funnel_steps_links_by_user).", "format": "uuid" }, "funnel_step_id": { "type": "integer", "description": "ID da etapa do funil (tipos funnel_steps_links e funnel_steps_links_by_user)." }, "target": { "type": "integer" }, "unit": { "type": "string" }, "comparison_mode": { "type": "string" }, "progress": { "type": "integer" }, "children": { "type": "array", "items": {} }, "progress_change_percentage": { "type": "integer" }, "percentage": { "type": "integer" }, "results_count": { "type": "integer" }, "is_past_calculable": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "meta": { "type": "object", "properties": { "current_page": { "type": "integer" }, "from": { "type": "integer" }, "last_page": { "type": "integer" }, "per_page": { "type": "integer" }, "to": { "type": "integer" }, "total": { "type": "integer" } } }, "response": { "type": "boolean" } } }, "example": { "goals": [ { "id": "9b2d1f4a-3c5e-4a7b-8d9f-1e2c3a4b5c6d", "title": "Projetos criados no mês", "description": "Total de novos projetos abertos no período.", "status": "active", "start_date": "2026-01-01", "end_date": "2026-12-31", "periodicity": 30, "type": "projects_created", "user_id": null, "funnel_step_id": null, "target": 50, "unit": "count", "comparison_mode": "target", "progress": 32, "children": [], "progress_change_percentage": 14, "percentage": 64, "results_count": 4, "is_past_calculable": true, "created_at": "2026-01-06T14:45:51.000000Z", "updated_at": "2026-01-20T09:12:03.000000Z", "deleted_at": null }, { "id": "7a1c8e2b-9d4f-4e6a-b3c7-5f8d2a1b9c0e", "title": "Faturamento trimestral", "description": null, "status": "active", "start_date": "2026-01-01", "end_date": null, "periodicity": 90, "type": "composite", "user_id": null, "funnel_step_id": null, "target": 100000, "unit": "currency", "comparison_mode": "target", "progress": 48000, "children": [ { "id": "1f3b6d9c-2e5a-4c8b-9a7d-3e6f1b2c4d5e", "title": "Vendas via funil de marketing", "description": null, "status": "active", "start_date": "2026-01-01", "end_date": null, "periodicity": 90, "type": "funnel_steps_links", "user_id": null, "funnel_step_id": 310, "target": 60000, "unit": "currency", "comparison_mode": "target", "progress": 30000, "progress_change_percentage": 0, "percentage": 50, "is_past_calculable": true, "created_at": "2026-01-06T14:50:10.000000Z", "updated_at": "2026-01-20T09:12:03.000000Z", "deleted_at": null } ], "progress_change_percentage": 8, "percentage": 48, "results_count": 1, "is_past_calculable": false, "created_at": "2026-01-06T15:02:44.000000Z", "updated_at": "2026-01-20T09:12:03.000000Z", "deleted_at": null } ], "meta": { "current_page": 1, "from": 1, "last_page": 1, "per_page": 30, "to": 2, "total": 2 }, "response": true } } } } }, "parameters": [ { "name": "filter[title]", "in": "query", "description": "Filtra por título (correspondência parcial).", "schema": { "type": "string" }, "example": "" }, { "name": "filter[status]", "in": "query", "description": "Filtra pelo status exato: active, inactive ou completed.", "schema": { "type": "string", "enum": [ "active", " inactive", " completed" ] }, "example": "" }, { "name": "filter[type]", "in": "query", "description": "Filtra pelo tipo exato: manual, projects_created, projects_created_by_user, funnel_steps_links, funnel_steps_links_by_user ou composite.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[comparison_mode]", "in": "query", "description": "Filtra pelo modo de comparação: target (atingir a meta) ou limit (não ultrapassar).", "schema": { "type": "string" }, "example": "" }, { "name": "filter[periodicity]", "in": "query", "description": "Filtra pela periodicidade exata, em dias.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[user_id]", "in": "query", "description": "Filtra metas cujo user_id corresponde ao ID do usuário informado.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[funnel_step_id]", "in": "query", "description": "Filtra metas cujo funnel_step_id corresponde ao ID da etapa de funil informada.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[start_date_gte]", "in": "query", "description": "Retorna metas com data de início maior ou igual à data informada (YYYY-MM-DD).", "schema": { "type": "string" }, "example": "" }, { "name": "filter[end_date_lte]", "in": "query", "description": "Retorna metas com data de término menor ou igual à data informada (YYYY-MM-DD).", "schema": { "type": "string" }, "example": "" }, { "name": "filter[trashed]", "in": "query", "description": "Controla metas removidas (soft delete): with inclui removidas, only retorna apenas removidas, without (padrão) as ignora.", "schema": { "type": "string" }, "example": "" }, { "name": "sort", "in": "query", "description": "Ordenação. Nome do campo para ascendente ou prefixado com '-' para descendente; múltiplos separados por vírgula. Campos: title, status, created_at, updated_at, start_date, end_date, target, progress, periodicity. Padrão: status,-created_at.", "schema": { "type": "string" }, "example": "" }, { "name": "page", "in": "query", "description": "Número da página. Padrão 1.", "schema": { "type": "string" }, "example": "" }, { "name": "perPage", "in": "query", "description": "Itens por página. Padrão 30, máximo 100.", "schema": { "type": "string" }, "example": "" } ] }, "post": { "tags": [ "goals" ], "summary": "Criar uma meta", "description": "Cria uma nova meta. Permite associar metas filhas (children) para metas compostas. Após a criação, executa o cálculo persistente do progresso.", "operationId": "criarMeta", "requestBody": { "content": { "application/json": { "schema": { "title": "Criação de Meta", "description": "Payload para criação de metas de diferentes tipos.", "oneOf": [ { "title": "Meta Manual", "type": "object", "properties": { "title": { "type": "string", "maxLength": 191, "example": "Nova meta", "description": "Título da meta." }, "description": { "type": "string", "example": "Descrição da meta", "description": "Descrição detalhada da meta." }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "manual" ], "example": "manual", "description": "Tipo da meta." }, "periodicity": { "type": "integer", "example": 1, "description": "Periodicidade da meta." }, "target": { "type": "number", "example": 10, "description": "Valor alvo da meta." }, "unit": { "type": "string", "example": "count", "description": "Unidade utilizada na meta." }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target", "description": "Modo de comparação utilizado para validação da meta." }, "progress": { "type": "number", "example": 1, "description": "Progresso inicial da meta manual." }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27", "description": "Data de início da meta." }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05", "description": "Data final da meta." }, "children": { "type": "array", "description": "Lista de metas filhas.", "items": { "type": "string", "format": "uuid" }, "example": [] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "progress", "start_date", "end_date" ] }, { "title": "Meta de Projetos Criados", "type": "object", "properties": { "title": { "type": "string", "example": "Nova meta" }, "description": { "type": "string", "example": "Descrição da meta" }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "projects_created" ], "example": "projects_created" }, "periodicity": { "type": "integer", "example": 1 }, "target": { "type": "number", "example": 10 }, "unit": { "type": "string", "example": "count" }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target" }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27" }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05" }, "children": { "type": "array", "items": { "type": "string", "format": "uuid" }, "example": [] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "start_date", "end_date" ] }, { "title": "Meta de Projetos Criados por Usuário", "type": "object", "properties": { "title": { "type": "string", "example": "Nova meta" }, "description": { "type": "string", "example": "Descrição da meta" }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "projects_created_by_user" ], "example": "projects_created_by_user" }, "periodicity": { "type": "integer", "example": 1 }, "target": { "type": "number", "example": 10 }, "unit": { "type": "string", "example": "count" }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target" }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27" }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05" }, "user_id": { "type": "string", "format": "uuid", "example": "019c75de-5124-71d6-8698-271e32b743ce", "description": "ID do usuário associado à meta." }, "children": { "type": "array", "items": { "type": "string", "format": "uuid" }, "example": [] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "start_date", "end_date", "user_id" ] }, { "title": "Meta de Projetos em Etapa", "type": "object", "properties": { "title": { "type": "string", "example": "Nova meta" }, "description": { "type": "string", "example": "Descrição da meta" }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "funnel_steps_links" ], "example": "funnel_steps_links" }, "periodicity": { "type": "integer", "example": 1 }, "target": { "type": "number", "example": 10 }, "unit": { "type": "string", "example": "count" }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target" }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27" }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05" }, "funnel_step_id": { "type": "integer", "example": 310, "description": "ID da etapa do funil." }, "children": { "type": "array", "items": { "type": "string", "format": "uuid" }, "example": [] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "start_date", "end_date", "funnel_step_id" ] }, { "title": "Meta de Projetos em Etapa por Usuário", "type": "object", "properties": { "title": { "type": "string", "example": "Nova meta" }, "description": { "type": "string", "example": "Descrição da meta" }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "funnel_steps_links_by_user" ], "example": "funnel_steps_links_by_user" }, "periodicity": { "type": "integer", "example": 1 }, "target": { "type": "number", "example": 10 }, "unit": { "type": "string", "example": "count" }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target" }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27" }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05" }, "funnel_step_id": { "type": "integer", "example": 197, "description": "ID da etapa do funil." }, "user_id": { "type": "string", "format": "uuid", "example": "019c75de-5124-71d6-8698-271e32b743ce", "description": "ID do usuário associado à meta." }, "children": { "type": "array", "items": { "type": "string", "format": "uuid" }, "example": [] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "start_date", "end_date", "funnel_step_id", "user_id" ] }, { "title": "Meta Composta", "type": "object", "properties": { "title": { "type": "string", "example": "Nova meta" }, "description": { "type": "string", "example": "Descrição da meta" }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "composite" ], "example": "composite" }, "periodicity": { "type": "integer", "example": 1 }, "target": { "type": "number", "example": 10 }, "unit": { "type": "string", "example": "count" }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target" }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27" }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05" }, "children": { "type": "array", "description": "Lista de UUIDs das metas filhas que compõem esta meta.", "items": { "type": "string", "format": "uuid" }, "example": [ "019e69d4-a622-7284-853c-762316b97783", "019e69d2-a05d-71b8-8092-71ef4698c5ba" ] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "start_date", "end_date", "children" ] } ] }, "examples": { "Criar meta": { "value": { "title": "Nova meta", "description": "Descrição da meta", "status": "active", "type": "funnel_steps_links_by_user", "periodicity": 1, "target": 10, "unit": "count", "comparison_mode": "target", "start_date": "2026-05-27", "end_date": "2026-06-05", "children": [], "funnel_step_id": 197, "user_id": "019c75de-5124-71d6-8698-271e32b743ce" } } } } } }, "responses": { "200": { "description": "200" } } } }, "/api/management/goals/{goal}": { "get": { "tags": [ "goals" ], "summary": "Obter detalhes de uma meta", "description": "Retorna os detalhes de uma meta específica, incluindo contagem de resultados e metas filhas. Aceita parâmetro de query \\`refresh\\` para recalcular o progresso.", "operationId": "obterDetalhesDeUmaMeta", "responses": { "200": { "description": "200" } } }, "put": { "tags": [ "goals" ], "summary": "Atualizar informações de uma meta", "description": "Atualiza as informações de uma meta existente, incluindo a sincronização de metas filhas (children). Após a atualização, executa o cálculo persistente do progresso.", "operationId": "atualizarInformaEsDeUmaMeta", "requestBody": { "content": { "application/json": { "schema": { "title": "Edição de meta", "description": "Payload para edição de uma meta de diferentes tipos.", "oneOf": [ { "title": "Meta Manual", "type": "object", "properties": { "title": { "type": "string", "maxLength": 191, "example": "Nova meta", "description": "Título da meta." }, "description": { "type": "string", "example": "Descrição da meta", "description": "Descrição detalhada da meta." }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "manual" ], "example": "manual", "description": "Tipo da meta." }, "periodicity": { "type": "integer", "example": 1, "description": "Periodicidade da meta." }, "target": { "type": "number", "example": 10, "description": "Valor alvo da meta." }, "unit": { "type": "string", "example": "count", "description": "Unidade utilizada na meta." }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target", "description": "Modo de comparação utilizado para validação da meta." }, "progress": { "type": "number", "example": 1, "description": "Progresso inicial da meta manual." }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27", "description": "Data de início da meta." }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05", "description": "Data final da meta." }, "children": { "type": "array", "description": "Lista de metas filhas.", "items": { "type": "string", "format": "uuid" }, "example": [] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "progress", "start_date", "end_date" ] }, { "title": "Meta de Projetos Criados", "type": "object", "properties": { "title": { "type": "string", "example": "Nova meta" }, "description": { "type": "string", "example": "Descrição da meta" }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "projects_created" ], "example": "projects_created" }, "periodicity": { "type": "integer", "example": 1 }, "target": { "type": "number", "example": 10 }, "unit": { "type": "string", "example": "count" }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target" }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27" }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05" }, "children": { "type": "array", "items": { "type": "string", "format": "uuid" }, "example": [] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "start_date", "end_date" ] }, { "title": "Meta de Projetos Criados por Usuário", "type": "object", "properties": { "title": { "type": "string", "example": "Nova meta" }, "description": { "type": "string", "example": "Descrição da meta" }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "projects_created_by_user" ], "example": "projects_created_by_user" }, "periodicity": { "type": "integer", "example": 1 }, "target": { "type": "number", "example": 10 }, "unit": { "type": "string", "example": "count" }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target" }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27" }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05" }, "user_id": { "type": "string", "format": "uuid", "example": "019c75de-5124-71d6-8698-271e32b743ce", "description": "ID do usuário associado à meta." }, "children": { "type": "array", "items": { "type": "string", "format": "uuid" }, "example": [] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "start_date", "end_date", "user_id" ] }, { "title": "Meta de Projetos em Etapa", "type": "object", "properties": { "title": { "type": "string", "example": "Nova meta" }, "description": { "type": "string", "example": "Descrição da meta" }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "funnel_steps_links" ], "example": "funnel_steps_links" }, "periodicity": { "type": "integer", "example": 1 }, "target": { "type": "number", "example": 10 }, "unit": { "type": "string", "example": "count" }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target" }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27" }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05" }, "funnel_step_id": { "type": "integer", "example": 310, "description": "ID da etapa do funil." }, "children": { "type": "array", "items": { "type": "string", "format": "uuid" }, "example": [] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "start_date", "end_date", "funnel_step_id" ] }, { "title": "Meta de Projetos em Etapa por Usuário", "type": "object", "properties": { "title": { "type": "string", "example": "Nova meta" }, "description": { "type": "string", "example": "Descrição da meta" }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "funnel_steps_links_by_user" ], "example": "funnel_steps_links_by_user" }, "periodicity": { "type": "integer", "example": 1 }, "target": { "type": "number", "example": 10 }, "unit": { "type": "string", "example": "count" }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target" }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27" }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05" }, "funnel_step_id": { "type": "integer", "example": 197, "description": "ID da etapa do funil." }, "user_id": { "type": "string", "format": "uuid", "example": "019c75de-5124-71d6-8698-271e32b743ce", "description": "ID do usuário associado à meta." }, "children": { "type": "array", "items": { "type": "string", "format": "uuid" }, "example": [] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "start_date", "end_date", "funnel_step_id", "user_id" ] }, { "title": "Meta Composta", "type": "object", "properties": { "title": { "type": "string", "example": "Nova meta" }, "description": { "type": "string", "example": "Descrição da meta" }, "status": { "type": "string", "enum": [ "active", "inactive", "completed" ], "example": "active", "description": "Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída)." }, "type": { "type": "string", "enum": [ "composite" ], "example": "composite" }, "periodicity": { "type": "integer", "example": 1 }, "target": { "type": "number", "example": 10 }, "unit": { "type": "string", "example": "count" }, "comparison_mode": { "type": "string", "enum": [ "target" ], "example": "target" }, "start_date": { "type": "string", "format": "date", "example": "2026-05-27" }, "end_date": { "type": "string", "format": "date", "example": "2026-06-05" }, "children": { "type": "array", "description": "Lista de UUIDs das metas filhas que compõem esta meta.", "items": { "type": "string", "format": "uuid" }, "example": [ "019e69d4-a622-7284-853c-762316b97783", "019e69d2-a05d-71b8-8092-71ef4698c5ba" ] } }, "required": [ "title", "status", "type", "periodicity", "target", "unit", "comparison_mode", "start_date", "end_date", "children" ] } ] }, "examples": { "Atualizar informações de uma meta": { "value": { "title": "Novo título", "description": "Descrição da meta", "status": "active", "start_date": "2026-05-27", "end_date": "2026-06-05", "periodicity": 1, "type": "funnel_steps_links_by_user", "funnel_step_id": 197, "user_id": "019c75de-50f0-7366-a948-b8cbdd1841be", "target": 10, "unit": "count", "comparison_mode": "target", "children": [], "progress_change_percentage": 0, "percentage": 0, "results_count": 0, "is_past_calculable": true, "created_at": "2026-05-27T15:14:25.000000Z", "updated_at": "2026-05-27T15:14:25.000000Z", "deleted_at": null } } } } } }, "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "goals" ], "summary": "Deletar uma meta", "description": "Deletar uma meta", "operationId": "deletarUmaMeta", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "goal", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/automations/{automation}/logs": { "get": { "tags": [ "automations", "logs" ], "summary": "Obter registro de execuções da automação", "description": "Obter registro de execução de uma automação específica.", "operationId": "obterRegistroDeExecuEsDaAutomaO", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "automation", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/automations": { "get": { "tags": [ "automations" ], "summary": "Listar automações", "description": "Listar todas as automações.", "operationId": "listarAutomaEs", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "automations" ], "summary": "Criar uma automação", "description": "Criar uma nova automação.", "operationId": "criarAutomaO", "responses": { "200": { "description": "200" } } } }, "/api/management/automations/{automation}": { "get": { "tags": [ "automations" ], "summary": "Obter automação específica", "description": "Obter detalhes de uma automação específica.", "operationId": "obterAutomaOEspecFica", "responses": { "200": { "description": "200" } } }, "put": { "tags": [ "automations" ], "summary": "Atualizar automação", "description": "Atualizar dados de uma automação específica.", "operationId": "atualizarAutomaO", "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "automations" ], "summary": "Deletar automação", "description": "Deletar uma automação específica.", "operationId": "deletarAutomaO", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "automation", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/get-user": { "post": { "tags": [ "users" ], "summary": "Obter detalhes de um usuário específico", "description": "Retorna os dados de um usuário específico, incluindo seus vínculos (relationships) com frame e jornadas de trabalho, squads e aliases. Retorna `response: false` quando o usuário informado não é encontrado.", "operationId": "obterDetalhesDeUmUsuRioEspecFico", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "description": "Indica sucesso da requisição (true)." }, "user": { "type": "object", "description": "Dados do usuário encontrado.", "properties": { "id": { "type": "string", "description": "ID (UUID) do usuário.", "format": "uuid" }, "name": { "type": "string", "description": "Nome do usuário." }, "email": { "type": "string", "description": "E-mail do usuário.", "format": "email" }, "lang": { "type": "string", "description": "Idioma preferido do usuário (ex.: pt-BR)." }, "description": { "type": "string", "description": "Descrição/cargo do usuário, ou null." }, "is_partner": { "type": "boolean", "description": "Se o usuário é parceiro." }, "partner_approved_at": { "type": "string", "description": "Data/hora de aprovação como parceiro, ou null.", "format": "date-time" }, "partner_approved_by": { "type": "string", "description": "ID de quem aprovou o parceiro, ou null." }, "email_verified_at": { "type": "string", "description": "Data/hora de verificação do e-mail, ou null.", "format": "date-time" }, "relationships": { "type": "array", "description": "Vínculos do usuário com frames (cada item traz frame e jornadas de trabalho).", "items": { "description": "Vínculo (relationship) do usuário com um frame.", "type": "object" } }, "squads": { "type": "array", "description": "Squads das quais o usuário participa.", "items": { "description": "Squad do usuário.", "type": "object" } }, "aliases": { "type": "array", "description": "Aliases (apelidos) do usuário.", "items": {} } } } } }, "examples": { "Sucesso": { "value": { "response": true, "user": { "id": "9c2f1a54-0f3b-4d2e-8a1c-6e7b2d4f9a01", "name": "Ana Souza", "email": "ana.souza@empresa.com", "lang": "pt-BR", "description": "Designer de produto", "is_partner": false, "partner_approved_at": null, "partner_approved_by": null, "email_verified_at": "2026-01-04T12:00:00.000000Z", "relationships": [ { "id": "3d8e7c21-5b9a-4f6d-9c0e-1a2b3c4d5e6f", "user_id": "9c2f1a54-0f3b-4d2e-8a1c-6e7b2d4f9a01", "frame_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", "frame": { "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", "name": "Empresa Exemplo", "subdomain": "empresa" }, "workdays": [ { "id": "7f6e5d4c-3b2a-1908-7654-321fedcba098", "weekday": 1, "start_time": "09:00:00", "end_time": "18:00:00" } ] } ], "squads": [ { "id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e", "name": "Produto", "pivot": { "user_id": "9c2f1a54-0f3b-4d2e-8a1c-6e7b2d4f9a01", "squad_id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e", "type": "member" } } ], "aliases": [] } } }, "Usuário não encontrado": { "value": { "response": false } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "user_id": { "type": "string", "description": "ID (UUID) do usuário a ser consultado. Deve pertencer ao frame atual.", "format": "uuid" } }, "required": [ "user_id" ] }, "example": { "user_id": null } } }, "required": true } } }, "/api/management/squads/{squad}/users": { "get": { "tags": [ "squads", "users" ], "summary": "Listar usuários associados a um squad", "description": "Listar usuários associados a um squad", "operationId": "listarUsuRiosAssociadosAUmSquad", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "squads", "users" ], "summary": "Adicionar um ou mais usuários a um squad como membros", "description": "Adicionar um ou mais usuários a um squad como membros", "operationId": "adicionarUmOuMaisUsuRiosAUmSquadComoMembros", "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": {}, "example": [] }, "examples": { "Adicionar um ou mais usuários a um squad como membros": { "value": [] } } } } }, "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "squad", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/squads/{squad}/users/{user}": { "put": { "tags": [ "squads", "users" ], "summary": "Atualizar tipo de um usuário no squad", "description": "Atualiza o tipo de um usuário no squad (MEMBER, LEADER, LEADER_SUBSTITUTE). Ao definir LEADER ou LEADER_SUBSTITUTE, remove automaticamente o tipo anterior de outros usuários.", "operationId": "atualizarTipoDeUmUsuRioNoSquad", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "type": "string", "example": "sample_text" } } }, "examples": { "Atualizar tipo de um usuário no squad": { "value": { "type": "sample_text" } } } } } }, "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "squads", "users" ], "summary": "Remover um usuário específico de um squad", "description": "Remove um usuário específico de um squad, desvinculando-o completamente.", "operationId": "removerUsuRioEspecFicoDeUmSquad", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "squad", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" }, { "name": "user", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/squads": { "get": { "tags": [ "squads" ], "summary": "Listar squads", "description": "Retorna uma lista de todos os squads do frame atual, incluindo até 10 usuários de cada squad.", "operationId": "listarSquads", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "squads" ], "summary": "Criar um squad", "description": "Criar squad", "operationId": "criarSquad", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "example": "sample_text" }, "description": { "type": "string", "example": "sample_text" }, "name": { "type": "string", "example": "sample_text" } } }, "examples": { "Criar squad": { "value": { "code": "sample_text", "description": "sample_text", "name": "sample_text" } } } } } }, "responses": { "200": { "description": "200" } } } }, "/api/management/squads/{squad}": { "get": { "tags": [ "squads" ], "summary": "Obter detalhes de um squad", "description": "Retorna os detalhes de um squad específico, incluindo todos os seus usuários.", "operationId": "obterDetalhesDeUmSquad", "responses": { "200": { "description": "200" } } }, "put": { "tags": [ "squads" ], "summary": "Atualizar informações de um squad", "description": "Atualiza as informações de um squad existente (código, nome e descrição).", "operationId": "atualizarInformaEsDeUmSquad", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "example": "sample_text" }, "description": { "type": "string", "example": "sample_text" }, "name": { "type": "string", "example": "sample_text" } } }, "examples": { "Atualizar informações de um squad": { "value": { "code": "sample_text", "description": "sample_text", "name": "sample_text" } } } } } }, "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "squads" ], "summary": "Deletar um squad", "description": "Delete um squad. Desvincula todos os usuários antes de excluir.", "operationId": "deletarUmSquad", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "squad", "in": "path", "required": true, "schema": { "type": "string", "example": "" }, "example": "" } ] }, "/api/management/user-alias": { "post": { "tags": [ "user-alias" ], "summary": "Criar alias de email para um usuário", "description": "Cria um novo alias de email para um usuário. Envia notificação de verificação de email para o alias criado.", "operationId": "criarAliasDeEmailParaUmUsuRio", "responses": { "200": { "description": "200" } } } }, "/api/management/user-alias/{user_alias}": { "get": { "tags": [ "user-alias" ], "summary": "Listar aliases de email de um usuário", "description": "Retorna todos os aliases de email de um usuário específico, incluindo o email primário.", "operationId": "listarAliasesDeEmailDeUmUsuRio", "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "user-alias" ], "summary": "Deletar alias de email de um usuário", "description": "Remove um alias de email de um usuário.", "operationId": "deletarAliasDeEmailDeUmUsuRio", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "user_alias", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/toggle-primary-user-alias": { "post": { "tags": [ "user-alias" ], "summary": "Definir ou remover o alias primário de um usuário", "description": "Define ou remove o alias primário de um usuário. Se um alias_id for fornecido, define-o como primário (apenas se já estiver verificado). Se alias_id for nulo, remove o alias primário atual.", "operationId": "definirOuRemoverOAliasPrimRioDeUmUsuRio", "responses": { "200": { "description": "200" } } } }, "/api/management/project-groups/{project_group}/projects/index": { "post": { "tags": [ "project-groups", "projects", "index" ], "summary": "Retornar uma lista de projetos associados a um grupo", "description": "Retorna uma lista paginada de projetos associados a um grupo específico, ordenados pela ordem definida no grupo. Inclui informações de porcentagem de conclusão e respostas de formulários dinâmicos. Suporta filtros e busca.", "operationId": "retornaUmaListaDeProjetosAssociadosAUmGrupo", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project_group", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/project-groups/{project_group}/projects/{project_id}/reorder": { "post": { "tags": [ "project-groups", "projects", "reorder" ], "summary": "Alterar a ordem de um projeto dentro de um grupo", "description": "Altera a ordem de um projeto dentro de um grupo específico, definindo uma nova posição para o projeto.", "operationId": "alteraAOrdemDeUmProjetoDentroDeUmGrupo", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project_group", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" }, { "name": "project_id", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/project-groups/{project_group}/projects": { "post": { "tags": [ "project-groups", "projects" ], "summary": "Associar um projeto a um grupo de projetos", "description": "Associa um projeto existente a um grupo de projetos. O projeto é adicionado ao final da lista do grupo.", "operationId": "associaUmProjetoAUmGrupoDeProjetos", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project_group", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/project-groups/{project_group}/projects/{project}": { "delete": { "tags": [ "project-groups", "projects" ], "summary": "Remover a associação de um projeto de um grupo de projetos", "description": "Remove a associação de um projeto de um grupo de projetos", "operationId": "removeAAssociaODeUmProjetoDeUmGrupoDeProjetos", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project_group", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" }, { "name": "project", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/project-groups": { "get": { "tags": [ "project-groups" ], "summary": "Listar grupos de projetos", "description": "Retorna uma lista de grupos de projetos. Inclui contagem de projetos em cada grupo. Suporta filtros por ID e busca por nome.", "operationId": "listarGruposDeProjetos", "responses": { "200": { "description": "200" } } }, "post": { "tags": [ "project-groups" ], "summary": "Criar um grupo de projetos", "description": "Criar grupo de projetos", "operationId": "criarGrupoDeProjetos", "responses": { "200": { "description": "200" } } } }, "/api/management/project-groups/{project_group}": { "get": { "tags": [ "project-groups" ], "summary": "Obter detalhes de um grupo de projetos", "description": "Obter detalhes de um grupo de projetos", "operationId": "obterDetalhesDeUmGrupoDeProjetos", "responses": { "200": { "description": "200" } } }, "put": { "tags": [ "project-groups" ], "summary": "Atualizar informações de um grupo de projetos", "description": "Atualizar informações de um grupo de projetos", "operationId": "atualizarInformaEsDeUmGrupoDeProjetos", "responses": { "200": { "description": "200" } } }, "delete": { "tags": [ "project-groups" ], "summary": "Deletar um grupo de projetos", "description": "Deletar grupo de projetos", "operationId": "deletarGrupoDeProjetos", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "project_group", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/system/get-meta-data": { "get": { "tags": [ "system", "get-meta-data" ], "summary": "Obter metadados de uma URL", "description": "Obter metadados de uma URL fornecida, extraindo as meta tags (Open Graph, description, etc.) do HTML retornado. Pode retornar os dados em formato EditorJs se especificado. Não funciona com URLs localhost.", "operationId": "obterMetadadosDeUmaUrl", "responses": { "200": { "description": "200" } } } }, "/api/management/system/params/{model_name}": { "get": { "tags": [ "system", "params" ], "summary": "Listar parâmetros disponíveis para filtragem de um modelo", "description": "Listar parâmetros disponíveis para filtragem de um modelo específico. Use esse endpoint para saber quais parâmetros disponibilizamos para cada objeto.\n\nLeia [aqui a documentação sobre parâmetros disponíveis](https://docs.olie.ai/api-reference/general/advanced-search#descobrindo-campos-dispon%C3%ADveis). Os parâmetros aqui listados são disponíveis apenas nas [buscas avançadas](https://docs.olie.ai/api-reference/general/advanced-search).", "operationId": "listarParMetrosDisponVeisParaFiltragemDeUmModelo", "responses": { "200": { "description": "Sucesso: projeto", "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" }, "Date": { "schema": { "type": "string" }, "example": "Mon, 19 Jan 2026 12:10:54 GMT" }, "X-Ratelimit-Limit": { "schema": { "type": "integer" }, "example": 160 }, "X-Ratelimit-Remaining": { "schema": { "type": "integer" }, "example": 159 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "enum": [ true ], "description": "Indicador de sucesso da requisição" }, "params": { "type": "object", "description": "Parâmetros disponíveis para filtros e ordenação do modelo", "properties": { "filters": { "type": "array", "description": "Lista de filtros disponíveis para o modelo", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Nome do campo que pode ser filtrado" }, "input_type": { "type": "string", "enum": [ "text", "number", "datetime-local", "date", "time", "email", "tel", "url" ], "description": "Tipo de input esperado para o filtro" }, "operators": { "type": "array", "description": "Operadores relacionais permitidos para este filtro", "items": { "type": "string" } }, "options": { "type": "array", "description": "Opções fixas disponíveis para o filtro (usado em campos enum/select)", "items": { "type": "object", "properties": { "label": { "description": "Rótulo da opção exibido ao usuário", "oneOf": [ { "type": "string" }, { "type": "number" } ] }, "value": { "description": "Valor da opção usado na query", "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "required": [ "label", "value" ] } }, "arguments": { "type": "array", "description": "Argumentos adicionais necessários para este filtro funcionar", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Identificador único do argumento" }, "label": { "type": "string", "description": "Rótulo descritivo do argumento" }, "required": { "type": "boolean", "description": "Indica se o argumento é obrigatório" }, "modelClass": { "type": "string", "description": "Classe do modelo associado ao argumento" }, "hydrate": { "type": "object", "description": "Configuração para popular/hidratar dados do argumento dinamicamente", "properties": { "route": { "type": "string", "description": "Rota da API para buscar as opções disponíveis" }, "options": { "type": "string", "description": "Chave do objeto de resposta que contém as opções" }, "key": { "type": "string", "description": "Campo usado como valor/identificador da opção" }, "label": { "type": "string", "description": "Campo usado como rótulo da opção" }, "children_key": { "type": "string", "description": "Chave para acessar opções filhas/aninhadas (opcional)" }, "children_label": { "type": "string", "description": "Campo usado como rótulo das opções filhas (opcional)" } }, "required": [ "route", "options", "key", "label", "children_key", "children_label" ] } }, "required": [ "id", "label", "required", "modelClass", "hydrate" ] } }, "hydrate": { "description": "Configuração para popular/hidratar dados do filtro dinamicamente (null se não aplicável)", "oneOf": [ { "type": "object", "properties": { "route": { "type": "string", "description": "Rota da API para buscar as opções disponíveis" }, "options": { "type": "string", "description": "Chave do objeto de resposta que contém as opções" }, "key": { "type": "string", "description": "Campo usado como valor/identificador da opção" }, "label": { "type": "string", "description": "Campo usado como rótulo da opção" }, "children_key": { "type": "string", "description": "Chave para acessar opções filhas/aninhadas (opcional)" }, "children_label": { "type": "string", "description": "Campo usado como rótulo das opções filhas (opcional)" } }, "required": [ "route", "options", "key", "label", "children_key", "children_label" ] } ] } }, "required": [ "name", "input_type", "operators", "options", "arguments", "hydrate" ] } }, "sorting": { "type": "array", "description": "Lista de campos disponíveis para ordenação", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Nome do campo que pode ser usado para ordenação" }, "arguments": { "type": "array", "description": "Argumentos adicionais para a ordenação (geralmente vazio)", "items": { "type": "object" } } }, "required": [ "name", "arguments" ] } } }, "required": [ "filters", "sorting" ] } }, "required": [ "response", "params" ] }, "example": { "response": true, "params": { "filters": [ { "name": "id", "input_type": "text", "operators": [ "equals" ], "options": [], "arguments": [], "hydrate": null }, { "name": "code", "input_type": "text", "operators": [ "equals", "contains", "not_contains" ], "options": [], "arguments": [], "hydrate": null }, { "name": "name", "input_type": "text", "operators": [ "equals", "not_equals", "contains", "not_contains" ], "options": [], "arguments": [], "hydrate": null }, { "name": "description", "input_type": "text", "operators": [ "equals", "not_equals", "contains", "not_contains" ], "options": [], "arguments": [], "hydrate": null }, { "name": "impact", "input_type": "text", "operators": [ "equals", "not_equals", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals" ], "options": [ { "label": 1, "value": 1 }, { "label": 2, "value": 2 }, { "label": 3, "value": 3 }, { "label": 4, "value": 4 }, { "label": 5, "value": 5 }, { "label": 6, "value": 6 }, { "label": 7, "value": 7 }, { "label": 8, "value": 8 }, { "label": 9, "value": 9 }, { "label": 10, "value": 10 } ], "arguments": [], "hydrate": null }, { "name": "status", "input_type": "text", "operators": [ "equals", "not_equals" ], "options": [ { "label": "Em andamento", "value": 1 }, { "label": "Concluído", "value": 2 }, { "label": "Arquivado", "value": 3 }, { "label": "Paralisado", "value": 4 } ], "arguments": [], "hydrate": null }, { "name": "budget", "input_type": "number", "operators": [ "equals", "not_equals", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals" ], "options": [], "arguments": [], "hydrate": null }, { "name": "funnel_status_at", "input_type": "datetime-local", "operators": [ "equals", "not_equals", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals", "is_null", "is_not_null" ], "options": [], "arguments": [ { "id": "funnel_status", "label": "Status de Funil", "required": false, "modelClass": "App\\Models\\ProjectFunnel", "hydrate": { "route": "/api/management/get-project-funnels", "options": "project_funnels", "key": "id", "label": "name", "children_key": null, "children_label": null } } ], "hydrate": null }, { "name": "funnel_forecast_date", "input_type": "datetime-local", "operators": [ "equals", "not_equals", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals", "is_null", "is_not_null" ], "options": [], "arguments": [ { "id": "funnel_forecast_date", "label": "Funil de Projetos", "required": false, "modelClass": "App\\Models\\ProjectFunnel", "hydrate": { "route": "/api/management/get-project-funnels", "options": "project_funnels", "key": "id", "label": "name", "children_key": null, "children_label": null } } ], "hydrate": null }, { "name": "funnel_status", "input_type": "text", "operators": [ "equals", "not_equals" ], "options": [], "arguments": [ { "id": "funnel_status", "label": "Status de Funil", "required": false, "modelClass": "App\\Models\\ProjectFunnel", "hydrate": { "route": "/api/management/get-project-funnels", "options": "project_funnels", "key": "id", "label": "name", "children_key": null, "children_label": null } } ], "hydrate": { "route": "/api/management/get-available-steps", "options": "funnels", "key": "id", "label": "name", "children_key": "funnel_status", "children_label": "name" } }, { "name": "funnel_tags", "input_type": "text", "operators": [ "equals", "not_equals", "contains", "not_contains", "is_null", "is_not_null" ], "options": [], "arguments": [], "hydrate": { "route": "/api/management/get-available-steps", "options": "funnels", "key": "id", "label": "name", "children_key": "tags", "children_label": "name" } }, { "name": "parent", "input_type": "text", "operators": [ "equals", "not_equals", "is_null", "is_not_null" ], "options": [], "arguments": [], "hydrate": { "route": "/api/management/projects", "options": "projects", "key": "id", "label": "name", "children_key": null, "children_label": null } }, { "name": "children", "input_type": "text", "operators": [ "is_null", "is_not_null", "contains", "not_contains" ], "options": [], "arguments": [], "hydrate": { "route": "/api/management/projects", "options": "projects", "key": "id", "label": "name", "children_key": null, "children_label": null } }, { "name": "customer", "input_type": "text", "operators": [ "equals", "not_equals", "is_null", "is_not_null" ], "options": [], "arguments": [], "hydrate": { "route": "/api/management/customers", "options": "customers", "key": "id", "label": "name", "children_key": null, "children_label": null } }, { "name": "contact", "input_type": "text", "operators": [ "equals", "not_equals", "is_null", "is_not_null" ], "options": [], "arguments": [], "hydrate": { "route": "/api/management/contacts", "options": "contacts", "key": "id", "label": "name", "children_key": null, "children_label": null } }, { "name": "assignee", "input_type": "text", "operators": [ "equals", "contains", "not_equals", "is_null", "is_not_null" ], "options": [], "arguments": [], "hydrate": { "route": "/api/management/get-users", "options": "users", "key": "id", "label": "name", "children_key": null, "children_label": null } }, { "name": "creator", "input_type": "text", "operators": [ "contains", "not_equals", "is_null", "is_not_null" ], "options": [], "arguments": [], "hydrate": { "route": "/api/management/get-users", "options": "users", "key": "id", "label": "name", "children_key": null, "children_label": null } }, { "name": "created_at", "input_type": "datetime-local", "operators": [ "equals", "not_equals", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals" ], "options": [], "arguments": [], "hydrate": null }, { "name": "funnels", "input_type": "text", "operators": [ "contains", "not_contains" ], "options": [], "arguments": [], "hydrate": { "route": "/api/management/get-project-funnels", "options": "project_funnels", "key": "id", "label": "name", "children_key": null, "children_label": null } }, { "name": "funnel_steps", "input_type": "text", "operators": [ "contains", "not_contains" ], "options": [], "arguments": [], "hydrate": { "route": "/api/management/get-available-steps", "options": "funnels", "key": "id", "label": "name", "children_key": "steps", "children_label": "name" } }, { "name": "funnel_step_linked_at", "input_type": "datetime-local", "operators": [ "equals", "not_equals", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals" ], "options": [], "arguments": [ { "id": "funnel_step", "label": "Etapa de Funil", "required": false, "modelClass": "App\\Models\\FunnelStep", "hydrate": { "route": "/api/management/get-available-steps", "options": "funnels", "key": "id", "label": "name", "children_key": "steps", "children_label": "name" } } ], "hydrate": null }, { "name": "completed_percentage", "input_type": "number", "operators": [ "equals", "not_equals", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals" ], "options": [], "arguments": [], "hydrate": null }, { "name": "project_groups", "input_type": "text", "operators": [ "contains", "not_contains" ], "options": [], "arguments": [], "hydrate": { "route": "/api/management/project-groups", "options": "project_groups", "key": "id", "label": "name", "children_key": null, "children_label": null } }, { "name": "answer_pool", "input_type": "text", "operators": [ "equals", "not_equals", "contains", "not_contains", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals", "is_null", "is_not_null" ], "options": [], "arguments": [ { "id": "answer_pool_edge", "label": "Campo", "required": true, "modelClass": "App\\Models\\FormEdge", "hydrate": { "route": "/api/management/get-forms", "options": "forms", "key": "id", "label": "label", "children_key": "edges", "children_label": "title" } } ], "hydrate": null }, { "name": "project_step_form_answer_pool", "input_type": "text", "operators": [ "equals", "not_equals", "contains", "not_contains", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals", "is_null", "is_not_null" ], "options": [], "arguments": [ { "id": "project_step_form_answer_pool_step", "label": "Etapa de Funil", "required": true, "modelClass": "App\\Models\\FunnelStep", "hydrate": { "route": "/api/management/get-available-steps", "options": "funnels", "key": "id", "label": "name", "children_key": "steps", "children_label": "name" } }, { "id": "project_step_form_answer_pool_edge", "label": "Campo", "required": true, "modelClass": "App\\Models\\FormEdge", "hydrate": { "route": "/api/management/get-forms", "options": "forms", "key": "id", "label": "label", "children_key": "edges", "children_label": "title" } } ], "hydrate": null }, { "name": "project_funnel_assignments_answer_pool", "input_type": "text", "operators": [ "equals", "not_equals", "contains", "not_contains", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals", "is_null", "is_not_null" ], "options": [], "arguments": [ { "id": "project_funnel_assignments_answer_pool_project_funnel", "label": "Funil de Projetos", "required": true, "modelClass": "App\\Models\\ProjectFunnel", "hydrate": { "route": "/api/management/get-project-funnels", "options": "project_funnels", "key": "id", "label": "name", "children_key": null, "children_label": null } }, { "id": "project_funnel_assignments_answer_pool_edge", "label": "Campo", "required": true, "modelClass": "App\\Models\\FormEdge", "hydrate": { "route": "/api/management/get-forms", "options": "forms", "key": "id", "label": "label", "children_key": "edges", "children_label": "title" } } ], "hydrate": null }, { "name": "project_loose_form_answer_pool", "input_type": "text", "operators": [ "equals", "not_equals", "contains", "not_contains", "greater_than", "greater_than_or_equals", "less_than", "less_than_or_equals", "is_null", "is_not_null" ], "options": [], "arguments": [ { "id": "project_loose_form_answer_pool_edge", "label": "Campo", "required": true, "modelClass": "App\\Models\\FormEdge", "hydrate": { "route": "/api/management/get-forms", "options": "forms", "key": "id", "label": "label", "children_key": "edges", "children_label": "title" } } ], "hydrate": null }, { "name": "name_code", "input_type": "text", "operators": [ "contains" ], "options": [], "arguments": [], "hydrate": null } ], "sorting": [ { "name": "name", "arguments": [] }, { "name": "impact", "arguments": [] }, { "name": "status", "arguments": [] }, { "name": "budget", "arguments": [] }, { "name": "created_at", "arguments": [] }, { "name": "assigned_to", "arguments": [] }, { "name": "funnel_step_linked_at", "arguments": [] }, { "name": "answer_pool", "arguments": [] }, { "name": "project_funnel_assignments_answer_pool", "arguments": [] }, { "name": "customer__name", "arguments": [] }, { "name": "contact__name", "arguments": [] }, { "name": "project_funnel_assignments__statuses_at", "arguments": [] } ] } } } } } } }, "parameters": [ { "name": "model_name", "in": "path", "required": true, "description": "Nome do objeto a ser consultado.", "schema": { "type": "string", "enum": [ "project", "customer", "contact" ] }, "example": "project" } ] }, "/api/management/system/bulk-update/{model_name}": { "post": { "tags": [ "system", "bulk-update" ], "summary": "Atualizar múltiplos registros de um modelo de uma vez", "description": "Atualizar múltiplos registros de um modelo de uma vez", "operationId": "atualizarMLtiplosRegistrosDeUmModeloDeUmaVez", "responses": { "200": { "description": "200" } } }, "parameters": [ { "name": "model_name", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/tags": { "get": { "tags": [ "tags" ], "summary": "Listar etiquetas", "description": "Listar todas as etiquetas cadastradas no sistema.", "operationId": "listarEtiquetas", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "tags": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string" }, "model": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" } } } }, "response": { "type": "boolean" } } }, "example": { "tags": [ { "id": "019c8b6e-8e75-724d-b877-b11df90d2b15", "name": "Copyright", "color": "#5e4ff8", "model": "App\\Models\\Contact", "created_at": "2026-02-23T16:56:44.000000Z", "deleted_at": null }, { "id": "019c8b9c-c034-73cd-9a3c-eae8e54b3bfe", "name": "Financeiro", "color": "#258aff", "model": "App\\Models\\Customer", "created_at": "2026-02-23T17:47:11.000000Z", "deleted_at": null }, { "id": "019c8fa4-9ed1-727b-81d4-e2d9c03d695f", "name": "Marketing", "color": "#28a745", "model": "App\\Models\\Customer", "created_at": "2026-02-24T12:34:16.000000Z", "deleted_at": null }, { "id": "019c8fca-50e8-7142-83d3-01c38543a9c5", "name": "Desenvolvedor de software", "color": null, "model": "App\\Models\\Customer", "created_at": "2026-02-24T13:15:26.000000Z", "deleted_at": null } ], "response": true } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "unauthorized", "error": "Unauthenticated." } } } } } }, "post": { "tags": [ "tags" ], "summary": "Criar uma etiqueta", "description": "Criar uma nova etiqueta no sistema.", "operationId": "criarEtiqueta", "requestBody": { "content": { "application/json": { "schema": { "title": "Criação de etiqueta", "description": "Payload obrigatório para criação de uma etiqueta", "allOf": [ { "description": "Dados para criação de uma etiqueta", "title": "Etiqueta", "type": "object", "properties": { "name": { "type": "string", "maxLength": 255, "example": "Nome da etiqueta", "description": "Nome da etiqueta. Campo obrigatório, máximo de 255 caracteres. Deve ser único por empresa e model." }, "model": { "type": "string", "enum": [ "App\\Models\\Customer", "App\\Models\\Contact" ], "example": "App\\Models\\Customer", "description": "Classe do modelo ao qual a tag está associada. Modelos suportados: Customer, Contact. Campo obrigatório na criação." }, "color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$", "maxLength": 7, "example": "#FF5733", "description": "Cor da tag em hexadecimal (#RRGGBB). Campo opcional." } }, "required": [ "name", "model" ] }, {} ] }, "examples": { "Criar etiqueta": { "value": { "name": "Nova etiqueta", "color": "#258aff", "model": "App\\Models\\Contact" } } } } } }, "responses": { "201": { "description": "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 26 Feb 2026 17:37:42 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "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 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } }, "401": { "description": "Não autorizado", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 26 Feb 2026 17:38:33 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "X-Content-Type-Options": { "schema": { "type": "string" }, "example": "nosniff" }, "X-Frame-Options": { "schema": { "type": "string" }, "example": "SAMEORIGIN" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } }, "422": { "description": "Campo inválido", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 26 Feb 2026 17:39:10 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "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 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } } } } }, "/api/management/tags/{tag}": { "get": { "tags": [ "tags" ], "summary": "Obter etiqueta específica", "description": "Obter detalhes de uma etiqueta específica.", "operationId": "obterEtiquetaEspecFica", "responses": { "200": { "description": "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" }, "Content-Encoding": { "schema": { "type": "string" }, "example": "gzip" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 26 Feb 2026 17:43:43 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "Vary": { "schema": { "type": "string" }, "example": "Accept-Encoding" }, "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": 156 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } }, "401": { "description": "Não autorizado", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 26 Feb 2026 17:44:26 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "X-Content-Type-Options": { "schema": { "type": "string" }, "example": "nosniff" }, "X-Frame-Options": { "schema": { "type": "string" }, "example": "SAMEORIGIN" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } } } }, "put": { "tags": [ "tags" ], "summary": "Atualizar uma etiqueta", "description": "Atualizar dados de uma etiqueta específica.", "operationId": "atualizarEtiqueta", "requestBody": { "content": { "application/json": { "schema": { "title": "Atualização de etiqueta", "description": "Payload para atualização de uma etiqueta", "allOf": [ { "description": "Dados para atualização de uma etiqueta", "title": "Etiqueta", "type": "object", "properties": { "name": { "type": "string", "maxLength": 255, "example": "Nome da etiqueta", "description": "Nome da etiqueta. Campo obrigatório, máximo de 255 caracteres. Deve ser único por frame e model." }, "color": { "type": "string", "maxLength": 7, "pattern": "^#[0-9A-Fa-f]{6}$", "example": "#33FF57", "description": "Cor da tag em hexadecimal (#RRGGBB). Campo opcional." } }, "required": [ "name" ] }, {} ] }, "examples": { "Atualizar etiqueta": { "value": { "name": "Novo nome de etiqueta", "color": "#258aff", "model": "App\\Models\\Customer" } } } } } }, "responses": { "200": { "description": "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" }, "Content-Encoding": { "schema": { "type": "string" }, "example": "gzip" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 26 Feb 2026 17:46:02 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "Vary": { "schema": { "type": "string" }, "example": "Accept-Encoding" }, "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 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } }, "401": { "description": "Não autorizado", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 26 Feb 2026 17:47:11 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "X-Content-Type-Options": { "schema": { "type": "string" }, "example": "nosniff" }, "X-Frame-Options": { "schema": { "type": "string" }, "example": "SAMEORIGIN" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } }, "422": { "description": "Campo inváildo", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 26 Feb 2026 17:49:13 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "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 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } } } }, "delete": { "tags": [ "tags" ], "summary": "Deletar uma etiqueta", "description": "Deletar uma tag específica do sistema.", "operationId": "deletarEtiqueta", "responses": { "200": { "description": "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" }, "Content-Encoding": { "schema": { "type": "string" }, "example": "gzip" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 26 Feb 2026 17:50:55 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "Vary": { "schema": { "type": "string" }, "example": "Accept-Encoding" }, "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 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } }, "401": { "description": "Não autorizado", "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" }, "Date": { "schema": { "type": "string" }, "example": "Thu, 26 Feb 2026 17:51:19 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "X-Content-Type-Options": { "schema": { "type": "string" }, "example": "nosniff" }, "X-Frame-Options": { "schema": { "type": "string" }, "example": "SAMEORIGIN" }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } } } } }, "parameters": [ { "name": "tag", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/search-activities": { "post": { "tags": [ "search-activities" ], "summary": "Buscar registros de alterações", "description": "Buscar registros de alterações do sistema com filtros e critérios específicos.", "operationId": "buscarRegistrosDeAlteraEs", "responses": { "200": { "description": "200" } } } }, "/api/management/project-funnels/{project_funnel_id}/metrics": { "get": { "summary": "Métricas do funil", "responses": { "200": { "description": "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" }, "Content-Encoding": { "schema": { "type": "string" }, "example": "gzip" }, "Date": { "schema": { "type": "string" }, "example": "Mon, 09 Feb 2026 02:49:22 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Server": { "schema": { "type": "string" }, "example": "nginx" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "Vary": { "schema": { "type": "string" }, "example": "Accept-Encoding" }, "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": 157 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "description": "Indica se a requisição foi bem-sucedida" }, "metrics": { "type": "object", "properties": { "period": { "type": "object", "properties": { "start_date": { "type": "string", "description": "Data inicial do período analisado (formato: Y-m-d)", "format": "date" }, "end_date": { "type": "string", "description": "Data final do período analisado (formato: Y-m-d)", "format": "date" }, "is_default": { "type": "boolean", "description": "Indica se o período é o padrão ou foi customizado" } }, "required": [ "start_date", "end_date", "is_default" ] }, "basic": { "type": "object", "properties": { "id": { "type": "integer", "description": "ID do funil" }, "name": { "type": "string", "description": "Nome do funil" }, "condition": { "type": "string", "enum": [ "active", "inactive" ], "description": "Condição do funil (ativo ou inativo)" }, "steps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "ID da etapa" }, "name": { "type": "string", "description": "Nome da etapa" }, "form_id": { "type": "integer", "description": "ID do formulário associado à etapa (null se não houver)" } }, "required": [ "id", "name" ] } }, "funnel_form": { "type": "object", "description": "Formulário associado ao funil (null se não houver)", "properties": { "id": { "type": "integer" }, "title": { "type": "string" } } }, "business_area": { "type": "object", "description": "Área de negócio associada ao funil (null se não houver)", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "created_at": { "type": "string", "description": "Data de criação do funil (ISO 8601)", "format": "date-time" }, "updated_at": { "type": "string", "description": "Data de última atualização do funil (ISO 8601)", "format": "date-time" } }, "required": [ "id", "name", "condition", "steps" ] }, "counts": { "type": "object", "properties": { "total_steps": { "type": "integer", "minimum": 0, "description": "Total de etapas no funil" }, "total_projects": { "type": "integer", "minimum": 0, "description": "Total de projetos vinculados ao funil" }, "active_projects": { "type": "integer", "minimum": 0, "description": "Total de projetos no funil com status = em andamento" }, "tags_count": { "type": "integer", "minimum": 0, "description": "Total de tags do funil" }, "attachments_count": { "type": "integer", "minimum": 0, "description": "Total de anexos do funil" } }, "required": [ "total_steps", "total_projects", "active_projects", "tags_count", "attachments_count" ] }, "steps_distribution": { "type": "array", "description": "Distribuição de projetos por etapa, ordenada por quantidade de projetos (maior para menor)", "items": { "type": "object", "properties": { "step_id": { "type": "integer", "description": "ID da etapa" }, "step_name": { "type": "string", "description": "Nome da etapa" }, "projects_count": { "type": "integer", "minimum": 0, "description": "Quantidade atual de projetos na etapa" }, "projects_entry_in_period": { "type": "integer", "minimum": 0, "description": "Quantidade de projetos que entraram na etapa no período analisado" }, "projects_exit_in_period": { "type": "integer", "minimum": 0, "description": "Quantidade de projetos que saíram da etapa no período analisado" } }, "required": [ "step_id", "step_name", "projects_count", "projects_entry_in_period", "projects_exit_in_period" ] } }, "steps_summary": { "type": "object", "properties": { "most_occupied_step": { "type": "object", "description": "Etapa com maior quantidade de projetos (null se não houver projetos)", "properties": { "step_id": { "type": "integer" }, "step_name": { "type": "string" }, "step_form_id": { "type": "integer" }, "projects_count": { "type": "integer", "minimum": 0 } } }, "empty_steps_ids": { "type": "array", "description": "Array com IDs das etapas que não possuem projetos", "items": { "type": "integer" } }, "empty_steps_count": { "type": "integer", "minimum": 0, "description": "Quantidade de etapas vazias" } }, "required": [ "most_occupied_step", "empty_steps_ids", "empty_steps_count" ] }, "time_metrics": { "type": "object", "properties": { "average_time_in_funnel_minutes": { "type": "number", "minimum": 0, "description": "Tempo médio (em minutos) que projetos ficam no funil, baseado em transições completas no período" }, "average_time_per_step_minutes": { "type": "array", "description": "Tempo médio por etapa", "items": { "type": "object", "properties": { "step_id": { "type": "integer" }, "step_name": { "type": "string" }, "average_time_minutes": { "type": "number", "minimum": 0, "description": "Tempo médio (em minutos) que projetos ficam nesta etapa, baseado em transições completas no período" } }, "required": [ "step_id", "step_name", "average_time_minutes" ] } }, "oldest_project_id": { "type": "string", "description": "ID do projeto mais antigo vinculado ao funil (null se não houver projetos)", "format": "uuid" }, "newest_project_id": { "type": "string", "description": "ID do projeto mais recente vinculado ao funil (null se não houver projetos)", "format": "uuid" }, "oldest_project_minutes": { "type": "number", "minimum": 0, "description": "Tempo em minutos desde a criação do projeto mais antigo até agora" }, "newest_project_minutes": { "type": "number", "minimum": 0, "description": "Tempo em minutos desde a criação do projeto mais recente até agora" } }, "required": [ "average_time_in_funnel_minutes", "average_time_per_step_minutes", "oldest_project_id", "newest_project_id", "oldest_project_minutes", "newest_project_minutes" ] }, "activity": { "type": "object", "properties": { "last_activity_at": { "type": "string", "description": "Data e hora da última atividade no funil (transição de etapa) no período analisado (ISO 8601, null se não houver atividade)", "format": "date-time" }, "projects_added_in_period": { "type": "integer", "minimum": 0, "description": "Quantidade de projetos adicionados ao funil no período analisado" } }, "required": [ "last_activity_at", "projects_added_in_period" ] }, "tags": { "type": "array", "description": "Lista de tags do funil com contagem de projetos", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "ID da tag" }, "name": { "type": "string", "description": "Nome da tag" }, "color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$", "description": "Cor da tag em formato hexadecimal (#RRGGBB)" }, "projects_count": { "type": "integer", "minimum": 0, "description": "Quantidade de projetos que possuem esta tag" } }, "required": [ "id", "name", "color", "projects_count" ] } }, "funnel_status": { "type": "array", "description": "Lista de status do funil com contagem de projetos", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "ID do status" }, "name": { "type": "string", "description": "Nome do status" }, "color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$", "description": "Cor do status em formato hexadecimal (#RRGGBB)" }, "is_conclusive": { "type": "boolean", "description": "Indica se este é um status conclusivo" }, "projects_count": { "type": "integer", "minimum": 0, "description": "Quantidade de projetos com este status" } }, "required": [ "id", "name", "color", "is_conclusive", "projects_count" ] } }, "attachments": { "type": "array", "description": "Lista de anexos do funil", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "ID do anexo" }, "name": { "type": "string", "description": "Nome do anexo" }, "technical_name": { "type": "string", "description": "Nome técnico do arquivo" }, "extension": { "type": "string", "description": "Extensão do arquivo" }, "file_url": { "type": "string", "description": "URL do arquivo", "format": "uri" }, "user": { "type": "object", "description": "Informações do usuário que fez upload do anexo (null se não disponível)", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "avatar_url": { "type": "string", "format": "uri" } } } }, "required": [ "id", "name", "technical_name", "extension", "file_url" ] } } }, "required": [ "period", "basic", "counts", "steps_distribution", "steps_summary", "time_metrics", "activity", "tags", "funnel_status", "attachments" ] } }, "required": [ "response", "metrics" ] }, "example": { "response": true, "metrics": { "period": { "start_date": "2026-01-09", "end_date": "2026-02-08", "is_default": true }, "basic": { "id": 38, "name": "Marketing", "condition": "active", "steps": [ { "id": 166, "name": "Backlog", "form_id": null }, { "id": 167, "name": "Em Andamento", "form_id": null }, { "id": 168, "name": "Correção", "form_id": null }, { "id": 169, "name": "Publicação", "form_id": null }, { "id": 170, "name": "Análise de Resultados", "form_id": null }, { "id": 171, "name": "Finalização", "form_id": null } ], "funnel_form": null, "business_area": null, "created_at": "2026-02-08T23:44:18-03:00", "updated_at": "2026-02-08T23:44:18-03:00" }, "counts": { "total_steps": 6, "total_projects": 50, "active_projects": 50, "tags_count": 2, "attachments_count": 0 }, "steps_distribution": [ { "step_id": 167, "step_name": "Em Andamento", "projects_count": 11, "projects_entry_in_period": 19, "projects_exit_in_period": 12 }, { "step_id": 166, "step_name": "Backlog", "projects_count": 9, "projects_entry_in_period": 21, "projects_exit_in_period": 13 }, { "step_id": 168, "step_name": "Correção", "projects_count": 9, "projects_entry_in_period": 11, "projects_exit_in_period": 9 }, { "step_id": 169, "step_name": "Publicação", "projects_count": 8, "projects_entry_in_period": 7, "projects_exit_in_period": 5 }, { "step_id": 171, "step_name": "Finalização", "projects_count": 7, "projects_entry_in_period": 5, "projects_exit_in_period": 0 }, { "step_id": 170, "step_name": "Análise de Resultados", "projects_count": 6, "projects_entry_in_period": 6, "projects_exit_in_period": 5 } ], "steps_summary": { "most_occupied_step": { "step_id": 167, "step_name": "Em Andamento", "step_form_id": null, "projects_count": 11 }, "empty_steps_ids": [], "empty_steps_count": 0 }, "time_metrics": { "average_time_in_funnel_minutes": 4963.2, "average_time_per_step_minutes": [ { "step_id": 166, "step_name": "Backlog", "average_time_minutes": 5643.75 }, { "step_id": 167, "step_name": "Em Andamento", "average_time_minutes": 4472 }, { "step_id": 168, "step_name": "Correção", "average_time_minutes": 5880 }, { "step_id": 169, "step_name": "Publicação", "average_time_minutes": 3372 }, { "step_id": 170, "step_name": "Análise de Resultados", "average_time_minutes": 4200 }, { "step_id": 171, "step_name": "Finalização", "average_time_minutes": 0 } ], "oldest_project_id": "d5f647d1-2df1-451c-96e7-5f577dd3b574", "newest_project_id": "8812c301-6ed5-4495-a255-34b2d24433e5", "oldest_project_minutes": 129398.09, "newest_project_minutes": 963.09 }, "activity": { "last_activity_at": "2026-02-08T17:46:17-03:00", "projects_added_in_period": 15 }, "tags": [ { "id": 1, "name": "Bixa prioridade", "color": "#28a745", "projects_count": 0 }, { "id": 2, "name": "Alta prioridade", "color": "#ffc107", "projects_count": 0 } ], "funnel_status": [], "attachments": [] } } } } } }, "tags": [ "project-funnels", "{project_funnel_id}" ], "description": "Obtém métricas detalhadas de um funil de projetos, incluindo distribuição por etapa, tempo médio, atividade e contadores.\n\nSuporta filtro por período (padrão: últimos 30 dias, máximo: 3 meses).\n\nRequer permissão `project_funnels.see_funnel_metrics` e acesso de visualização ao funil (`project_funnels.view.{funnel_id}` ou `project_funnels.view_all`).", "parameters": [ { "name": "start_date", "in": "query", "description": "Data de início do período. Opcional", "schema": { "type": "string", "format": "date" }, "example": "2019-03-07" }, { "name": "end_date", "in": "query", "description": "Data de fim do período. Obrigatório quando o start_date for informado.", "schema": { "type": "string" }, "example": "string" } ] }, "parameters": [ { "name": "project_funnel_id", "in": "path", "required": true, "description": "ID do funil de projeto", "deprecated": false, "schema": { "type": "integer" }, "example": 8017 } ] }, "/api/management/projects/{project}/project-executions": { "get": { "summary": "Listar execuções de projeto", "responses": { "200": { "description": "200" } }, "tags": [ "projects", "{id}", "project-execution" ], "parameters": [ { "name": "filter[user_id]", "in": "query", "description": "Filtra pelo ID do usuário", "schema": { "type": "string", "format": "uuid" }, "example": "78886ebc-716d-e628-c18d-da3f5bddb068" }, { "name": "filter[funnel_step_id]", "in": "query", "description": "Filtra pelo ID da etapa da execução", "schema": { "type": "integer" }, "example": 8017 }, { "name": "filter[start_date_gt]", "in": "query", "description": "Filtra execuções que começaram depois da data usada no filtro", "schema": { "type": "string", "format": "date-time" }, "example": "2014-02-07T22:04:31.151Z" }, { "name": "filter[end_date_lt]", "in": "query", "description": "Filtra execuções que começaram antes da data usada no filtro", "schema": { "type": "string", "format": "date-time" }, "example": "2014-02-07T22:04:31.151Z" } ] }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID do projeto", "schema": { "type": "string" }, "example": "{{project_id}}" } ], "post": { "summary": "Lançar execução de projeto", "responses": { "200": { "description": "200" } }, "tags": [ "projects", "{id}", "project-execution" ], "parameters": [ { "name": "funnel_step_id", "in": "query", "description": "ID da etapa onde será executado o projeto", "schema": { "type": "string" }, "example": "string" } ] } }, "/api/management/projects/{project_id}/project-executions/{project_execution_id}": { "put": { "summary": "Atualizar execução de projeto", "responses": { "200": { "description": "200" } }, "tags": [ "projects", "{id}", "project-execution" ] }, "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{project_id}}" }, { "name": "project_execution_id", "in": "path", "required": true, "schema": { "type": "string" }, "example": "a11073b8-e458-415d-94d0-c5b9fe8b9fb6" } ] }, "/api/management/project-executions/me": { "get": { "summary": "Minhas execuções", "responses": { "200": { "description": "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" }, "Content-Encoding": { "schema": { "type": "string" }, "example": "gzip" }, "Date": { "schema": { "type": "string" }, "example": "Fri, 13 Mar 2026 21:17:54 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Server": { "schema": { "type": "string" }, "example": "nginx" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "Vary": { "schema": { "type": "string" }, "example": "Accept-Encoding" }, "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 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "current_execution": { "type": "object", "properties": { "id": { "type": "string" }, "project_id": { "type": "string" }, "user_id": { "type": "string" }, "funnel_step_id": { "type": "integer" }, "started_at": { "type": "string", "format": "date-time" }, "hourly_rate": { "type": "integer" }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" } } }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "avatar_url": { "type": "string", "format": "uri" } } }, "funnel_step": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "funnel": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } } } } } }, "recent_executions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "project_id": { "type": "string" }, "user_id": { "type": "string" }, "funnel_step_id": { "type": "integer" }, "started_at": { "type": "string", "format": "date-time" }, "finished_at": { "type": "string", "format": "date-time" }, "hourly_rate": { "type": "integer" }, "finished_reason": { "type": "string" }, "finished_at_real": { "type": "string", "format": "date-time" }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" } } }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "avatar_url": { "type": "string", "format": "uri" } } }, "funnel_step": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "funnel": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } } } } } } }, "hidden_timers": { "type": "boolean" }, "total_time": { "type": "integer" }, "idle_time": { "type": "integer" }, "current_project_total_time": { "type": "integer" }, "current_step_total_time": { "type": "integer" } } }, "example": { "response": true, "current_execution": { "id": "a14afcbd-38b1-4b97-8950-02c09547611a", "project_id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-03-13T20:39:59.000000Z", "finished_at": null, "hourly_rate": 0, "finished_reason": null, "started_at_real": null, "finished_at_real": null, "project": { "id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "code": "AD-1", "name": "awdawd" }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Test User", "avatar_url": "https://olie-main-dev.s3.amazonaws.com/app/avatars/AKMCHJI5WBPqrvx6aF9okU2dwf4VlOtRg3bN-avatar-1773273837.png" }, "funnel_step": { "id": 181, "name": "tres", "project_funnel_id": 36, "funnel": { "id": 36, "name": "funil do abacaxi" } } }, "recent_executions": [ { "id": "a14afbe7-d2bc-4821-9c2b-7ce295f8a962", "project_id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-03-13T16:00:39.000000Z", "finished_at": "2026-03-13T20:39:00.000000Z", "hourly_rate": 0, "finished_reason": "self_stop", "started_at_real": null, "finished_at_real": "2026-03-13T19:20:03.000000Z", "project": { "id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "code": "AD-1", "name": "awdawd" }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Test User", "avatar_url": "https://olie-main-dev.s3.amazonaws.com/app/avatars/AKMCHJI5WBPqrvx6aF9okU2dwf4VlOtRg3bN-avatar-1773273837.png" }, "funnel_step": { "id": 181, "name": "tres", "project_funnel_id": 36, "funnel": { "id": 36, "name": "funil do abacaxi" } } }, { "id": "a14afbe7-d2bc-4821-9c2b-7ce295f8a961", "project_id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-03-13T10:00:39.000000Z", "finished_at": "2026-03-13T15:20:03.000000Z", "hourly_rate": 0, "finished_reason": "self_stop", "started_at_real": null, "finished_at_real": null, "project": { "id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "code": "AD-1", "name": "awdawd" }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Test User", "avatar_url": "https://olie-main-dev.s3.amazonaws.com/app/avatars/AKMCHJI5WBPqrvx6aF9okU2dwf4VlOtRg3bN-avatar-1773273837.png" }, "funnel_step": { "id": 181, "name": "tres", "project_funnel_id": 36, "funnel": { "id": 36, "name": "funil do abacaxi" } } } ], "hidden_timers": false, "total_time": 38140, "idle_time": 27734, "current_project_total_time": 38140, "current_step_total_time": 38140 } } } } }, "tags": [ "projects", "{id}", "project-execution" ] } }, "/api/management/projects/{project}/project-executions/dashboard": { "get": { "summary": "Métricas sobre as execuções", "responses": { "200": { "description": "200" } }, "tags": [ "projects", "{id}", "project-execution" ] }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID do projeto", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/users/{user_id}/project-executions": { "get": { "summary": "Listar execuções de projeto", "parameters": [ { "name": "filter[funnel_step_id]", "in": "query", "description": "Filtra pelo ID da etapa da execução", "schema": { "type": "string" }, "example": "string" }, { "name": "filter[start_date_gt]", "in": "query", "description": "Filtra execuções que começaram depois da data usada no filtro", "schema": { "type": "string" }, "example": "string" }, { "name": "filter[end_date_lt]", "in": "query", "description": "Filtra execuções que começaram antes da data usada no filtro", "schema": { "type": "string" }, "example": "string" } ], "responses": { "200": { "description": "200" } }, "tags": [ "users", "{id}" ] }, "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{user_id}}" } ] }, "/api/management/forms/{form_id}/restore": { "post": { "summary": "Restaurar formulário", "responses": { "200": { "description": "200" } }, "tags": [ "forms" ], "description": "Restaura um formulário que foi deletado via soft delete.\n\n**Permissão necessária:** `dynamic_forms.edit`\n\n**Parâmetros de rota:**\n\n- `form_id` — UUID do formulário a ser restaurado\n \n\n**Respostas:**\n\n- `200 OK` — Formulário restaurado com sucesso\n \n- `403 Forbidden` — Usuário sem permissão `dynamic_forms.edit`\n \n- `404 Not Found` — Formulário não encontrado ou não está deletado" }, "parameters": [ { "name": "form_id", "in": "path", "required": true, "schema": { "type": "string" }, "example": "string" } ] }, "/api/management/project-executions/{project_execution_id}": { "get": { "summary": "Obter execução de projeto", "responses": { "200": { "description": "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" }, "Content-Encoding": { "schema": { "type": "string" }, "example": "gzip" }, "Date": { "schema": { "type": "string" }, "example": "Fri, 13 Mar 2026 21:17:54 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Server": { "schema": { "type": "string" }, "example": "nginx" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "Vary": { "schema": { "type": "string" }, "example": "Accept-Encoding" }, "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 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "current_execution": { "type": "object", "properties": { "id": { "type": "string" }, "project_id": { "type": "string" }, "user_id": { "type": "string" }, "funnel_step_id": { "type": "integer" }, "started_at": { "type": "string", "format": "date-time" }, "hourly_rate": { "type": "integer" }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" } } }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "avatar_url": { "type": "string", "format": "uri" } } }, "funnel_step": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "funnel": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } } } } } }, "recent_executions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "project_id": { "type": "string" }, "user_id": { "type": "string" }, "funnel_step_id": { "type": "integer" }, "started_at": { "type": "string", "format": "date-time" }, "finished_at": { "type": "string", "format": "date-time" }, "hourly_rate": { "type": "integer" }, "finished_reason": { "type": "string" }, "finished_at_real": { "type": "string", "format": "date-time" }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" } } }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "avatar_url": { "type": "string", "format": "uri" } } }, "funnel_step": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "funnel": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } } } } } } }, "hidden_timers": { "type": "boolean" }, "total_time": { "type": "integer" }, "idle_time": { "type": "integer" }, "current_project_total_time": { "type": "integer" }, "current_step_total_time": { "type": "integer" } } }, "example": { "response": true, "current_execution": { "id": "a14afcbd-38b1-4b97-8950-02c09547611a", "project_id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-03-13T20:39:59.000000Z", "finished_at": null, "hourly_rate": 0, "finished_reason": null, "started_at_real": null, "finished_at_real": null, "project": { "id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "code": "AD-1", "name": "awdawd" }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Test User", "avatar_url": "https://olie-main-dev.s3.amazonaws.com/app/avatars/AKMCHJI5WBPqrvx6aF9okU2dwf4VlOtRg3bN-avatar-1773273837.png" }, "funnel_step": { "id": 181, "name": "tres", "project_funnel_id": 36, "funnel": { "id": 36, "name": "funil do abacaxi" } } }, "recent_executions": [ { "id": "a14afbe7-d2bc-4821-9c2b-7ce295f8a962", "project_id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-03-13T16:00:39.000000Z", "finished_at": "2026-03-13T20:39:00.000000Z", "hourly_rate": 0, "finished_reason": "self_stop", "started_at_real": null, "finished_at_real": "2026-03-13T19:20:03.000000Z", "project": { "id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "code": "AD-1", "name": "awdawd" }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Test User", "avatar_url": "https://olie-main-dev.s3.amazonaws.com/app/avatars/AKMCHJI5WBPqrvx6aF9okU2dwf4VlOtRg3bN-avatar-1773273837.png" }, "funnel_step": { "id": 181, "name": "tres", "project_funnel_id": 36, "funnel": { "id": 36, "name": "funil do abacaxi" } } }, { "id": "a14afbe7-d2bc-4821-9c2b-7ce295f8a961", "project_id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-03-13T10:00:39.000000Z", "finished_at": "2026-03-13T15:20:03.000000Z", "hourly_rate": 0, "finished_reason": "self_stop", "started_at_real": null, "finished_at_real": null, "project": { "id": "019c2ffd-f4e9-709f-ae34-d4d149e3585d", "code": "AD-1", "name": "awdawd" }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Test User", "avatar_url": "https://olie-main-dev.s3.amazonaws.com/app/avatars/AKMCHJI5WBPqrvx6aF9okU2dwf4VlOtRg3bN-avatar-1773273837.png" }, "funnel_step": { "id": 181, "name": "tres", "project_funnel_id": 36, "funnel": { "id": 36, "name": "funil do abacaxi" } } } ], "hidden_timers": false, "total_time": 38140, "idle_time": 27734, "current_project_total_time": 38140, "current_step_total_time": 38140 } } } } }, "tags": [ "projects", "{id}", "project-execution" ] }, "parameters": [ { "name": "project_execution_id", "in": "path", "required": true, "deprecated": false, "schema": { "type": "string", "format": "uuid" }, "example": "aeb08293-dfd2-365f-9867-93c1251db399" } ] }, "/api/management/invites": { "get": { "summary": "Listar convites", "responses": { "200": { "description": "Sucesso", "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" }, "invites": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "token": { "type": "string" }, "email": { "type": "string", "format": "email" }, "frame_id": { "type": "string" }, "is_expired": { "type": "boolean" }, "role_ids": { "type": "array", "items": { "type": "integer" } }, "funnel_access": { "type": "array", "items": { "type": "object", "properties": { "index_all": { "type": "boolean" }, "step_change": { "type": "boolean" }, "index_created": { "type": "boolean" }, "index_assigned": { "type": "boolean" }, "project_funnel_id": { "type": "integer" } } } }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } } }, "example": { "response": true, "invites": [ { "id": 19, "token": "585A52F30336EE64616075FC4984D7A0", "email": "user@example.com", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "is_expired": false, "user_id": null, "role_ids": [ 6, 1 ], "funnel_access": [ { "index_all": true, "step_change": true, "index_created": true, "index_assigned": true, "project_funnel_id": 46 }, { "index_all": true, "step_change": true, "index_created": true, "index_assigned": true, "project_funnel_id": 55 }, { "index_all": true, "step_change": true, "index_created": true, "index_assigned": true, "project_funnel_id": 49 }, { "index_all": true, "step_change": true, "index_created": true, "index_assigned": true, "project_funnel_id": 48 } ], "created_at": "2026-04-16T15:05:55.000000Z", "updated_at": "2026-04-16T15:05:55.000000Z" }, { "id": 21, "token": "B2F08265A7B9016EC6C42EF1FEF3A58D", "email": "user2@example.com", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "user_id": null, "role_ids": [ 6, 1 ], "funnel_access": [ { "index_all": true, "step_change": true, "index_created": true, "index_assigned": true, "project_funnel_id": 46 }, { "index_all": true, "step_change": true, "index_created": true, "index_assigned": true, "project_funnel_id": 55 }, { "index_all": true, "step_change": true, "index_created": true, "index_assigned": true, "project_funnel_id": 49 }, { "index_all": true, "step_change": true, "index_created": true, "index_assigned": true, "project_funnel_id": 48 } ], "created_at": "2026-04-16T15:05:55.000000Z", "updated_at": "2026-04-16T15:05:55.000000Z" } ] } } } }, "401": { "description": "Não autorizado", "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" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "unauthorized", "error": "Unauthenticated." } } } } }, "tags": [ "invites" ] }, "post": { "summary": "Enviar convites", "responses": { "201": { "description": "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" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "invites": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "frame_id": { "type": "string" }, "email": { "type": "string", "format": "email" }, "role_ids": { "type": "array", "items": { "type": "integer" } }, "funnel_access": { "type": "array", "items": { "type": "object", "properties": { "project_funnel_id": { "type": "integer" }, "index_all": { "type": "boolean" }, "index_assigned": { "type": "boolean" }, "index_created": { "type": "boolean" }, "step_change": { "type": "boolean" } } } }, "token": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } } } } } }, "example": { "response": true, "invites": [ { "id": 64, "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "email": "user4@example.com", "role_ids": [ 7, 1 ], "funnel_access": [ { "project_funnel_id": 112, "index_all": false, "index_assigned": true, "index_created": false, "step_change": true }, { "project_funnel_id": 42, "index_all": false, "index_assigned": false, "index_created": true, "step_change": true }, { "project_funnel_id": 49, "index_all": true, "index_assigned": true, "index_created": true, "step_change": true } ], "token": "A45DA91B85AC7F67F5BA8F3CD0FC76E1", "updated_at": "2026-04-29T14:06:40.000000Z", "created_at": "2026-04-29T14:06:40.000000Z" }, { "id": 65, "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "email": "user5@example.com", "role_ids": [ 7, 1 ], "funnel_access": [ { "project_funnel_id": 112, "index_all": false, "index_assigned": true, "index_created": false, "step_change": true }, { "project_funnel_id": 42, "index_all": false, "index_assigned": false, "index_created": true, "step_change": true }, { "project_funnel_id": 49, "index_all": true, "index_assigned": true, "index_created": true, "step_change": true } ], "token": "DC40E84BF55B563D11D314D9BBB39FF2", "updated_at": "2026-04-29T14:06:40.000000Z", "created_at": "2026-04-29T14:06:40.000000Z" } ] } } } }, "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": "Convite já enviado para este e-mail", "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" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "email": { "type": "string", "format": "email" } } }, "example": { "response": false, "message": "invite_already_sent", "error": "Invite already sent to this email for this frame", "email": "user3@example.com" } } } } }, "tags": [ "invites" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "description": "Payload para criar um ou mais convites (um por e-mail), com papéis e permissões de acesso a funis.", "properties": { "emails": { "type": "array", "description": "Lista de e-mails que receberão convite. Cada e-mail gera um convite dentro da mesma requisição.", "items": { "type": "string", "format": "email", "description": "Endereço de e-mail do convidado." } }, "role_ids": { "type": "array", "description": "Lista de IDs de papéis (roles) que serão atribuídos ao convidado ao aceitar o convite.", "items": { "type": "integer", "description": "ID do papel (role) a ser associado ao convidado." } }, "funnel_access": { "type": "array", "description": "Lista de permissões por funil que o convidado terá ao aceitar o convite.", "items": { "type": "object", "description": "Configuração de acesso do convidado para um funil específico.", "properties": { "project_funnel_id": { "type": "integer", "description": "ID do funil ao qual as permissões se aplicam." }, "index_all": { "type": "boolean", "description": "Permite listar/visualizar todos os projetos do funil, independentemente de atribuição ou autoria." }, "index_assigned": { "type": "boolean", "description": "Permite listar/visualizar apenas os projetos do funil atribuídos ao usuário." }, "index_created": { "type": "boolean", "description": "Permite listar/visualizar apenas os projetos do funil criados pelo usuário." }, "step_change": { "type": "boolean", "description": "Permite mover projetos de etapa dentro do funil." } } } } } }, "example": { "emails": [ "user3@example.com", "user4@example.com" ], "role_ids": [ 6, 1 ], "funnel_access": [ { "project_funnel_id": 112, "index_all": false, "index_assigned": true, "index_created": false, "step_change": true }, { "project_funnel_id": 42, "index_all": false, "index_assigned": false, "index_created": true, "step_change": true }, { "project_funnel_id": 49, "index_all": true, "index_assigned": true, "index_created": true, "step_change": true } ] } } } } } }, "/api/management/invites/{invite}": { "delete": { "summary": "Deletar convite", "responses": { "200": { "description": "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" }, "Content-Encoding": { "schema": { "type": "string" }, "example": "gzip" }, "Date": { "schema": { "type": "string" }, "example": "Wed, 29 Apr 2026 14:13:22 GMT" }, "Referrer-Policy": { "schema": { "type": "string" }, "example": "strict-origin-when-cross-origin" }, "Server": { "schema": { "type": "string" }, "example": "nginx" }, "Strict-Transport-Security": { "schema": { "type": "string" }, "example": "max-age=31536000; includeSubDomains" }, "Vary": { "schema": { "type": "string" }, "example": "Accept-Encoding" }, "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 }, "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } }, "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." } } } } }, "tags": [ "invites" ] }, "parameters": [ { "name": "invite", "in": "path", "required": true, "schema": { "type": "string" }, "example": "" } ] }, "/api/management/project-funnels/{project_funnel_id}/step-transitions": { "get": { "summary": "Transições de etapas", "parameters": [ { "name": "project_id", "in": "query", "required": false, "description": "ID do projeto utilizado para filtrar as transições do funil", "deprecated": false, "schema": { "type": "string" }, "example": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7" }, { "name": "start_date", "in": "query", "description": "Data inicial do período de busca das transições. Retorna apenas registros com entrada igual ou posterior à data informada", "schema": { "type": "string" }, "example": "2026-05-01" }, { "name": "end_date", "in": "query", "description": "Data final do período de busca das transições. Retorna apenas registros com entrada igual ou anterior à data informada", "schema": { "type": "string" }, "example": "2026-05-15" }, { "name": "funnel_step_id", "in": "query", "description": "ID da etapa do funil utilizado para filtrar as transições", "schema": { "type": "integer" }, "example": 197 }, { "name": "user_id", "in": "query", "description": "ID do usuário responsável pela movimentação do projeto entre etapas", "schema": { "type": "string" }, "example": "019c75de-509e-711a-8933-175cb2514cc5" }, { "name": "page", "in": "query", "description": "Página atual em que os registros serão trazidos", "schema": { "type": "integer" }, "example": 1 } ], "responses": { "200": { "description": "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" } }, "content": { "application/json": { "schema": { "description": "Resposta contendo o histórico de transições entre etapas do funil de um projeto.", "type": "object", "properties": { "funnel_step_transitions": { "type": "array", "description": "Lista de movimentações do projeto entre etapas do funil.", "items": { "description": "Representa uma transição de etapa do funil.", "type": "object", "properties": { "id": { "type": "integer", "description": "Identificador único da transição." }, "entry_time": { "type": "string", "description": "Data e hora em que o projeto entrou na etapa.", "format": "date-time" }, "exit_time": { "type": "string", "description": "Data e hora em que o projeto saiu da etapa. Será null caso ainda esteja ativo nesta etapa.", "format": "date-time" }, "project_id": { "type": "string", "description": "ID do projeto relacionado à transição." }, "funnel_step_id": { "type": "integer", "description": "ID da etapa do funil." }, "exit_parent_id": { "type": "integer", "description": "ID da próxima transição relacionada." }, "entry_user_id": { "type": "string", "description": "ID do usuário responsável pela entrada na etapa." }, "exit_user_id": { "type": "string", "description": "ID do usuário responsável pela saída da etapa." }, "duration_seconds": { "type": "integer", "description": "Tempo total de permanência na etapa em segundos." }, "funnel_step": { "type": "object", "description": "Informações da etapa do funil.", "properties": { "id": { "type": "integer", "description": "ID da etapa." }, "name": { "type": "string", "description": "Nome da etapa do funil." } } }, "exit_parent": { "type": "object", "description": "Próxima transição vinculada a esta movimentação.", "properties": { "id": { "type": "integer", "description": "ID da transição." }, "entry_time": { "type": "string", "description": "Data e hora de entrada na etapa.", "format": "date-time" }, "exit_time": { "type": "string", "description": "Data e hora de saída da etapa.", "format": "date-time" }, "project_id": { "type": "string", "description": "ID do projeto relacionado." }, "funnel_step_id": { "type": "integer", "description": "ID da etapa." }, "exit_parent_id": { "type": "integer", "description": "ID da próxima transição vinculada." }, "entry_user_id": { "type": "string", "description": "ID do usuário responsável pela entrada." }, "exit_user_id": { "type": "string", "description": "ID do usuário responsável pela saída." }, "duration_seconds": { "type": "integer", "description": "Tempo de permanência na etapa em segundos." }, "funnel_step": { "type": "object", "description": "Informações da etapa relacionada.", "properties": { "id": { "type": "integer", "description": "ID da etapa." }, "name": { "type": "string", "description": "Nome da etapa." } } } } }, "entry_user": { "type": "object", "description": "Usuário responsável pela entrada na etapa.", "properties": { "id": { "type": "string", "description": "ID do usuário." }, "name": { "type": "string", "description": "Nome do usuário." }, "avatar_url": { "type": "string", "description": "URL da imagem de avatar do usuário.", "format": "uri" } } }, "exit_user": { "type": "object", "description": "Usuário responsável pela saída da etapa.", "properties": { "id": { "type": "string", "description": "ID do usuário." }, "name": { "type": "string", "description": "Nome do usuário." }, "avatar_url": { "type": "string", "description": "URL da imagem de avatar do usuário.", "format": "uri" } } } } } }, "meta": { "type": "object", "description": "Metadados de paginação da resposta.", "properties": { "current_page": { "type": "integer", "description": "Página atual." }, "from": { "type": "integer", "description": "Índice inicial dos registros retornados." }, "last_page": { "type": "integer", "description": "Última página disponível." }, "per_page": { "type": "integer", "description": "Quantidade de registros por página." }, "to": { "type": "integer", "description": "Índice final dos registros retornados." }, "total": { "type": "integer", "description": "Quantidade total de registros." } } }, "response": { "type": "boolean", "description": "Indica se a requisição foi concluída com sucesso." } } }, "example": { "funnel_step_transitions": [ { "id": 938, "entry_time": "2026-05-07T12:01:19.000000Z", "exit_time": null, "project_id": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7", "funnel_step_id": 197, "exit_parent_id": null, "entry_user_id": "019c75de-509e-711a-8933-175cb2514cc5", "exit_user_id": null, "duration_seconds": null, "funnel_step": { "id": 197, "name": "Desenvolvimento Conceitual" }, "exit_parent": null, "entry_user": { "id": "019c75de-509e-711a-8933-175cb2514cc5", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/00aa99?text=quas" }, "exit_user": null }, { "id": 936, "entry_time": "2026-05-07T11:52:43.000000Z", "exit_time": "2026-05-07T12:01:19.000000Z", "project_id": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7", "funnel_step_id": 200, "exit_parent_id": 938, "entry_user_id": "019c75de-50f0-7366-a948-b8cbdd1841be", "exit_user_id": "019c75de-509e-711a-8933-175cb2514cc5", "duration_seconds": 516, "funnel_step": { "id": 200, "name": "Aprovação do Cliente" }, "exit_parent": { "id": 938, "entry_time": "2026-05-07T12:01:19.000000Z", "exit_time": null, "project_id": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7", "funnel_step_id": 197, "exit_parent_id": null, "entry_user_id": "019c75de-509e-711a-8933-175cb2514cc5", "exit_user_id": null, "duration_seconds": null, "funnel_step": { "id": 197, "name": "Desenvolvimento Conceitual" } }, "entry_user": { "id": "019c75de-50f0-7366-a948-b8cbdd1841be", "name": "Cotestr User", "avatar_url": "https://via.placeholder.com/124x124.png/00aa99?text=quas" }, "exit_user": { "id": "019c75de-509e-711a-8933-175cb2514cc5", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/00aa99?text=quas" } }, { "id": 935, "entry_time": "2026-05-07T11:52:39.000000Z", "exit_time": "2026-05-07T11:52:43.000000Z", "project_id": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7", "funnel_step_id": 197, "exit_parent_id": 936, "entry_user_id": "019c75de-50f0-7366-a948-b8cbdd1841be", "exit_user_id": "019c75de-50f0-7366-a948-b8cbdd1841be", "duration_seconds": 4, "funnel_step": { "id": 197, "name": "Desenvolvimento Conceitual" }, "exit_parent": { "id": 936, "entry_time": "2026-05-07T11:52:43.000000Z", "exit_time": "2026-05-07T12:01:19.000000Z", "project_id": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7", "funnel_step_id": 200, "exit_parent_id": 938, "entry_user_id": "019c75de-50f0-7366-a948-b8cbdd1841be", "exit_user_id": "019c75de-509e-711a-8933-175cb2514cc5", "duration_seconds": 516, "funnel_step": { "id": 200, "name": "Aprovação do Cliente" } }, "entry_user": { "id": "019c75de-50f0-7366-a948-b8cbdd1841be", "name": "Cotestr User", "avatar_url": "https://via.placeholder.com/124x124.png/00aa99?text=quas" }, "exit_user": { "id": "019c75de-50f0-7366-a948-b8cbdd1841be", "name": "Cotestr User", "avatar_url": "https://via.placeholder.com/124x124.png/00aa99?text=quas" } }, { "id": 923, "entry_time": "2026-04-28T12:54:10.000000Z", "exit_time": "2026-05-07T11:52:39.000000Z", "project_id": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7", "funnel_step_id": 201, "exit_parent_id": 935, "entry_user_id": "019c75de-509e-711a-8933-175cb2514cc5", "exit_user_id": "019c75de-50f0-7366-a948-b8cbdd1841be", "duration_seconds": 773909, "funnel_step": { "id": 201, "name": "sTeste de Produto" }, "exit_parent": { "id": 935, "entry_time": "2026-05-07T11:52:39.000000Z", "exit_time": "2026-05-07T11:52:43.000000Z", "project_id": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7", "funnel_step_id": 197, "exit_parent_id": 936, "entry_user_id": "019c75de-50f0-7366-a948-b8cbdd1841be", "exit_user_id": "019c75de-50f0-7366-a948-b8cbdd1841be", "duration_seconds": 4, "funnel_step": { "id": 197, "name": "Desenvolvimento Conceitual" } }, "entry_user": { "id": "019c75de-509e-711a-8933-175cb2514cc5", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/00aa99?text=quas" }, "exit_user": { "id": "019c75de-50f0-7366-a948-b8cbdd1841be", "name": "Cotestr User", "avatar_url": "https://via.placeholder.com/124x124.png/00aa99?text=quas" } } ], "meta": { "current_page": 1, "from": 1, "last_page": 1, "per_page": 30, "to": 4, "total": 4 }, "response": true } } } }, "401": { "description": "Não autorizado", "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" } }, "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 inválidos", "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" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "project_id": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "O campo project id deve ser um UUID válido.", "validation": { "project_id": [ "O campo project id deve ser um UUID válido." ] } } } } } }, "tags": [ "project-funnels", "{project_funnel_id}" ] }, "parameters": [ { "name": "project_funnel_id", "in": "path", "required": true, "schema": { "type": "integer" }, "example": 40 } ] }, "/api/management/spreadsheet-operations": { "get": { "tags": [ "spreadsheet-operations", "index" ], "summary": "Listar operações de planilha", "description": "Lista operações de import/export assíncronas. Suporta paginação e filtros por `action` e `status`.", "operationId": "listarOperacoesDePlanilha", "responses": { "200": { "description": "Lista de operações de planilha retornada com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": true }, "meta": { "type": "object", "title": "Informações de Paginação", "description": "Metadados de paginação", "properties": { "current_page": { "type": "integer", "example": 1 }, "from": { "type": "integer", "example": 1 }, "last_page": { "type": "integer", "example": 1 }, "per_page": { "type": "integer", "example": 30 }, "to": { "type": "integer", "example": 30 }, "total": { "type": "integer", "example": 5 } } }, "spreadsheet_operations": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "action": { "type": "string", "example": "export" }, "type": { "type": "string", "example": "project" }, "status": { "type": "string", "example": "completed" }, "total_rows": { "type": "integer", "example": 120 }, "processed_rows": { "type": "integer", "example": 120 }, "percentage": { "type": "integer", "example": 100 }, "errors_count": { "type": "integer", "example": 0 }, "metadata": { "type": "object" }, "file_name": { "type": "string", "example": "project_2026-06-01-143022.xlsx" }, "initiator_type": { "type": "string", "example": "App\\Models\\User" }, "initiator_id": { "type": "string", "format": "uuid" }, "initiator": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "avatar_url": { "type": "string" } } }, "started_at": { "type": "string", "format": "date-time" }, "completed_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } } }, "example": { "response": true, "meta": { "current_page": 1, "from": 1, "last_page": 1, "per_page": 30, "to": 30, "total": 5 }, "spreadsheet_operations": [ { "id": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7", "action": "export", "type": "project", "status": "completed", "total_rows": 120, "processed_rows": 120, "percentage": 100, "errors_count": 0, "metadata": { "columns": [ "project.id", "project.name" ], "filters": [] }, "file_name": "project_2026-06-01-143022.xlsx", "initiator_type": "App\\Models\\User", "initiator_id": "019c75de-50f0-7366-a948-b8cbdd1841be", "initiator": { "id": "019c75de-50f0-7366-a948-b8cbdd1841be", "name": "Tester", "avatar_url": "https://via.placeholder.com/124x124.png/00aa99?text=quas" }, "started_at": "2026-06-01T14:30:22.000000Z", "completed_at": "2026-06-01T14:31:10.000000Z", "created_at": "2026-06-01T14:30:22.000000Z", "updated_at": "2026-06-01T14:31:10.000000Z" } ] } } } }, "401": { "description": "Não autenticado" }, "403": { "description": "Sem permissão" }, "422": { "description": "Campos inválidos" } } }, "parameters": [ { "name": "page", "in": "query", "description": "Número da página a ser retornada. Começa em 1", "schema": { "type": "integer" }, "example": 1 }, { "name": "perPage", "in": "query", "description": "Quantidade de itens exibidos por página. Define o tamanho da página de resultados", "schema": { "type": "integer" }, "example": 30 }, { "name": "filter[action]", "in": "query", "description": "Filtra pelo tipo de operação: `import` ou `export`.", "schema": { "type": "string", "enum": [ "import", "export" ] }, "example": "export" }, { "name": "filter[status]", "in": "query", "description": "Filtra pelo status exato: `pending`, `processing`, `completed` ou `failed`.", "schema": { "type": "string", "enum": [ "pending", "processing", "completed", "failed" ] }, "example": "completed" } ] }, "/api/management/spreadsheet-operations/import/{type}": { "post": { "tags": [ "spreadsheet-operations", "import" ], "summary": "Importar planilha", "description": "Cria uma operação de import assíncrona (XLSX). O arquivo é processado em background e os erros são consultáveis em `/errors`.", "operationId": "importarPlanilha", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "Arquivo XLSX (até 50MB)." } }, "required": [ "file" ] }, "example": {} } } }, "responses": { "200": { "description": "Operação de import criada com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": true }, "spreadsheet_operation": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "action": { "type": "string", "example": "export" }, "type": { "type": "string", "example": "project" }, "status": { "type": "string", "example": "completed" }, "total_rows": { "type": "integer", "example": 120 }, "processed_rows": { "type": "integer", "example": 120 }, "percentage": { "type": "integer", "example": 100 }, "errors_count": { "type": "integer", "example": 0 }, "metadata": { "type": "object" }, "file_name": { "type": "string", "example": "project_2026-06-01-143022.xlsx" }, "initiator_type": { "type": "string", "example": "App\\Models\\User" }, "initiator_id": { "type": "string", "format": "uuid" }, "initiator": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "avatar_url": { "type": "string" } } }, "started_at": { "type": "string", "format": "date-time" }, "completed_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } }, "example": { "response": true, "spreadsheet_operation": { "id": "c8f6c4a2-31af-f523-ad00-47b2ce67491e", "action": "export", "type": "project", "status": "completed", "total_rows": 120, "processed_rows": 120, "percentage": 100, "errors_count": 0, "metadata": {}, "file_name": "project_2026-06-01-143022.xlsx", "initiator_type": "App\\Models\\User", "initiator_id": "ee989a1d-afe3-4ff7-f4fb-bec440e8b372", "initiator": { "id": "7b6c3328-3066-e4e3-ae36-911996a826da", "name": "string", "avatar_url": "string" }, "started_at": "2026-04-23T17:57:57.942Z", "completed_at": "1980-11-02T01:58:58.018Z", "created_at": "1950-02-26T12:34:00.424Z", "updated_at": "1955-03-13T19:55:56.035Z" } } } } }, "401": { "description": "Não autenticado" }, "403": { "description": "Sem permissão" }, "422": { "description": "Campos inválidos" } } }, "parameters": [ { "name": "type", "in": "path", "required": true, "description": "Tipo de operação. Atualmente: `project`, `customer` ou `contact`.", "schema": { "type": "string", "enum": [ "project", "customer", "contact" ] }, "example": "project" } ] }, "/api/management/spreadsheet-operations/export/{type}/columns": { "get": { "tags": [ "spreadsheet-operations", "export-columns" ], "summary": "Obter colunas do export", "description": "Retorna o catálogo de colunas fixas disponíveis para o tipo especificado.\n\nTipos suportados: `project`, `customer`, `contact`, `form_answer`, `answer_history`, `agent_execution`, `project_execution`.\n\nPara `project`/`customer`/`contact`, as chaves retornadas devem ser usadas no body de `POST /export/{type}` (campo `columns`). Para `form_answer` e `answer_history`, a lista cobre apenas colunas fixas — campos dinâmicos do formulário entram automaticamente no XLSX. Para `agent_execution` e `project_execution`, todas as colunas do catálogo são exportadas (não há seleção via `columns`).", "operationId": "obterColunasDeExportacao", "responses": { "200": { "description": "Colunas retornadas com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": true }, "columns": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "example": "project.id" }, "required": { "type": "boolean", "example": true }, "importable": { "type": "boolean", "example": true } } } } } }, "example": { "response": true, "columns": [ { "key": "project.id", "required": true, "importable": true }, { "key": "project.name", "required": true, "importable": true }, { "key": "project.code", "required": false, "importable": false } ] } } } }, "401": { "description": "Não autenticado" }, "403": { "description": "Sem permissão" }, "422": { "description": "Campos inválidos" } } }, "parameters": [ { "name": "type", "in": "path", "required": true, "description": "Tipo de exportação: `project`, `customer`, `contact`, `form_answer`, `answer_history`, `agent_execution` ou `project_execution`.", "schema": { "type": "string", "enum": [ "project", "customer", "contact", "form_answer", "answer_history", "agent_execution", "project_execution" ] }, "example": "project" } ] }, "/api/management/spreadsheet-operations/export/{type}": { "post": { "tags": [ "spreadsheet-operations", "export" ], "summary": "Exportar planilha", "description": "Cria uma operação de export assíncrona (XLSX). O body depende do `{type}` na URL (veja os schemas abaixo).\n\nA operação fica `pending` e o arquivo fica disponível em `GET /spreadsheet-operations/{operation}/download` após `completed`.", "operationId": "exportarPlanilha", "requestBody": { "content": { "application/json": { "schema": { "title": "Exportação de Planilha", "description": "Payload de exportação. O schema correto depende do `{type}` na URL.", "oneOf": [ { "title": "Export Project", "type": "object", "description": "Payload para `POST /export/project`.", "properties": { "columns": { "type": "array", "description": "Chaves das colunas (deve incluir todas as requiredKeys do catálogo em GET /export/{type}/columns).", "items": { "type": "string" }, "example": [ "project.id", "project.name", "project.customer" ] }, "dynamic_forms": { "type": "array", "description": "Formulários dinâmicos opcionais que entram no layout e no payload de exportação.", "items": { "type": "object", "properties": { "model": { "type": "string", "enum": [ "project", "project_funnel", "funnel_step" ] }, "id": { "type": "string", "format": "uuid", "description": "Obrigatório para `project_funnel` e `funnel_step`." } }, "required": [ "model" ] }, "example": [ { "model": "project" }, { "model": "project_funnel", "id": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7" } ] }, "filters": { "type": "array", "description": "Busca avançada (array de filtros).", "items": { "type": "object" } } }, "required": [ "columns" ] }, { "title": "Export Customer", "type": "object", "description": "Payload para `POST /export/customer`.", "properties": { "columns": { "type": "array", "description": "Chaves das colunas (deve incluir todas as requiredKeys do catálogo em GET /export/{type}/columns).", "items": { "type": "string" }, "example": [ "customer.id", "customer.name" ] }, "include_dynamic_form": { "type": "boolean", "description": "Quando `true`, inclui o formulário dinâmico do frame no payload/colunas do export.", "example": true }, "filters": { "type": "array", "description": "Busca avançada (array de filtros).", "items": { "type": "object" } } }, "required": [ "columns" ] }, { "title": "Export Contact", "type": "object", "description": "Payload para `POST /export/contact`.", "properties": { "columns": { "type": "array", "description": "Chaves das colunas (deve incluir todas as requiredKeys do catálogo em GET /export/{type}/columns).", "items": { "type": "string" }, "example": [ "contact.id", "contact.name" ] }, "include_dynamic_form": { "type": "boolean", "description": "Quando `true`, inclui o formulário dinâmico do frame no payload/colunas do export.", "example": true }, "filters": { "type": "array", "description": "Busca avançada (array de filtros).", "items": { "type": "object" } } }, "required": [ "columns" ] }, { "title": "Export Form Answer", "type": "object", "description": "Payload para `POST /export/form_answer`. Exporta respostas do formulário; colunas dinâmicas vêm das edges do form.", "properties": { "form_id": { "type": "integer", "description": "ID do formulário (do frame atual) cujas respostas serão exportadas.", "example": 18 } }, "required": [ "form_id" ] }, { "title": "Export Answer History", "type": "object", "description": "Payload para `POST /export/answer_history`. Identifica o pivot/modelo cujo histórico de respostas será exportado.", "properties": { "target": { "type": "object", "properties": { "pivot_class": { "type": "string", "description": "FQCN do modelo pivot.", "example": "App\\Models\\Project" }, "form_id": { "type": "integer", "description": "ID do formulário associado ao histórico.", "example": 18 }, "id": { "type": "string", "format": "uuid", "description": "ID do registro pivot (quando aplicável).", "example": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7" }, "father_class": { "type": "string", "description": "FQCN do modelo pai, quando o pivot depende de um pai." }, "father_id": { "type": "string", "format": "uuid", "description": "Obrigatório quando `father_class` é informado." } }, "required": [ "pivot_class", "form_id" ] } }, "required": [ "target" ] }, { "title": "Export Agent Execution", "type": "object", "description": "Payload para `POST /export/agent_execution`. Exporta todas as colunas do catálogo. Body opcional com filtros Spatie QueryBuilder.", "properties": { "filter": { "type": "object", "description": "Filtros Spatie QueryBuilder. Campos: `agent_id`, `status`, `model`, `error`.", "properties": { "agent_id": { "type": "string", "format": "uuid" }, "status": { "type": "string", "enum": [ "pending", "completed", "failed" ], "example": "completed" }, "model": { "type": "string" }, "error": { "type": "string" } }, "example": { "status": "completed" } }, "sort": { "type": "string", "description": "Ordenação Spatie (`campo` ou `-campo`). Campos: `credits_debited`, `tokens_used`, `latency`, `created_at`.", "example": "-created_at" } } }, { "title": "Export Project Execution", "type": "object", "description": "Payload para `POST /export/project_execution`. Exporta todas as colunas do catálogo. Exige `project_id` e/ou `user_id` (ao menos um).", "properties": { "project_id": { "type": "string", "format": "uuid", "description": "UUID do projeto. Obrigatório se `user_id` não for enviado. Requer permissão de view no projeto.", "example": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7" }, "user_id": { "type": "string", "format": "uuid", "description": "UUID do usuário. Obrigatório se `project_id` não for enviado. Requer permissão de view no usuário.", "example": "ee989a1d-afe3-4ff7-f4fb-bec440e8b372" }, "filter": { "type": "object", "description": "Filtros Spatie QueryBuilder. Campos: `user_id`, `funnel_step_id`, `start_date_gt`, `end_date_lt`, `is_running`.", "properties": { "user_id": { "type": "string", "format": "uuid" }, "funnel_step_id": { "type": "integer" }, "start_date_gt": { "type": "string", "format": "date-time" }, "end_date_lt": { "type": "string", "format": "date-time" }, "is_running": { "type": "boolean", "example": false } }, "example": { "is_running": false } }, "sort": { "type": "string", "description": "Ordenação Spatie (`campo` ou `-campo`). Campos: `started_at`, `finished_at`.", "example": "-started_at" } } } ] } } }, "required": true }, "responses": { "200": { "description": "Operação de export criada com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": true }, "spreadsheet_operation": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "action": { "type": "string", "example": "export" }, "type": { "type": "string", "example": "project" }, "status": { "type": "string", "example": "completed" }, "total_rows": { "type": "integer", "example": 120 }, "processed_rows": { "type": "integer", "example": 120 }, "percentage": { "type": "integer", "example": 100 }, "errors_count": { "type": "integer", "example": 0 }, "metadata": { "type": "object" }, "file_name": { "type": "string", "example": "project_2026-06-01-143022.xlsx" }, "initiator_type": { "type": "string", "example": "App\\Models\\User" }, "initiator_id": { "type": "string", "format": "uuid" }, "initiator": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "avatar_url": { "type": "string" } } }, "started_at": { "type": "string", "format": "date-time" }, "completed_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } }, "example": { "response": true, "spreadsheet_operation": { "id": "c8f6c4a2-31af-f523-ad00-47b2ce67491e", "action": "export", "type": "project", "status": "completed", "total_rows": 120, "processed_rows": 120, "percentage": 100, "errors_count": 0, "metadata": {}, "file_name": "project_2026-06-01-143022.xlsx", "initiator_type": "App\\Models\\User", "initiator_id": "ee989a1d-afe3-4ff7-f4fb-bec440e8b372", "initiator": { "id": "7b6c3328-3066-e4e3-ae36-911996a826da", "name": "string", "avatar_url": "string" }, "started_at": "2026-04-23T17:57:57.942Z", "completed_at": "1980-11-02T01:58:58.018Z", "created_at": "1950-02-26T12:34:00.424Z", "updated_at": "1955-03-13T19:55:56.035Z" } } } } }, "401": { "description": "Não autenticado" }, "403": { "description": "Sem permissão" }, "422": { "description": "Campos inválidos" } } }, "parameters": [ { "name": "type", "in": "path", "required": true, "description": "Tipo de exportação: `project`, `customer`, `contact`, `form_answer`, `answer_history`, `agent_execution` ou `project_execution`.", "schema": { "type": "string", "enum": [ "project", "customer", "contact", "form_answer", "answer_history", "agent_execution", "project_execution" ] }, "example": "project" } ] }, "/api/management/spreadsheet-operations/{operation}": { "get": { "tags": [ "spreadsheet-operations", "show" ], "summary": "Detalhar operação", "description": "Retorna os detalhes da operação de import/export especificada.", "operationId": "obterOperacaoDePlanilha", "responses": { "200": { "description": "Operação retornada com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": true }, "spreadsheet_operation": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "action": { "type": "string", "example": "export" }, "type": { "type": "string", "example": "project" }, "status": { "type": "string", "example": "completed" }, "total_rows": { "type": "integer", "example": 120 }, "processed_rows": { "type": "integer", "example": 120 }, "percentage": { "type": "integer", "example": 100 }, "errors_count": { "type": "integer", "example": 0 }, "metadata": { "type": "object" }, "file_name": { "type": "string", "example": "project_2026-06-01-143022.xlsx" }, "initiator_type": { "type": "string", "example": "App\\Models\\User" }, "initiator_id": { "type": "string", "format": "uuid" }, "initiator": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "avatar_url": { "type": "string" } } }, "started_at": { "type": "string", "format": "date-time" }, "completed_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } }, "example": { "response": true, "spreadsheet_operation": { "id": "c8f6c4a2-31af-f523-ad00-47b2ce67491e", "action": "export", "type": "project", "status": "completed", "total_rows": 120, "processed_rows": 120, "percentage": 100, "errors_count": 0, "metadata": {}, "file_name": "project_2026-06-01-143022.xlsx", "initiator_type": "App\\Models\\User", "initiator_id": "ee989a1d-afe3-4ff7-f4fb-bec440e8b372", "initiator": { "id": "7b6c3328-3066-e4e3-ae36-911996a826da", "name": "string", "avatar_url": "string" }, "started_at": "2026-04-23T17:57:57.942Z", "completed_at": "1980-11-02T01:58:58.018Z", "created_at": "1950-02-26T12:34:00.424Z", "updated_at": "1955-03-13T19:55:56.035Z" } } } } }, "401": { "description": "Não autenticado" }, "403": { "description": "Sem permissão" }, "404": { "description": "Não encontrado" } } }, "parameters": [ { "name": "operation", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "example": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7" } ] }, "/api/management/spreadsheet-operations/{operation}/errors": { "get": { "tags": [ "spreadsheet-operations", "errors" ], "summary": "Listar erros da operação", "description": "Lista erros por linha/coluna da operação de import.", "operationId": "listarErrosDaOperacaoDePlanilha", "responses": { "200": { "description": "Lista de erros retornada com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean", "example": true }, "meta": { "type": "object", "properties": { "current_page": { "type": "integer", "example": 1 }, "from": { "type": "integer", "example": 1 }, "last_page": { "type": "integer", "example": 1 }, "per_page": { "type": "integer", "example": 30 }, "to": { "type": "integer", "example": 30 }, "total": { "type": "integer", "example": 4 } } }, "spreadsheet_operation_errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "row": { "type": "integer", "example": 5 }, "column_key": { "type": "string" }, "column_label": { "type": "string" }, "message": { "type": "string" }, "context": { "type": "object" }, "created_at": { "type": "string", "format": "date-time" } } } } } }, "example": { "response": true, "meta": { "current_page": 1, "from": 1, "last_page": 1, "per_page": 30, "to": 4, "total": 4 }, "spreadsheet_operation_errors": [ { "id": "019c75de-50f0-7366-a948-b8cbdd1841be", "row": 5, "column_key": "project.name", "column_label": "Nome", "message": "The name field is required.", "context": null, "created_at": "2026-06-01T14:31:10.000000Z" } ] } } } }, "401": { "description": "Não autenticado" }, "403": { "description": "Sem permissão" }, "404": { "description": "Não encontrado" } } }, "parameters": [ { "name": "operation", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "example": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7" } ] }, "/api/management/spreadsheet-operations/{operation}/download": { "get": { "tags": [ "spreadsheet-operations", "download" ], "summary": "Baixar resultado da operação", "description": "Baixa o arquivo gerado da operação (somente para operações de `export` concluídas com sucesso).", "operationId": "baixarResultadoDaOperacaoDePlanilha", "responses": { "200": { "description": "Arquivo baixado com sucesso" }, "401": { "description": "Não autenticado" }, "403": { "description": "Sem permissão" }, "404": { "description": "Não encontrado" } } }, "parameters": [ { "name": "operation", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "example": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7" } ] }, "/api/management/channels": { "get": { "summary": "Listar canais", "parameters": [ { "name": "project_id", "in": "query", "description": "Filtra os canais por projeto (UUID).", "schema": { "type": "string" }, "example": "" }, { "name": "page", "in": "query", "description": "Número da página a ser retornada. Começa em 1.", "schema": { "type": "integer" }, "example": 1 }, { "name": "perPage", "in": "query", "description": "Quantidade de itens exibidos por página.", "schema": { "type": "integer" }, "example": 30 } ], "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "meta": { "type": "object", "properties": { "current_page": { "type": "integer" }, "from": { "type": "integer" }, "to": { "type": "integer" }, "last_page": { "type": "integer" }, "per_page": { "type": "integer" }, "total": { "type": "integer" } } }, "channels": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "audience": { "type": "string" }, "connector_type": { "type": "string" }, "external_ref": { "type": "string" }, "is_active": { "type": "boolean" }, "project_id": { "type": "string" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } } }, "example": { "response": true, "meta": { "current_page": 1, "from": 1, "to": 2, "last_page": 1, "per_page": 30, "total": 2 }, "channels": [ { "id": "9b2a1c3e-4d5f-6789-abcd-ef0123456789", "name": "WhatsApp João", "audience": "client", "connector_type": "fake", "external_ref": "wpp-5511999999999", "is_active": true, "project_id": "8a1f2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c", "frame_id": "7c0e1d2f-3a4b-5c6d-7e8f-9a0b1c2d3e4f", "created_at": "2026-06-18T12:00:00.000000Z", "updated_at": "2026-06-18T12:00:00.000000Z" }, { "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", "name": "Canal interno", "audience": "internal", "connector_type": null, "external_ref": null, "is_active": true, "project_id": "8a1f2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c", "frame_id": "7c0e1d2f-3a4b-5c6d-7e8f-9a0b1c2d3e4f", "created_at": "2026-06-18T11:00:00.000000Z", "updated_at": "2026-06-18T11:30:00.000000Z" } ] } } } }, "401": { "description": "Não autorizado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "unauthenticated", "error": "Unauthenticated." } } } } }, "tags": [ "channels" ], "description": "Lista os canais do frame, com paginação. Use o filtro `project_id` para restringir os canais de um projeto específico." }, "post": { "summary": "Criar canal", "responses": { "201": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "channel": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "audience": { "type": "string" }, "connector_type": { "type": "string" }, "external_ref": { "type": "string" }, "is_active": { "type": "boolean" }, "project_id": { "type": "string" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } }, "example": { "response": true, "channel": { "id": "9b2a1c3e-4d5f-6789-abcd-ef0123456789", "name": "WhatsApp João", "audience": "client", "connector_type": "fake", "external_ref": "wpp-5511999999999", "is_active": true, "project_id": "8a1f2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c", "frame_id": "7c0e1d2f-3a4b-5c6d-7e8f-9a0b1c2d3e4f", "created_at": "2026-06-18T12:00:00.000000Z", "updated_at": "2026-06-18T12:00:00.000000Z" } } } } }, "422": { "description": "Erro de validação", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "project_id": { "type": "array", "items": { "type": "string" } }, "name": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "The given data was invalid.", "validation": { "project_id": [ "O campo project id é obrigatório." ], "name": [ "O campo name é obrigatório." ] } } } } } }, "tags": [ "channels" ], "description": "Cria um novo canal em um projeto. O canal nasce restrito à equipe (audiência interna) por padrão; defina `audience` como `client` para um canal visível ao cliente. Um `connector_type` opcional liga o canal a um conector externo.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Teste do schema para criar canal" } } }, "example": { "name": "teste-nome-canal" } } } } } }, "/api/management/channels/{channel}": { "put": { "summary": "Atualizar canal", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "channel": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "audience": { "type": "string" }, "connector_type": { "type": "string" }, "external_ref": { "type": "string" }, "is_active": { "type": "boolean" }, "project_id": { "type": "string" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } }, "example": { "response": true, "channel": { "id": "9b2a1c3e-4d5f-6789-abcd-ef0123456789", "name": "WhatsApp João (atualizado)", "audience": "client", "connector_type": "fake", "external_ref": "wpp-5511999999999", "is_active": true, "project_id": "8a1f2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c", "frame_id": "7c0e1d2f-3a4b-5c6d-7e8f-9a0b1c2d3e4f", "created_at": "2026-06-18T12:00:00.000000Z", "updated_at": "2026-06-18T15:30:00.000000Z" } } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "channel_model_not_found", "error": "No query results for model [Channel]." } } } } }, "tags": [ "channels" ], "description": "Atualiza um canal. Todos os campos do body são opcionais — envie apenas o que deve mudar. O projeto do canal não pode ser alterado.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "audience": { "type": "string" }, "is_active": { "type": "boolean" } } }, "example": { "name": "", "audience": "internal", "connector_type": null, "connector_config": null, "external_ref": null, "is_active": true } } } } }, "parameters": [ { "name": "channel", "in": "path", "required": true, "schema": { "type": "string" }, "example": "" } ], "delete": { "summary": "Remover canal", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "channel_model_not_found", "error": "No query results for model [Channel]." } } } } }, "tags": [ "channels" ], "description": "Remove um canal (exclusão lógica). As medias do canal voltam para o canal principal do projeto — não são apagadas." } }, "/api/management/channels/inbound/{external_ref}": { "post": { "summary": "Webhook de entrada do conector", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } }, "404": { "description": "Não encontrado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "channel_model_not_found", "error": "No query results for model [Channel]." } } } } }, "tags": [ "channels" ], "description": "Webhook público de entrada de um conector externo. Resolve o canal pelo identificador externo e registra a mensagem recebida como uma media de entrada no canal. Não usa autenticação de usuário.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } }, "example": { "message": "" } } } } }, "parameters": [ { "name": "external_ref", "in": "path", "required": true, "description": "Identificador externo do canal (resolve o webhook de entrada).", "schema": { "type": "string" }, "example": "" } ] }, "/api/management/integrations": { "post": { "summary": "Create integration (WhatsApp Meta Cloud)", "responses": { "200": { "description": "200" } }, "tags": [ "integrations" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "type": "string" }, "external_ref": { "type": "string" }, "config": { "type": "object" }, "credentials": { "type": "object", "properties": { "phone_number_id": { "type": "string" }, "access_token": { "type": "string" }, "app_secret": { "type": "string" }, "verify_token": { "type": "string" } } }, "is_active": { "type": "boolean" } } }, "example": { "type": "whatsapp_cloud", "external_ref": "5517999990000", "config": {}, "credentials": { "phone_number_id": "123456789012345", "access_token": "EAAG-exemplo-token", "app_secret": "meu-app-secret", "verify_token": "meu-verify-token" }, "is_active": true } } } } }, "get": { "summary": "List integrations", "responses": { "200": { "description": "200" } }, "tags": [ "integrations" ], "security": [ { "BearerAuth": [] } ] } }, "/api/management/integrations/{integration_id}": { "put": { "summary": "Update integration", "responses": { "200": { "description": "200" } }, "tags": [ "integrations" ], "security": [ { "BearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "external_ref": { "type": "string" }, "is_active": { "type": "boolean" } } }, "example": { "external_ref": "5517988887777", "is_active": false } } } } }, "parameters": [ { "name": "integration_id", "in": "path", "required": true, "schema": { "type": "string" }, "example": "{{integration_id}}" } ], "delete": { "summary": "Delete integration", "responses": { "200": { "description": "200" } }, "tags": [ "integrations" ], "security": [ { "BearerAuth": [] } ] } } }, "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } } }, "security": [ { "BearerAuth": [] } ] }