{ "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", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string", "format": "style" } } }, "example": { "response": false, "message": "project_model_not_found", "error": "No query results for model [App\\Models\\Project] :id" } } } } }, "tags": [ "projects", "Projetos" ], "description": "Restaura um projeto que foi deletado, devolvendo-o às listagens com todos os vínculos que tinha." }, "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID (UUID) do projeto deletado.", "schema": { "type": "string", "format": "uuid" }, "example": "{{project_id}}" } ] }, "/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 (UUID) do projeto.", "schema": { "type": "string", "format": "uuid" }, "example": "{{project_id}}" } ], "post": { "summary": "Listar conteúdos do projeto", "parameters": [ { "name": "page", "in": "query", "description": "Página desejada. Padrão `1`.", "schema": { "type": "integer" }, "example": 0 }, { "name": "perPage", "in": "query", "description": "Itens por página. Padrão `30`, máximo `100`.", "schema": { "type": "integer" }, "example": 0 }, { "name": "filter", "in": "query", "required": true, "description": "O que retornar: `default` (tudo, padrão), `content` (apenas conteúdos enviados por pessoas) ou `logs` (apenas registros de atividade).", "deprecated": false, "schema": { "type": "string" }, "example": "" }, { "name": "search", "in": "query", "description": "Termo buscado no texto do conteúdo.", "schema": { "type": "string" }, "example": "" }, { "name": "channel_id", "in": "query", "description": "ID (UUID) do canal cuja conversa deve ser retornada. Sem ele, apenas os conteúdos internos aparecem.", "schema": { "type": "string" }, "example": "" } ], "responses": { "200": { "description": "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": true, "meta": { "current_page": 1, "from": 1, "to": 2, "last_page": 1, "per_page": 30, "total": 2 }, "medias": [ { "id": "019e1a44-2f6d-70bb-9d21-64c0a3e91f77", "name": "proposta-comercial", "technical_name": "proposta-comercial.019e1a44", "type": 2, "extension": "pdf", "text": null, "file_url": "https://cdn.olie.ai/frames/projects/proposta-comercial.pdf", "log": null, "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "created_at": "2026-08-18T14:02:11.000000Z", "updated_at": "2026-08-18T14:02:11.000000Z", "deleted_at": null, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Ana Souza", "avatar_url": null } }, { "id": "019e1a41-0b8c-71f2-a6c4-1de9f5307a10", "name": "description.9f2a1c", "technical_name": "description.9f2a1c", "type": 1, "extension": null, "text": "Cliente aprovou o escopo na reunião de hoje.", "file_url": null, "log": null, "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "created_at": "2026-08-18T13:47:35.000000Z", "updated_at": "2026-08-18T13:47:35.000000Z", "deleted_at": null, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Ana Souza", "avatar_url": null } } ] } } } }, "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": false, "message": "unauthorized", "error": "Unauthenticated." } } } } }, "tags": [ "projects", "Conteúdos e arquivos" ], "description": "Lista os conteúdos de um projeto — textos, arquivos, áudios e registros de atividade — do mais recente para o mais antigo, com paginação.\n\nSem `channel_id`, apenas os conteúdos internos são retornados; informe o ID de um canal para ver a conversa trocada por ele. Consulte [Paginação](https://docs.olie.ai/api-reference/general/pagination)." } }, "/api/management/projects/{project}/step-metrics": { "get": { "tags": [ "projects", "Métricas e previsão" ], "summary": "Obter métricas de etapas do projeto", "description": "Retorna, para cada etapa dos funis em que o projeto está cadastrado, o tempo que ele já passou ali — a soma de todas as passagens encerradas, em segundos. Passagens ainda em curso não entram na conta, e etapas por onde o projeto nunca passou vêm com zero.\n\nPara as métricas do funil como um todo, veja [Métricas do funil](https://docs.olie.ai/guides/funnels/metrics).", "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, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/files": { "get": { "tags": [ "projects", "Conteúdos e arquivos" ], "summary": "Listar arquivos do projeto", "description": "Retorna todos os arquivos ligados ao projeto em um único conjunto: os enviados como conteúdo (no próprio projeto ou em suas tarefas) e os anexados em respostas de formulários. Não tem paginação.", "operationId": "listarTodosOsArquivosAssociadosAUmProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "files": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "extension": { "type": "string" }, "file_url": { "type": "string", "format": "uri" }, "type": { "type": "integer" }, "technical_name": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "origin": { "type": "string" } } } } } }, "example": { "response": true, "files": [ { "name": "contrato-assinado", "extension": "pdf", "file_url": "https://cdn.olie.ai/frames/forms/contrato-assinado.pdf", "type": 2, "technical_name": "contrato-assinado", "created_at": "2026-08-12T09:15:00.000000Z", "origin": "form_answers" }, { "id": "019e1a44-2f6d-70bb-9d21-64c0a3e91f77", "name": "proposta-comercial", "technical_name": "proposta-comercial.019e1a44", "type": 2, "extension": "pdf", "text": null, "file_url": "https://cdn.olie.ai/frames/projects/proposta-comercial.pdf", "log": null, "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "task_id": null, "created_at": "2026-08-18T14:02:11.000000Z", "updated_at": "2026-08-18T14:02:11.000000Z", "deleted_at": null, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Ana Souza", "avatar_url": null } } ] } } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/clone": { "post": { "tags": [ "projects", "Cópia e compartilhamento" ], "summary": "Clonar um projeto", "description": "Cria uma cópia de um projeto existente. Cada parte do projeto é copiada de forma independente: cliente, funis, etiquetas, checklists, respostas de formulários, conteúdos, fórum, grupos e responsáveis só entram no clone quando a opção correspondente é enviada como `true`.\n\nQuem só pode criar projetos a partir de modelos não escolhe as opções: nesse caso o clone é sempre completo, com todas as partes copiadas.", "operationId": "clonarUmProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "frame_id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "integer" }, "impact": { "type": "integer" }, "budget": { "type": "integer" }, "is_template": { "type": "boolean" }, "parent_id": { "nullable": true }, "customer_id": { "nullable": true }, "contact_id": { "nullable": true }, "created_by": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } }, "example": { "response": true, "project": { "id": "019e1c02-77aa-7391-b0d5-5e4a2f8c6b13", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "code": "SC-14", "name": "Shopping Center — Fase 2", "description": "Obra completa do empreendimento", "status": 1, "impact": 9, "budget": 340000, "is_template": false, "parent_id": null, "customer_id": null, "contact_id": null, "created_by": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "created_at": "2026-08-19T11:20:44.000000Z", "updated_at": "2026-08-19T11:20:44.000000Z" } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "prefix": { "type": "string" }, "description": { "type": "string" }, "customer": { "type": "boolean" }, "funnels": { "type": "boolean" }, "clone_tags": { "type": "boolean" }, "checklists": { "type": "boolean" }, "clone_form_answers": { "type": "boolean" }, "form_answers_content": { "nullable": true }, "medias": { "type": "boolean" }, "medias_mention": { "type": "boolean" }, "forum": { "type": "boolean" }, "loose_checklists": { "type": "boolean" }, "loose_form_answers": { "type": "boolean" }, "clone_groups": { "type": "boolean" }, "clone_assignees": { "type": "boolean" } } }, "example": { "name": "Nome do novo projeto", "prefix": "PRJ", "description": "Descrição do novo projeto", "customer": true, "funnels": true, "clone_tags": true, "checklists": true, "clone_form_answers": true, "form_answers_content": null, "medias": false, "medias_mention": false, "forum": false, "loose_checklists": true, "loose_form_answers": true, "clone_groups": true, "clone_assignees": true } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/share": { "post": { "tags": [ "projects", "Cópia e compartilhamento" ], "summary": "Compartilhar um projeto", "description": "Liga ou desliga o compartilhamento público de um projeto e define o que o link exibe. Ao ligar, um token de compartilhamento é gerado (ou reaproveitado, se já existir); ao desligar, o token é descartado e o link deixa de funcionar.\n\nUse `refresh` para invalidar o link atual e gerar um novo. A ativação e a desativação ficam registradas no histórico do projeto.", "operationId": "compartilharProjeto", "responses": { "200": { "description": "Compartilhamento ativado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "result": { "type": "object", "properties": { "id": { "type": "string" }, "frame_id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "share_token": { "type": "string" }, "share_settings": { "type": "object", "properties": { "attributes": { "type": "array", "items": { "type": "string" } } } }, "updated_at": { "type": "string", "format": "date-time" } } } } }, "examples": { "Compartilhamento ativado": { "value": { "response": true, "result": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "code": "SC-1", "name": "Shopping Center", "share_token": "hV3q8Zt1LpXk9RbNsA6y", "share_settings": { "attributes": [ "name", "status", "description", "funnels" ] }, "updated_at": "2026-08-19T11:31:07.000000Z" } } }, "Compartilhamento desativado": { "value": { "response": true, "result": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "code": "SC-1", "name": "Shopping Center", "share_token": null, "share_settings": { "attributes": [] }, "updated_at": "2026-08-19T11:34:52.000000Z" } } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "refresh": { "type": "boolean" }, "settings": { "type": "object", "properties": { "attributes": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "enabled": true, "refresh": false, "settings": { "attributes": [ "name", "status", "description" ] } } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/children": { "get": { "tags": [ "projects", "Hierarquia" ], "summary": "Listar os filhos de um projeto", "description": "Retorna os projetos filhos diretos de um projeto, cada um com a contagem dos próprios filhos, e também o projeto pai do projeto consultado (quando houver). Não desce além do primeiro nível — para a árvore inteira, use a rota de árvore da hierarquia.\n\nConceitos e regras em [Hierarquia de projetos](https://docs.olie.ai/guides/projects/project-hierarchy).", "operationId": "listarTodosOsProjetosFilhosDeUmProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "children": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "integer" }, "parent_id": { "type": "string" }, "impact": { "type": "integer" }, "budget": { "type": "integer" }, "children_count": { "type": "integer" } } } }, "parent": { "nullable": true } } }, "example": { "response": true, "children": [ { "id": "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40", "code": "SC-2", "name": "Fundação", "status": 1, "parent_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "impact": 6, "budget": 120000, "children_count": 2 }, { "id": "019e0f22-8c11-7233-b5a1-77d0c9e41a02", "code": "SC-3", "name": "Estrutura", "status": 1, "parent_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "impact": 7, "budget": 340000, "children_count": 0 } ], "parent": null } } } } }, "parameters": [ { "name": "trashed", "in": "query", "description": "`true` considera também os projetos na lixeira.", "schema": { "type": "string" }, "example": "" }, { "name": "template", "in": "query", "description": "`true` considera os modelos de projeto.", "schema": { "type": "string" }, "example": "" } ] }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/tree": { "get": { "tags": [ "projects", "Hierarquia" ], "summary": "Obter a árvore da hierarquia", "description": "Retorna a árvore completa a partir do projeto informado — filhos, netos e bisnetos — com o nível de cada um, se é raiz ou folha, as estatísticas da estrutura e o caminho (breadcrumb) até o projeto atual.\n\nA plataforma permite até quatro níveis de profundidade; veja [Hierarquia de projetos](https://docs.olie.ai/guides/projects/project-hierarchy).", "operationId": "listarARvoreCompletaDeHierarquiaDeUmProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "data": { "type": "object", "properties": { "current_project": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "breadcrumb": { "type": "string" } } }, "hierarchy_tree": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "integer" }, "parent_id": { "nullable": true }, "level": { "type": "integer" }, "is_root": { "type": "boolean" }, "is_leaf": { "type": "boolean" }, "children_count": { "type": "integer" } } } }, "stats": { "type": "object", "properties": { "level": { "type": "integer" }, "depth": { "type": "integer" }, "children_count": { "type": "integer" }, "descendants_count": { "type": "integer" }, "is_root": { "type": "boolean" }, "is_leaf": { "type": "boolean" } } } } } } }, "example": { "response": true, "data": { "current_project": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "name": "Shopping Center", "breadcrumb": "Shopping Center" }, "hierarchy_tree": [ { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "name": "Shopping Center", "description": "Obra completa do empreendimento", "status": 1, "parent_id": null, "level": 0, "is_root": true, "is_leaf": false, "children_count": 2 }, { "id": "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40", "name": "Fundação", "description": "Serviços de fundação", "status": 1, "parent_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "level": 1, "is_root": false, "is_leaf": false, "children_count": 1 }, { "id": "019e0f23-1a5e-7460-9c33-2b7f8de10c55", "name": "Escavação", "description": null, "status": 2, "parent_id": "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40", "level": 2, "is_root": false, "is_leaf": true, "children_count": 0 } ], "stats": { "level": 0, "depth": 2, "children_count": 2, "descendants_count": 3, "is_root": true, "is_leaf": false } } } } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/stats": { "get": { "tags": [ "projects", "Hierarquia" ], "summary": "Obter estatísticas da hierarquia", "description": "Retorna os números da posição do projeto na estrutura: quantidade de irmãos e de ancestrais, estatísticas da árvore, o caminho até o projeto e a hierarquia a que ele pertence.\n\nConceitos e regras em [Hierarquia de projetos](https://docs.olie.ai/guides/projects/project-hierarchy).", "operationId": "listarEstatSticasDaHierarquiaDeUmProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "data": { "type": "object", "properties": { "project_id": { "type": "string" }, "project_name": { "type": "string" }, "stats": { "type": "object", "properties": { "level": { "type": "integer" }, "depth": { "type": "integer" }, "children_count": { "type": "integer" }, "descendants_count": { "type": "integer" }, "is_root": { "type": "boolean" }, "is_leaf": { "type": "boolean" } } }, "siblings_count": { "type": "integer" }, "ancestors_count": { "type": "integer" }, "hierarchy_breadcrumb": { "type": "string" }, "hierarchy": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" } } } } } } } }, "example": { "response": true, "data": { "project_id": "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40", "project_name": "Fundação", "stats": { "level": 1, "depth": 1, "children_count": 1, "descendants_count": 1, "is_root": false, "is_leaf": false }, "siblings_count": 1, "ancestors_count": 1, "hierarchy_breadcrumb": "Shopping Center > Fundação", "hierarchy": [ { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "code": "SC-1", "name": "Shopping Center" }, { "id": "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40", "code": "SC-2", "name": "Fundação" } ] } } } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/analytics": { "get": { "tags": [ "projects", "Hierarquia" ], "summary": "Obter análises dos descendentes", "description": "Consolida em um único retorno os números de todos os projetos abaixo do projeto informado — financeiro, tarefas, funis e pessoas envolvidas — para uma visão macro da estrutura.\n\nProjetos sem nenhum descendente respondem com erro, já que não há o que consolidar.", "operationId": "listarAnLisesAgregadasDeTodosOsProjetosDescendentes", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "data": { "type": "object", "properties": { "budget": { "type": "object", "properties": { "total_budget": { "type": "integer" }, "average_budget": { "type": "integer" }, "budget_distribution": { "type": "object", "properties": { "120000": { "type": "integer" }, "340000": { "type": "integer" } } }, "projects_with_budget": { "type": "integer" }, "projects_without_budget": { "type": "integer" }, "budget_range": { "type": "object", "properties": { "min": { "type": "integer" }, "max": { "type": "integer" } } } } }, "funnels": { "type": "object", "properties": { "total_funnels": { "type": "integer" }, "average_funnels_per_project": { "type": "number" }, "funnels_per_project": { "type": "object", "properties": { "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40": { "type": "integer" } } }, "projects_per_step": { "type": "object", "properties": { "181": { "type": "integer" } } }, "projects_with_funnels": { "type": "integer" }, "projects_without_funnels": { "type": "integer" } } }, "users": { "type": "object", "properties": { "total_users": { "type": "integer" }, "total_user_assignments": { "type": "integer" }, "average_users_per_project": { "type": "integer" }, "users_by_role": { "type": "object", "properties": { "assignee": { "type": "integer" }, "follower": { "type": "integer" } } }, "users_per_project": { "type": "object", "properties": { "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40": { "type": "integer" } } }, "projects_with_users": { "type": "integer" }, "projects_without_users": { "type": "integer" } } }, "status": { "type": "object", "properties": { "by_status": { "type": "object", "properties": { "1": { "type": "integer" }, "2": { "type": "integer" } } }, "total_projects": { "type": "integer" }, "status_distribution_percentage": { "type": "object", "properties": { "1": { "type": "number" }, "2": { "type": "number" } } } } }, "impact": { "type": "object", "properties": { "by_impact": { "type": "object", "properties": { "6": { "type": "integer" }, "7": { "type": "integer" }, "9": { "type": "integer" } } }, "average_impact": { "type": "number" }, "impact_range": { "type": "object", "properties": { "min": { "type": "integer" }, "max": { "type": "integer" } } }, "high_impact_projects": { "type": "integer" }, "medium_impact_projects": { "type": "integer" }, "low_impact_projects": { "type": "integer" } } }, "hierarchy": { "type": "object", "properties": { "total_levels": { "type": "integer" }, "level_distribution": { "type": "object", "properties": { "1": { "type": "integer" }, "2": { "type": "integer" } } }, "leaf_projects": { "type": "integer" }, "branch_projects": { "type": "integer" }, "branch_to_leaf_ratio": { "type": "number" }, "average_children_per_branch": { "type": "integer" } } }, "timeline": { "type": "object", "properties": { "recent_projects": { "type": "object", "properties": { "last_30_days": { "type": "integer" }, "last_90_days": { "type": "integer" }, "last_365_days": { "type": "integer" } } }, "recently_updated": { "type": "integer" }, "monthly_creation_trend": { "type": "object", "properties": { "2026-06": { "type": "integer" }, "2026-07": { "type": "integer" }, "2026-08": { "type": "integer" } } }, "oldest_project_age_days": { "type": "integer" }, "newest_project_age_days": { "type": "integer" } } } } } } }, "example": { "response": true, "data": { "budget": { "total_budget": 460000, "average_budget": 230000, "budget_distribution": { "120000": 1, "340000": 1 }, "projects_with_budget": 2, "projects_without_budget": 1, "budget_range": { "min": 0, "max": 340000 } }, "funnels": { "total_funnels": 1, "average_funnels_per_project": 0.67, "funnels_per_project": { "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40": 1 }, "projects_per_step": { "181": 1 }, "projects_with_funnels": 1, "projects_without_funnels": 2 }, "users": { "total_users": 2, "total_user_assignments": 3, "average_users_per_project": 1, "users_by_role": { "assignee": 2, "follower": 1 }, "users_per_project": { "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40": 2 }, "projects_with_users": 2, "projects_without_users": 1 }, "status": { "by_status": { "1": 2, "2": 1 }, "total_projects": 3, "status_distribution_percentage": { "1": 66.67, "2": 33.33 } }, "impact": { "by_impact": { "6": 1, "7": 1, "9": 1 }, "average_impact": 7.33, "impact_range": { "min": 6, "max": 9 }, "high_impact_projects": 1, "medium_impact_projects": 2, "low_impact_projects": 0 }, "hierarchy": { "total_levels": 2, "level_distribution": { "1": 2, "2": 1 }, "leaf_projects": 2, "branch_projects": 1, "branch_to_leaf_ratio": 0.5, "average_children_per_branch": 1 }, "timeline": { "recent_projects": { "last_30_days": 1, "last_90_days": 2, "last_365_days": 3 }, "recently_updated": 2, "monthly_creation_trend": { "2026-06": 1, "2026-07": 1, "2026-08": 1 }, "oldest_project_age_days": 74, "newest_project_age_days": 3 } } } } } }, "422": { "description": "Projeto sem descendentes", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "no_descendants_for_analytics", "error": "No descendants found for project" } } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/attach-child": { "post": { "tags": [ "projects", "Hierarquia" ], "summary": "Vincular um projeto filho", "description": "Torna um projeto existente filho direto do projeto informado. O vínculo é recusado quando criaria um ciclo, quando o projeto seria pai de si mesmo ou quando ultrapassaria o limite de quatro níveis de profundidade.\n\nRegras completas em [Hierarquia de projetos](https://docs.olie.ai/guides/projects/project-hierarchy).", "operationId": "vincularProjetoComoFilhoDeOutroProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "data": { "type": "object", "properties": { "parent": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "child": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "new_hierarchy_breadcrumb": { "type": "string" } } } } }, "example": { "response": true, "data": { "parent": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "name": "Shopping Center" }, "child": { "id": "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40", "name": "Fundação" }, "new_hierarchy_breadcrumb": "Shopping Center > Fundação" } } } } }, "422": { "description": "Vínculo inválido", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string", "format": "style" } } }, "example": { "response": false, "message": "invalid_parent_child_relationship", "error": "Cannot attach child: would create invalid hierarchy (loop, depth limit, or self-reference)" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "child_id": { "nullable": true } } }, "example": { "child_id": null } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/detach-child/{child}": { "delete": { "tags": [ "projects", "Hierarquia" ], "summary": "Desvincular um projeto filho", "description": "Desfaz o vínculo entre um projeto pai e um de seus filhos diretos. O projeto desvinculado passa a ser raiz e mantém a própria descendência intacta. Se o projeto informado não for filho direto daquele pai, a operação é recusada.", "operationId": "removerARelaODeHierarquiaEntreUmProjetoPaiESeuProjetoFilho", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "data": { "type": "object", "properties": { "former_parent": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "detached_child": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "is_root": { "type": "boolean" } } } } } } }, "example": { "response": true, "data": { "former_parent": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "name": "Shopping Center" }, "detached_child": { "id": "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40", "name": "Fundação", "is_root": true } } } } } }, "422": { "description": "Projeto não é filho deste pai", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "invalid_parent_child_relationship", "error": "The specified project is not a child of this project" } } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" }, { "name": "child", "in": "path", "required": true, "description": "ID (UUID) do projeto filho a desvincular.", "schema": { "type": "string" }, "example": "" } ] }, "/api/management/projects/{project}/hierarchy/move-to-parent": { "put": { "tags": [ "projects", "Hierarquia" ], "summary": "Mover um projeto para outro pai", "description": "Muda o projeto de lugar na estrutura, colocando-o sob outro pai. Enviar `new_parent_id` como `null` promove o projeto a raiz.\n\nA movimentação é recusada quando criaria um ciclo ou quando a subárvore do projeto ultrapassaria o limite de quatro níveis de profundidade — veja [Hierarquia de projetos](https://docs.olie.ai/guides/projects/project-hierarchy).", "operationId": "moverUmProjetoParaSerFilhoDeOutroProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "data": { "type": "object", "properties": { "project": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "old_parent": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "new_parent": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "new_hierarchy_breadcrumb": { "type": "string" }, "is_root": { "type": "boolean" } } } } }, "example": { "response": true, "data": { "project": { "id": "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40", "name": "Fundação" }, "old_parent": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "name": "Shopping Center" }, "new_parent": { "id": "019e0f22-8c11-7233-b5a1-77d0c9e41a02", "name": "Estrutura" }, "new_hierarchy_breadcrumb": "Shopping Center > Estrutura > Fundação", "is_root": false } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "new_parent_id": { "nullable": true } } }, "example": { "new_parent_id": null } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/hierarchy/promote-to-root": { "put": { "tags": [ "projects", "Hierarquia" ], "summary": "Promover um projeto a raiz", "description": "Desliga o projeto de seu pai, deixando-o como raiz de uma nova estrutura. Os filhos do projeto acompanham a mudança e mantêm as posições relativas entre si. Projetos que já são raiz respondem com erro.", "operationId": "removerUmProjetoDeSuaHierarquiaAtual", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "data": { "type": "object", "properties": { "project": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "is_root": { "type": "boolean" } } }, "former_parent": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } } } } }, "example": { "response": true, "data": { "project": { "id": "019e0f21-4b3c-71a8-8f0e-9c2d5a7b1e40", "name": "Fundação", "is_root": true }, "former_parent": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "name": "Shopping Center" } } } } } }, "422": { "description": "Projeto já é raiz", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" } } }, "example": { "response": false, "message": "Project is already at root level" } } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/loose-checklist": { "get": { "tags": [ "projects", "Checklists avulsos" ], "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", "Checklists avulsos" ], "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, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/loose-checklist/{loose_checklist}": { "put": { "tags": [ "projects", "Checklists avulsos" ], "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", "Checklists avulsos" ], "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, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" }, { "name": "loose_checklist", "in": "path", "required": true, "description": "ID (UUID) do item de checklist avulso.", "schema": { "type": "string" }, "example": "" } ] }, "/api/management/projects/{project}/loose-forms": { "get": { "tags": [ "projects", "Formulários avulsos" ], "summary": "Listar formulários avulsos do projeto", "description": "Retorna os formulários avulsos vinculados ao projeto, cada um acompanhado da definição do formulário correspondente. Formulários avulsos são anexados ao projeto sob demanda, sem depender da etapa em que ele está.", "operationId": "listarFormulRiosAvulsosAssociadosAUmProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "loose_forms": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "project_id": { "type": "string" }, "form_id": { "type": "integer" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "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" }, "deleted_at": { "nullable": true } } } } } } } }, "example": { "response": true, "loose_forms": [ { "id": 412, "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "form_id": 119, "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "created_at": "2026-08-14T10:22:03.000000Z", "updated_at": "2026-08-14T10:22:03.000000Z", "form": { "id": 119, "title": "Vistoria técnica", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "created_at": "2026-02-03T08:00:00.000000Z", "updated_at": "2026-02-03T08:00:00.000000Z", "deleted_at": null } } ] } } } } } }, "post": { "tags": [ "projects", "Formulários avulsos" ], "summary": "Vincular um formulário avulso", "description": "Anexa um formulário existente ao projeto como formulário avulso, deixando-o disponível para resposta independentemente da etapa. O mesmo formulário pode ser anexado mais de uma vez, gerando vínculos distintos.", "operationId": "vinculaUmFormulRioAvulsoAUmProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "loose_form": { "type": "object", "properties": { "id": { "type": "integer" }, "project_id": { "type": "string" }, "form_id": { "type": "integer" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "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" }, "deleted_at": { "nullable": true } } } } } } }, "example": { "response": true, "loose_form": { "id": 412, "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "form_id": 119, "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "created_at": "2026-08-14T10:22:03.000000Z", "updated_at": "2026-08-14T10:22:03.000000Z", "form": { "id": 119, "title": "Vistoria técnica", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "created_at": "2026-02-03T08:00:00.000000Z", "updated_at": "2026-02-03T08:00:00.000000Z", "deleted_at": null } } } } } }, "404": { "description": "Formulário não encontrado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "form_model_not_found", "error": "No query results for model [App\\\\Models\\\\Form] 999999" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "nullable": true } } }, "example": { "id": null } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ] }, "/api/management/projects/{project}/loose-forms/{loose_form}": { "delete": { "tags": [ "projects", "Formulários avulsos" ], "summary": "Desvincular um formulário avulso", "description": "Remove o vínculo entre o projeto e um formulário avulso. O formulário em si continua existindo e pode ser anexado novamente.", "operationId": "desvinculaUmFormulRioAvulsoDeUmProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } } } }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" }, { "name": "loose_form", "in": "path", "required": true, "description": "ID do vínculo entre o projeto e o formulário avulso.", "schema": { "type": "string" }, "example": "" } ] }, "/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", "Projetos" ], "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": "`true` busca entre os modelos de projeto em vez dos projetos comuns.", "schema": { "type": "string" }, "example": "" } ] }, "parameters": [ { "name": "id", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ], "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", "Projetos" ], "description": "Atualiza os dados de um projeto existente. Todos os campos são opcionais — envie apenas o que deve mudar. Vínculos (funis, etiquetas, grupos, filhos) são alterados pelas listas `to_add` e `to_rem`; o que não é citado permanece como está.", "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", "description": "ID do projeto pai na hierarquia. Quando null, o projeto fica na raiz.", "format": "uuid" } } } ] }, "example": { "name": "Nome do projeto", "description": "Descrição detalhada do projeto", "impact": 5, "contact_id": null, "customer_id": null, "status": 1, "budget": 25000, "is_template": false, "parent_id": null, "funnels": { "to_add": [], "to_rem": [] }, "groups": { "to_add": [], "to_rem": [] }, "tags": { "to_add": [], "to_rem": [] }, "users": [ { "user_id": null, "role": "assignee", "action": "add" } ], "childrens": { "to_add": [], "to_rem": [] }, "forecast_dates": [ { "date": "2026-09-01", "project_funnel_id": null } ], "funnel_status": { "project_funnel_id": null, "funnel_status_id": null }, "form_answers": [ { "id": null, "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", "Projetos" ], "description": "Deleta um projeto pelo ID. A exclusão é lógica: o projeto sai das listagens, passa a ser encontrado com `trashed=true` e pode voltar pelo endpoint de restauração." } }, "/api/management/projects/merge": { "post": { "tags": [ "projects", "Cópia e compartilhamento" ], "summary": "Mesclar projetos", "description": "Une dois ou mais projetos em um só. O resultado é um **projeto novo**, criado a partir do projeto principal (`majority`), que recebe os funis, conteúdos, fórum e tarefas de todos os demais.\n\nOs projetos de origem — inclusive o principal — são arquivados e removidos das listagens ao final, com o histórico registrando a mesclagem. Projetos já mesclados anteriormente não podem ser mesclados de novo.", "operationId": "mesclarProjetos", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "frame_id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "integer" }, "impact": { "type": "integer" }, "budget": { "type": "integer" }, "merged_id": { "nullable": true }, "created_by": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } }, "example": { "response": true, "project": { "id": "019e1c19-3b40-7002-8a71-0f6d2c94e5aa", "frame_id": "019c75de-532c-7047-9563-daf1448ca963", "code": "SC-15", "name": "Shopping Center", "description": "Obra completa do empreendimento", "status": 1, "impact": 9, "budget": 340000, "merged_id": null, "created_by": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "created_at": "2026-08-19T11:40:02.000000Z", "updated_at": "2026-08-19T11:40:02.000000Z" } } } } }, "422": { "description": "Projetos insuficientes", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "projects": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "You must select at least 2 projects", "validation": { "projects": [ "You must select at least 2 projects" ] } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "projects": { "type": "array", "items": {} }, "majority": { "nullable": true } } }, "example": { "projects": [], "majority": null } } } } } }, "/api/management/projects/ids": { "post": { "tags": [ "projects", "Projetos" ], "summary": "Listar IDs de projetos", "description": "Retorna somente os IDs dos projetos que correspondem aos filtros enviados, sem paginação e sem os demais dados do projeto. Útil para aplicar uma ação em lote sobre todo o resultado de uma busca.\n\nOs filtros usam o mesmo formato da [busca avançada](https://docs.olie.ai/api-reference/general/advanced-search).", "operationId": "listarIdsDeProjetos", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "project_ids": { "type": "array", "items": { "type": "string" } } } }, "example": { "response": true, "project_ids": [ "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "019e0f22-8c11-7233-b5a1-77d0c9e41a02", "019e0f23-1a5e-7460-9c33-2b7f8de10c55" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "filters": { "type": "array", "items": {} } } }, "example": { "filters": [] } } } } } }, "/api/management/get-projects-by-forecast-dates": { "post": { "tags": [ "projects", "Métricas e previsão" ], "summary": "Listar projetos por data de previsão", "description": "Agrupa os projetos de um funil pelos meses de previsão informados. Para cada par ano/mês a resposta traz os projetos com data prevista naquele mês, a contagem e a soma dos orçamentos — é o que alimenta a visão de calendário do funil.\n\nAceita os mesmos filtros da [busca avançada](https://docs.olie.ai/api-reference/general/advanced-search), aplicados a todos os meses da consulta.", "operationId": "obterProjetosPorDatasDePrevisO", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "dates_with_projects": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "object", "properties": { "year": { "type": "integer" }, "month": { "type": "integer" } } }, "projects": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "integer" }, "impact": { "type": "integer" }, "budget": { "type": "integer" }, "forecast_date": { "type": "string", "format": "date" } } } }, "projects_count": { "type": "integer" }, "projects_budget": { "type": "integer" } } } } } }, "example": { "response": true, "dates_with_projects": [ { "date": { "year": 2026, "month": 9 }, "projects": [ { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "code": "SC-1", "name": "Shopping Center", "status": 1, "impact": 9, "budget": 340000, "forecast_date": "2026-09-14" } ], "projects_count": 1, "projects_budget": 340000 }, { "date": { "year": 2026, "month": 10 }, "projects": [], "projects_count": 0, "projects_budget": 0 } ] } } } }, "422": { "description": "Validação falhou", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "project_funnel_id": { "type": "array", "items": { "type": "string" } }, "dates": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "O campo project funnel id é obrigatório. (and 1 more error)", "validation": { "project_funnel_id": [ "O campo project funnel id é obrigatório." ], "dates": [ "O campo dates é obrigatório." ] } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_funnel_id": { "nullable": true }, "dates": { "type": "array", "items": { "type": "object", "properties": { "year": { "type": "integer" }, "month": { "type": "integer" } } } }, "filters": { "type": "array", "items": {} } } }, "example": { "project_funnel_id": null, "dates": [ { "year": 2026, "month": 9 } ], "filters": [] } } } } } }, "/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", "Conteúdos e arquivos" ], "description": "Envia um conteúdo — texto, áudio ou arquivo — para um ou mais projetos. Cada projeto informado recebe uma entrada própria: quando mais de uma é criada, a resposta traz `medias` (lista) no lugar de `media` (objeto).\n\nÁudio e arquivos são enviados como `multipart/form-data`. Menções escritas no texto disparam as notificações correspondentes — veja [Menções](https://docs.olie.ai/guides/fundamentals/mentions). Projetos que já foram mesclados não aceitam novos conteúdos.", "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": "Página desejada. Padrão `1`.", "schema": { "type": "integer", "default": 1, "minLength": 1 }, "example": 0 }, { "name": "perPage", "in": "query", "required": false, "description": "Itens por página. Padrão `30`, máximo `100`.", "schema": { "type": "integer", "default": 30, "minLength": 1, "maxLength": 100 }, "example": 0 }, { "name": "search", "in": "query", "required": false, "description": "Termo buscado no nome ou no código do projeto.", "schema": { "type": "string", "default": "" }, "example": "" }, { "name": "id", "in": "query", "description": "ID (UUID) de um projeto específico. Quando informado, `search` é ignorado.", "schema": { "type": "string" }, "example": "" }, { "name": "trashed", "in": "query", "required": false, "description": "`true` retorna apenas os projetos na lixeira.", "schema": { "type": "boolean", "default": "" }, "example": false }, { "name": "template", "in": "query", "required": false, "description": "`true` retorna apenas os modelos de projeto.", "schema": { "type": "boolean", "default": "" }, "example": false }, { "name": "sort", "in": "query", "required": false, "description": "Campo de ordenação. Padrão `created_at`.", "schema": { "type": "string", "default": "" }, "example": "" }, { "name": "direction", "in": "query", "required": false, "description": "Direção da ordenação: `asc` ou `desc` (padrão).", "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "example": "" } ], "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": "*" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "projects": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "old_id": { "nullable": true }, "code": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "impact": { "type": "integer" }, "parent_id": { "nullable": true }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "customer_id": { "nullable": true }, "contact_id": { "nullable": true }, "share_token": { "nullable": true }, "share_settings": { "nullable": true }, "merged_id": { "nullable": true }, "status": { "type": "integer" }, "budget": { "type": "integer" }, "is_template": { "type": "boolean" }, "created_by": { "type": "string" }, "deleted_at": { "nullable": true }, "form_answers": { "type": "array", "items": {} }, "tasks": { "type": "array", "items": {} }, "customer": { "nullable": true }, "contact": { "nullable": true }, "funnels": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "pivot": { "type": "object", "properties": { "project_id": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "id": { "type": "integer" }, "statuses_at": { "nullable": true }, "statuses_by": { "nullable": true }, "funnel_status_id": { "nullable": true }, "forecast_date": { "nullable": true }, "realized_forecast_date": { "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "forecast_date_update_count": { "type": "integer" } } }, "tags": { "type": "array", "items": {} } } } }, "funnel_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": { "nullable": true }, "step_backward_id": { "nullable": true }, "order": { "type": "integer" }, "help_text": { "nullable": true }, "form_id": { "nullable": true }, "sort_config": { "nullable": true }, "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" } } }, "funnel_step_blockings": { "type": "array", "items": {} } } } }, "tags": { "type": "array", "items": {} }, "groups": { "type": "array", "items": {} }, "users": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "avatar_url": { "type": "string", "format": "uri" }, "pivot": { "type": "object", "properties": { "project_id": { "type": "string" }, "user_id": { "type": "string" }, "role": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } } }, "frame": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "subdomain": { "type": "string" }, "model_forms": { "nullable": true } } }, "form": { "nullable": true }, "executors": { "type": "array", "items": {} }, "costs": { "nullable": true } } } }, "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": "019b140c-235d-73ee-96df-3d2afbf7d13d", "old_id": null, "code": "P-80", "name": "Demogorgon", "description": "Criação rápida", "impact": 10, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-12T19:31:38.000000Z", "updated_at": "2025-12-12T19:31:38.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 0, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [ { "id": 665, "name": "Educação Corporativa", "pivot": { "project_id": "019b140c-235d-73ee-96df-3d2afbf7d13d", "project_funnel_id": 665, "id": 42806, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": "2025-12-12T19:31:38.000000Z", "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": "019b140c-235d-73ee-96df-3d2afbf7d13d", "funnel_step_id": 3808, "id": 144232, "order": 0, "created_at": "2025-12-12T19:31:38.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [ { "id": "019aeaa3-2370-731c-9008-be759795f449", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/003388?text=facilis", "pivot": { "project_id": "019b140c-235d-73ee-96df-3d2afbf7d13d", "user_id": "019aeaa3-2370-731c-9008-be759795f449", "role": "creator", "created_at": "2025-12-12T19:31:38.000000Z", "updated_at": "2025-12-12T19:31:38.000000Z" } } ], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019b140b-e38e-7207-8016-9bfe6fa1d02f", "old_id": null, "code": "P-79", "name": "Demogorgon", "description": "Criação rápida", "impact": 10, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-12T19:31:22.000000Z", "updated_at": "2025-12-12T19:31:22.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 0, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [ { "id": "019aeaa3-2370-731c-9008-be759795f449", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/003388?text=facilis", "pivot": { "project_id": "019b140b-e38e-7207-8016-9bfe6fa1d02f", "user_id": "019aeaa3-2370-731c-9008-be759795f449", "role": "creator", "created_at": "2025-12-12T19:31:22.000000Z", "updated_at": "2025-12-12T19:31:22.000000Z" } } ], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019b140a-4503-7141-9e4f-bc720d0f09a3", "old_id": null, "code": "P-78", "name": "Demogorgon", "description": "Criação rápida", "impact": 10, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-12T19:29:36.000000Z", "updated_at": "2025-12-12T19:29:36.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 0, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [ { "id": "019aeaa3-2370-731c-9008-be759795f449", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/003388?text=facilis", "pivot": { "project_id": "019b140a-4503-7141-9e4f-bc720d0f09a3", "user_id": "019aeaa3-2370-731c-9008-be759795f449", "role": "creator", "created_at": "2025-12-12T19:29:36.000000Z", "updated_at": "2025-12-12T19:29:36.000000Z" } } ], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019b1409-4dab-71a4-b8b9-6ca95843e23f", "old_id": null, "code": "P-77", "name": "dwadaw", "description": "Criação rápida", "impact": 10, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-12T19:28:32.000000Z", "updated_at": "2025-12-12T19:28:32.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 0, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [ { "id": "019aeaa3-2370-731c-9008-be759795f449", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/003388?text=facilis", "pivot": { "project_id": "019b1409-4dab-71a4-b8b9-6ca95843e23f", "user_id": "019aeaa3-2370-731c-9008-be759795f449", "role": "creator", "created_at": "2025-12-12T19:28:32.000000Z", "updated_at": "2025-12-12T19:28:32.000000Z" } } ], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019b1404-ad0c-73ed-a279-990911f8c308", "old_id": null, "code": "P-76", "name": "dawijdapwdjaiodjawdoijwdpoaiwjdaiowjdwopdijawpiodajwdoiawjdopawijdaowidjawopdijawdiajwdawijdapwdjaiodjawdoijwdpoaiwjdaiowjdwopdijawpiodajwdoiawjdopawijdaowidjawopdijawdiajwdawijdapwdjaiodjawd", "description": "Criação rápida", "impact": 10, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-12T19:23:29.000000Z", "updated_at": "2025-12-12T19:23:29.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 0, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [ { "id": "019aeaa3-2370-731c-9008-be759795f449", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/003388?text=facilis", "pivot": { "project_id": "019b1404-ad0c-73ed-a279-990911f8c308", "user_id": "019aeaa3-2370-731c-9008-be759795f449", "role": "creator", "created_at": "2025-12-12T19:23:29.000000Z", "updated_at": "2025-12-12T19:23:29.000000Z" } } ], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019b1404-9ffe-719c-8a9d-08cbd2e94e59", "old_id": null, "code": "P-75", "name": "dawijdapwdjaiodjawdoijwdpoaiwjdaiowjdwopdijawpiodajwdoiawjdopawijdaowidjawopdijawdiajwdawijdapwdjaiodjawdoijwdpoaiwjdaiowjdwopdijawpiodajwdoiawjdopawijdaowidjawopdijawdiajwdawijdapwdjaiodjawd", "description": "Criação rápida", "impact": 10, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-12T19:23:26.000000Z", "updated_at": "2025-12-12T19:23:26.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 0, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [ { "id": "019aeaa3-2370-731c-9008-be759795f449", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/003388?text=facilis", "pivot": { "project_id": "019b1404-9ffe-719c-8a9d-08cbd2e94e59", "user_id": "019aeaa3-2370-731c-9008-be759795f449", "role": "creator", "created_at": "2025-12-12T19:23:26.000000Z", "updated_at": "2025-12-12T19:23:26.000000Z" } } ], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019b1404-56b1-70f4-bfc8-8d17d8329811", "old_id": null, "code": "P-74", "name": "teste", "description": "Criação rápida", "impact": 10, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-12T19:23:07.000000Z", "updated_at": "2025-12-12T19:23:07.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 0, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [], "funnel_steps": [], "tags": [], "groups": [], "users": [ { "id": "019aeaa3-2370-731c-9008-be759795f449", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/003388?text=facilis", "pivot": { "project_id": "019b1404-56b1-70f4-bfc8-8d17d8329811", "user_id": "019aeaa3-2370-731c-9008-be759795f449", "role": "creator", "created_at": "2025-12-12T19:23:07.000000Z", "updated_at": "2025-12-12T19:23:07.000000Z" } } ], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019b0dc7-34e0-7312-93b1-841c61594f44", "old_id": null, "code": "P-73", "name": "dawdadwaadw", "description": "Criação rápida", "impact": 10, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-11T14:18:37.000000Z", "updated_at": "2025-12-11T14:18:37.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 0, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [ { "id": 667, "name": "Inovação", "pivot": { "project_id": "019b0dc7-34e0-7312-93b1-841c61594f44", "project_funnel_id": 667, "id": 42805, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": "2025-12-11T14:18:37.000000Z", "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": "019b0dc7-34e0-7312-93b1-841c61594f44", "funnel_step_id": 3817, "id": 144213, "order": 15, "created_at": "2025-12-11T14:18:40.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [ { "id": "019aeaa3-2370-731c-9008-be759795f449", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/003388?text=facilis", "pivot": { "project_id": "019b0dc7-34e0-7312-93b1-841c61594f44", "user_id": "019aeaa3-2370-731c-9008-be759795f449", "role": "creator", "created_at": "2025-12-11T14:18:37.000000Z", "updated_at": "2025-12-11T14:18:37.000000Z" } } ], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019b0dc7-25a9-70f0-a448-e76c6478cb23", "old_id": null, "code": "P-72", "name": "dasdadwa", "description": "Criação rápida", "impact": 10, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-11T14:18:33.000000Z", "updated_at": "2025-12-11T14:18:33.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 0, "is_template": false, "created_by": "019aeaa3-2370-731c-9008-be759795f449", "deleted_at": null, "form_answers": [], "tasks": [], "customer": null, "contact": null, "funnels": [ { "id": 667, "name": "Inovação", "pivot": { "project_id": "019b0dc7-25a9-70f0-a448-e76c6478cb23", "project_funnel_id": 667, "id": 42804, "statuses_at": null, "statuses_by": null, "funnel_status_id": null, "forecast_date": null, "realized_forecast_date": null, "created_at": "2025-12-11T14:18:33.000000Z", "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": "019b0dc7-25a9-70f0-a448-e76c6478cb23", "funnel_step_id": 3817, "id": 144214, "order": 14, "created_at": "2025-12-11T14:18:43.000000Z" }, "funnel_step_blockings": [] } ], "tags": [], "groups": [], "users": [ { "id": "019aeaa3-2370-731c-9008-be759795f449", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/003388?text=facilis", "pivot": { "project_id": "019b0dc7-25a9-70f0-a448-e76c6478cb23", "user_id": "019aeaa3-2370-731c-9008-be759795f449", "role": "creator", "created_at": "2025-12-11T14:18:33.000000Z", "updated_at": "2025-12-11T14:18:33.000000Z" } }, { "id": "019aeaa3-2370-731c-9008-be759795f449", "name": "Test User", "avatar_url": "https://via.placeholder.com/124x124.png/003388?text=facilis", "pivot": { "project_id": "019b0dc7-25a9-70f0-a448-e76c6478cb23", "user_id": "019aeaa3-2370-731c-9008-be759795f449", "role": "assignee", "created_at": "2025-12-11T14:32:52.000000Z", "updated_at": "2025-12-11T14:32:52.000000Z" } } ], "frame": { "id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "name": "OlieDev Company ", "subdomain": "devframe", "model_forms": null }, "form": null, "executors": [], "costs": null }, { "id": "019aeaa3-b747-726b-9918-97f1111156ef", "old_id": null, "code": "P-57", "name": "Escobar Ltda. qui - enim", "description": "Aut at iure et praesentium maiores rerum deserunt. Veniam rerum autem et eos. Ut facere commodi voluptates eius iure voluptatem enim.", "impact": 6, "parent_id": "019aeaa3-b735-716f-8a34-bf32802b5bd8", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 743419.28, "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-b747-726b-9918-97f1111156ef", "project_funnel_id": 667, "id": 42755, "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-b747-726b-9918-97f1111156ef", "funnel_step_id": 3817, "id": 144185, "order": 5, "created_at": "2025-12-11T14:11:07.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-b7c7-7356-9ef1-124acc528805", "old_id": null, "code": "P-64", "name": "Escobar Ltda. qui - tempora - et", "description": "Sint perferendis accusamus consequatur qui et sapiente accusantium. Rerum enim sed placeat aut sapiente soluta nam. Repellat consequuntur facilis occaecati at quae quisquam.", "impact": 1, "parent_id": "019aeaa3-b756-7227-a837-f1f768ba17ed", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 124176.36, "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-b7c7-7356-9ef1-124acc528805", "project_funnel_id": 666, "id": 42752, "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-b7c7-7356-9ef1-124acc528805", "funnel_step_id": 3814, "id": 144129, "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-b756-7227-a837-f1f768ba17ed", "old_id": null, "code": "P-58", "name": "Escobar Ltda. qui - tempora", "description": "Ea facilis quia sed quas et quae velit. Id facilis necessitatibus a eum modi est hic. A vero ut et quisquam impedit. Voluptas quia deserunt animi dignissimos et cumque sed.", "impact": 10, "parent_id": "019aeaa3-b735-716f-8a34-bf32802b5bd8", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 151973.02, "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-b756-7227-a837-f1f768ba17ed", "project_funnel_id": 666, "id": 42751, "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-b756-7227-a837-f1f768ba17ed", "funnel_step_id": 3814, "id": 144128, "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-b77e-708f-ae9d-66763cbb6f6d", "old_id": null, "code": "P-60", "name": "Escobar Ltda. qui - enim - et", "description": "Est voluptas amet et corrupti molestias. Tempora est voluptatem culpa hic. Corporis vitae quia dolor neque repudiandae dolorem.", "impact": 5, "parent_id": "019aeaa3-b747-726b-9918-97f1111156ef", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 972764.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-b77e-708f-ae9d-66763cbb6f6d", "project_funnel_id": 667, "id": 42763, "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": 3815, "name": "Reestruturação Operacional", "project_funnel_id": 667, "sensation_amount": 32, "step_forward_id": null, "step_backward_id": null, "order": 1, "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-b77e-708f-ae9d-66763cbb6f6d", "funnel_step_id": 3815, "id": 144226, "order": 5, "created_at": "2025-12-12T17:07:53.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-b85d-72bb-8cfd-cb980ca952f3", "old_id": null, "code": "P-71", "name": "Escobar Ltda. qui - tempora - reprehenderit - tempora", "description": "Animi quo molestias id fugiat deserunt. Modi voluptates autem eveniet aut ut. Quia fugit nemo omnis et dolorem. Hic expedita nulla occaecati.", "impact": 5, "parent_id": "019aeaa3-b838-7164-a45c-a9cf880dd9c6", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 785931.65, "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-b84b-72c8-9bde-11fdf8a454a0", "old_id": null, "code": "P-70", "name": "Escobar Ltda. qui - tempora - expedita - aliquid", "description": "Esse excepturi accusamus accusamus ut ut aspernatur. Vero perspiciatis debitis est rerum. Dolor neque natus sed quasi distinctio vero.", "impact": 7, "parent_id": "019aeaa3-b829-7324-8cde-03743354e0db", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 538057.72, "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-b838-7164-a45c-a9cf880dd9c6", "old_id": null, "code": "P-69", "name": "Escobar Ltda. qui - tempora - reprehenderit", "description": "Odit culpa voluptatibus quo consequatur ducimus. Officia similique doloribus voluptatibus adipisci sint consectetur voluptas explicabo.", "impact": 9, "parent_id": "019aeaa3-b76a-704e-bea9-78b2ffa18c75", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 392328.69, "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-b829-7324-8cde-03743354e0db", "old_id": null, "code": "P-68", "name": "Escobar Ltda. qui - tempora - expedita", "description": "Eaque voluptas repellendus est. Non occaecati quae saepe. Dolores delectus est est temporibus mollitia dolores repudiandae. Omnis quia nobis iure est. Dolores officia id itaque nesciunt reiciendis.", "impact": 6, "parent_id": "019aeaa3-b76a-704e-bea9-78b2ffa18c75", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 376134.95, "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-b817-72d5-b6c4-117b4f0fce3f", "old_id": null, "code": "P-67", "name": "Escobar Ltda. qui - tempora - cupiditate - eaque", "description": "Et aliquid sed velit qui harum quas vel. Dolor ipsum magni alias qui repellendus expedita sit. Tenetur totam repellendus nulla et. Fugit ratione et voluptates fugiat odio.", "impact": 3, "parent_id": "019aeaa3-b7ee-7052-b936-5fa0923dff73", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 586101.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-b802-72de-9db9-022b465fa7cd", "old_id": null, "code": "P-66", "name": "Escobar Ltda. qui - tempora - et - deleniti", "description": "Qui quisquam dolores sit voluptatem voluptatem. Harum ut quo non qui quod cum fugit. Ut et recusandae quia dicta nostrum.", "impact": 10, "parent_id": "019aeaa3-b7c7-7356-9ef1-124acc528805", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 844116.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-b79f-7136-9b03-4b3522635da0", "old_id": null, "code": "P-62", "name": "Escobar Ltda. qui - enim - et - nam", "description": "Id ut enim est. Aut dolorum et quo deleniti fuga. Consequatur corporis magni odit voluptas qui ut sit. Molestias pariatur ut natus temporibus ut in aliquid.", "impact": 6, "parent_id": "019aeaa3-b77e-708f-ae9d-66763cbb6f6d", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 414516.2, "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-b735-716f-8a34-bf32802b5bd8", "old_id": null, "code": "P-56", "name": "Escobar Ltda. qui", "description": "Sunt eos optio placeat repellendus expedita natus. Eligendi ullam adipisci quis autem. Ducimus sit earum eaque sit possimus recusandae ab.", "impact": 7, "parent_id": null, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 735533.87, "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-b725-7280-bd62-f6db9b4259db", "old_id": null, "code": "P-55", "name": "Projeto Complexo Raiz - nihil - et - aut", "description": "Sit harum quasi officiis assumenda deleniti vel aspernatur. Hic commodi soluta quia officia. Ex id et dignissimos ut non.", "impact": 7, "parent_id": "019aeaa3-b68d-7105-b1cd-0e8409271926", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 806353.5, "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-b725-7280-bd62-f6db9b4259db", "project_funnel_id": 666, "id": 42748, "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-b725-7280-bd62-f6db9b4259db", "funnel_step_id": 3814, "id": 144125, "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-b6f9-72ce-9a2a-3eb06f384ab5", "old_id": null, "code": "P-54", "name": "Projeto Complexo Raiz - nihil - molestias - culpa", "description": "Voluptas ut perspiciatis quia harum vitae iure. Deserunt ea sed sit et non eos. Ex earum voluptatem voluptatem delectus a excepturi.", "impact": 2, "parent_id": "019aeaa3-b67e-7149-9966-0c55b4b9b2a8", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 45691.3, "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-b6f9-72ce-9a2a-3eb06f384ab5", "project_funnel_id": 665, "id": 42739, "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-b6f9-72ce-9a2a-3eb06f384ab5", "funnel_step_id": 3808, "id": 144116, "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-b6e8-7270-918b-84772673fec7", "old_id": null, "code": "P-53", "name": "Projeto Complexo Raiz - quibusdam - mollitia", "description": "Et eum deleniti praesentium aut autem. Et necessitatibus omnis at inventore. Laboriosam quisquam blanditiis et et. Quo voluptatem sit et voluptas.", "impact": 6, "parent_id": "019aeaa3-b66d-7088-9f8f-1a4d1b01e774", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 874936.31, "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-b6da-7025-a386-e1862820e450", "old_id": null, "code": "P-52", "name": "Projeto Complexo Raiz - quibusdam - asperiores", "description": "Sunt officia quo ducimus. Sint repellendus repellat illum facilis sit sed nihil ut. Repudiandae voluptatem id recusandae quis.", "impact": 6, "parent_id": "019aeaa3-b66d-7088-9f8f-1a4d1b01e774", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 626667.46, "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-b6c9-700f-a885-eadd8e635941", "old_id": null, "code": "P-51", "name": "Projeto Complexo Raiz - mollitia - expedita", "description": "Aspernatur voluptates est adipisci odit ad. Quo eaque est et perspiciatis rerum. Ut fuga vel repudiandae est. Modi adipisci et provident nam dolore optio numquam. Debitis ea quis ea est voluptatem.", "impact": 2, "parent_id": "019aeaa3-b660-7270-b47d-46e094729100", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 4, "budget": 178639.31, "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-b6bb-728c-8191-01283e2623b0", "old_id": null, "code": "P-50", "name": "Projeto Complexo Raiz - mollitia - et", "description": "Nulla dolor sed fugit sed ea eos ex. Corporis inventore saepe nobis expedita molestiae repellendus. Dicta corporis et voluptatem beatae voluptatem inventore inventore id.", "impact": 8, "parent_id": "019aeaa3-b660-7270-b47d-46e094729100", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 925757.89, "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-b6ab-7139-9f43-0b8133dcc038", "old_id": null, "code": "P-49", "name": "Projeto Complexo Raiz - sint - sint", "description": "Sunt minima aut eos dicta impedit nihil atque. Corporis dignissimos id voluptas est occaecati et libero est. Nisi quis beatae unde quia. Ex quo quia recusandae ipsa qui eligendi.", "impact": 10, "parent_id": "019aeaa3-b650-71b5-ac4b-3465d17cf219", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 2, "budget": 656502.58, "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-b6ab-7139-9f43-0b8133dcc038", "project_funnel_id": 667, "id": 42766, "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-b6ab-7139-9f43-0b8133dcc038", "funnel_step_id": 3817, "id": 144188, "order": 7, "created_at": "2025-12-11T14:14:06.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-b69d-70b8-b7ae-cbed424cd04d", "old_id": null, "code": "P-48", "name": "Projeto Complexo Raiz - sint - dolores", "description": "Quas velit aut earum cupiditate. Qui at quaerat neque aperiam voluptatem. Nobis illum ducimus quae placeat et et. Voluptas recusandae quia deserunt quia.", "impact": 1, "parent_id": "019aeaa3-b650-71b5-ac4b-3465d17cf219", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 3, "budget": 842332.7, "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-b68d-7105-b1cd-0e8409271926", "old_id": null, "code": "P-47", "name": "Projeto Complexo Raiz - nihil - et", "description": "Cupiditate qui eveniet rem in tenetur. Quis consequuntur sit ea et. Et sit aut ut explicabo. Reiciendis cumque quidem quo cupiditate ut.", "impact": 1, "parent_id": "019aeaa3-b642-7107-88a9-fbf40c7028d0", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2025-12-04T18:33:09.000000Z", "updated_at": "2025-12-04T18:33:09.000000Z", "customer_id": null, "contact_id": null, "share_token": null, "share_settings": null, "merged_id": null, "status": 1, "budget": 324996.46, "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": 78 }, "response": true } } } }, "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": "*" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "unauthorized", "error": "Unauthenticated." } } } } }, "tags": [ "projects", "Projetos" ], "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)\n- [Paginação](https://docs.olie.ai/api-reference/general/pagination)" }, "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": "*" } }, "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": "Erro de validação", "headers": { "Transfer-Encoding": { "schema": { "type": "string" }, "example": "chunked" }, "Connection": { "schema": { "type": "string" }, "example": "keep-alive" } }, "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" } }, "description": { "type": "array", "items": { "type": "string" } }, "impact": { "type": "array", "items": { "type": "string" } }, "status": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "O campo nome é obrigatório. (and 3 more errors)", "validation": { "name": [ "O campo nome é obrigatório." ], "description": [ "O campo descrição deve ser uma string." ], "impact": [ "O campo impact não pode ser superior a 10." ], "status": [ "O status selecionado é inválido." ] } } } } } }, "tags": [ "projects", "Projetos" ], "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", "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", "description": "ID único (UUID) do contato associado ao projeto. Campo opcional que permite 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 vincular um cliente específico ao projeto.", "format": "uuid" }, "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, "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.", "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.", "items": { "type": "object" } }, "forecast_dates": { "type": "array", "description": "Array de objetos para definir datas de previsão por funil. Permite associar diferentes datas de previsão a diferentes funis de projeto.", "items": { "type": "object", "properties": { "date": { "type": "string", "example": "2025-06-01", "description": "Data de previsão para o funil de projeto.", "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.", "properties": { "to_add": { "type": "array", "description": "Array de UUIDs dos grupos a serem adicionados ao projeto. Permite associar o projeto a um ou mais grupos.", "items": { "type": "string" } }, "to_rem": { "type": "array", "description": "Array de UUIDs dos grupos a serem removidos do projeto. Permite desassociar o projeto de grupos específicos.", "items": { "type": "string" } } }, "required": [ "to_add", "to_rem" ] }, "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.", "properties": { "to_add": { "type": "array", "description": "Array de IDs das etiquetas a serem adicionadas ao projeto.", "items": { "type": "integer" } }, "to_rem": { "type": "array", "description": "Array de IDs das etiquetas a 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.", "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": 2, "description": "ID do status de funil que será atribuído ao projeto dentro do funil especificado." } }, "required": [ "project_funnel_id" ] }, "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", "description": "Array de objetos para gerenciar usuários associados ao 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. Campo obrigatório dentro do objeto users.", "format": "uuid" }, "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" ] } }, "childrens": { "type": "object", "description": "Objeto para gerenciar projetos filhos associados ao projeto. Contém arrays 'to_add' e 'to_rem' para adicionar ou remover projetos filhos.", "properties": { "to_add": { "type": "array", "description": "Array de UUIDs dos projetos filhos a serem adicionados ao projeto. Permite criar uma hierarquia de projetos.", "items": { "type": "string", "format": "uuid" } }, "to_rem": { "type": "array", "description": "Array de UUIDs dos projetos filhos a serem removidos do projeto.", "items": { "type": "string", "format": "uuid" } } }, "required": [ "to_add", "to_rem" ] }, "parent_id": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440000", "description": "ID do projeto pai na hierarquia. Quando null, o projeto fica na raiz.", "format": "uuid" } }, "required": [ "name" ] }, {} ] }, "example": { "name": "Nome do projeto", "description": "Descrição detalhada do projeto", "impact": 5, "contact_id": null, "customer_id": null, "status": 1, "budget": 25000, "is_template": false, "prefix": "PRJ", "parent_id": null, "funnels": { "to_add": [], "to_rem": [] }, "groups": { "to_add": [], "to_rem": [] }, "tags": { "to_add": [], "to_rem": [] }, "users": [ { "user_id": null, "role": "assignee", "action": "add" } ], "childrens": { "to_add": [], "to_rem": [] }, "forecast_dates": [ { "date": "2026-09-01", "project_funnel_id": null } ], "funnel_status": { "project_funnel_id": null, "funnel_status_id": null }, "form_answers": [ { "id": null, "answer": "Resposta do campo" } ] } } } } } }, "/api/management/projects/search": { "post": { "summary": "Busca avançada de projetos", "parameters": [ { "name": "withPercentage", "in": "query", "description": "`true` acrescenta a cada projeto o percentual de conclusão, a data estimada de término e os dados do cliente.", "schema": { "type": "boolean" }, "example": false } ], "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" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "field": { "type": "array", "items": { "type": "string" } } } }, "file": { "nullable": true }, "stacktrace": { "nullable": true } } }, "example": { "response": false, "message": "validation_errors", "error": "O campo nonExistsFilterField selecionado é inválido.", "validation": { "field": [ "O campo nonExistsFilterField selecionado é inválido." ] }, "file": null, "stacktrace": null } } } } }, "tags": [ "projects", "Projetos" ], "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)\n- [Paginação](https://docs.olie.ai/api-reference/general/pagination)", "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, "perPage": 30 } } } } } }, "/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", "Projetos" ], "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", "prefix": "PRJ", "funnel_step_id": null, "customer_id": null, "contact_id": null, "from_project_template_id": null } } } } } }, "/api/management/project-funnel-link-toggle": { "post": { "tags": [ "project-funnels", "Vínculo com projetos" ], "summary": "Alternar vínculo do funil de projeto", "description": "Liga ou desliga o projeto do funil, conforme o estado atual: se ainda não estiver vinculado, vincula e já coloca o projeto na primeira etapa; se estiver, desvincula e remove o projeto de todas as etapas daquele funil. Funis inativos não aceitam vínculo. Ver [Mover projetos entre etapas](https://docs.olie.ai/guides/funnels/moving-projects).", "operationId": "alternarVNculoDoFunilDeProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } }, "422": { "description": "Funil inativo", "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\\ProjectFunnel\\ToggleProjectFunnelLinkException", "message": "project_funnel_not_active", "error": "The project funnel is not active" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_id": { "nullable": true }, "project_funnel_id": { "nullable": true } } }, "example": { "project_id": null, "project_funnel_id": null } } } } } }, "/api/management/update-project-funnel-status": { "post": { "tags": [ "project-funnels", "Vínculo com projetos" ], "summary": "Atualizar status do funil de projeto", "description": "Define o status do projeto dentro do funil — o marcador de desfecho, como ganho ou perdido. Enviar `status_id` nulo limpa o status. Status conclusivos encerram a participação do projeto no funil, e status configurados como bloqueio impedem a entrada nas etapas bloqueadas. Ver [Etiquetas, status e previsão](https://docs.olie.ai/guides/funnels/tags-and-status).", "operationId": "atualizarStatusDoFunilDeProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "project_funnel_assignment": { "type": "object", "properties": { "id": { "type": "integer" }, "project_id": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "funnel_status_id": { "type": "integer" }, "statuses_at": { "type": "string", "format": "date-time" }, "statuses_by": { "type": "string" }, "forecast_date": { "type": "string", "format": "date-time" }, "realized_forecast_date": { "nullable": true }, "forecast_date_update_count": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } }, "example": { "response": true, "project_funnel_assignment": { "id": 5120, "project_id": "9c2f1a44-3b2e-4a0f-9b7a-1c4c5f7e8d90", "project_funnel_id": 74, "funnel_status_id": 9, "statuses_at": "2026-08-19T11:07:44.000000Z", "statuses_by": "019c75de-509e-711a-8933-175cb2514cc5", "forecast_date": "2026-08-30T00:00:00.000000Z", "realized_forecast_date": null, "forecast_date_update_count": 1, "created_at": "2026-08-02T13:04:11.000000Z", "updated_at": "2026-08-19T11:07:44.000000Z" } } } } }, "422": { "description": "Validação falhou", "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" } }, "funnel_id": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "The project id field is required. (and 1 more error)", "validation": { "project_id": [ "The project id field is required." ], "funnel_id": [ "The funnel id field is required." ] } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_id": { "nullable": true }, "project_funnel_id": { "nullable": true }, "status_id": { "nullable": true } } }, "example": { "project_id": null, "project_funnel_id": null, "status_id": null } } } } } }, "/api/management/get-project-funnels": { "post": { "tags": [ "project-funnels", "Funis" ], "summary": "Obter um funil de projeto", "description": "Retorna a configuração completa de um funil: etapas com checklists, restrições, anexos, formulário e assistentes, além de etiquetas, status, bloqueios, projetos-modelo e área de negócio. Traz também a lista de usuários com acesso ao funil e, quando o autenticado é um usuário, a configuração de quadro dele. Ver [Criar e configurar um funil](https://docs.olie.ai/guides/funnels/creating-funnels) e [Etapas do funil](https://docs.olie.ai/guides/funnels/steps).", "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": null, "include_automations": false, "with_trashed_relations": false } } } } }, "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", "Funis" ], "description": "Lista os funis da conta na ordem de exibição definida pelo usuário, cada um com a área de negócio e as contagens de projetos, etapas, etiquetas, status e anexos. **Só retorna os funis ativos por padrão** — envie `filter[condition]=inactive` para os inativos e `filter[trashed]=with` ou `only` para incluir os arquivados. Funis que o usuário autenticado não tem permissão de ver são omitidos da lista. Ver [Criar e configurar um funil](https://docs.olie.ai/guides/funnels/creating-funnels) e [Filtros básicos](https://docs.olie.ai/api-reference/general/basic-filters).", "parameters": [ { "name": "search", "in": "query", "description": "Termo buscado no nome do funil. Ignorado quando `id` é informado.", "schema": { "type": "string" }, "example": "" }, { "name": "id", "in": "query", "description": "ID de um funil específico. Retorna apenas ele.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[condition]", "in": "query", "description": "Situação do funil: `active` (padrão quando o parâmetro é omitido) ou `inactive`.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[name]", "in": "query", "description": "Nome exato do funil.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[business_area.id]", "in": "query", "description": "ID da área de negócio dona dos funis.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[trashed]", "in": "query", "description": "Arquivados: `with` inclui, `only` retorna apenas eles, `without` (padrão) omite.", "schema": { "type": "string" }, "example": "" } ] } }, "/api/management/toggle-funnel-tag": { "post": { "tags": [ "project-funnels", "Vínculo com projetos" ], "summary": "Alternar vínculo de etiqueta do funil de um projeto", "description": "Aplica ou remove uma etiqueta do projeto, conforme o estado atual. A etiqueta precisa pertencer a um dos funis aos quais o projeto está vinculado. Etiquetas configuradas como bloqueio de etapa impedem o projeto de entrar nas etapas bloqueadas enquanto estiverem aplicadas. Ver [Etiquetas, status e previsão](https://docs.olie.ai/guides/funnels/tags-and-status).", "operationId": "alternarVNculoDeEtiquetaDoFunilDeUmProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } }, "422": { "description": "Etiqueta bloqueia a etapa atual", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "service": { "type": "string" }, "message": { "type": "string" }, "error": { "type": "string" }, "step_blockings": { "type": "array", "items": {} } } }, "example": { "response": false, "service": "App\\Exceptions\\Services\\ProjectFunnel\\FunnelStepBlocking\\FunnelStepBlockingException", "message": "blocked_by_existing_step_blocking", "error": "Blocked by existing step blocking", "step_blockings": [] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_id": { "nullable": true }, "funnel_tag_id": { "nullable": true } } }, "example": { "project_id": null, "funnel_tag_id": null } } } } } }, "/api/management/delete-funnel": { "post": { "tags": [ "project-funnels", "Ciclo de vida" ], "summary": "Arquivar um funil", "description": "Arquiva o funil, tirando-o das listagens do dia a dia sem apagar o histórico — a operação é reversível pelo endpoint de restauração. Só funciona com o funil vazio: havendo qualquer projeto vinculado, a requisição é recusada e o funil permanece como está. Ver [Criar e configurar um funil](https://docs.olie.ai/guides/funnels/creating-funnels).", "operationId": "arquivarFunil", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "project_funnel": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "order": { "type": "integer" }, "condition": { "type": "string" }, "allow_multi_step": { "type": "boolean" }, "project_term": { "nullable": true }, "show_cost_info": { "type": "boolean" }, "allow_execution": { "type": "boolean" }, "business_area_id": { "type": "integer" }, "form_id": { "nullable": true }, "funnel_config_template_id": { "nullable": true }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } } } } }, "example": { "response": true, "project_funnel": { "id": 74, "name": "Comercial", "prefix": "COM", "order": 0, "condition": "active", "allow_multi_step": false, "project_term": null, "show_cost_info": true, "allow_execution": true, "business_area_id": 83, "form_id": null, "funnel_config_template_id": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "created_at": "2026-01-09T20:51:29.000000Z", "updated_at": "2026-08-19T11:07:44.000000Z", "deleted_at": "2026-08-19T11:07:44.000000Z" } } } } }, "422": { "description": "Funil com projetos", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" } } }, "example": { "response": false, "message": "archive_funnel_error_message" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_funnel_id": { "nullable": true } } }, "example": { "project_funnel_id": null } } } } } }, "/api/management/restore-funnel": { "post": { "tags": [ "project-funnels", "Ciclo de vida" ], "summary": "Restaurar um funil", "description": "Traz de volta um funil arquivado, com a configuração que ele tinha. O funil volta a aparecer nas listagens e a aceitar projetos. Ver [Criar e configurar um funil](https://docs.olie.ai/guides/funnels/creating-funnels).", "operationId": "restaurarFunil", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "project_funnel": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "order": { "type": "integer" }, "condition": { "type": "string" }, "allow_multi_step": { "type": "boolean" }, "project_term": { "nullable": true }, "show_cost_info": { "type": "boolean" }, "allow_execution": { "type": "boolean" }, "business_area_id": { "type": "integer" }, "form_id": { "nullable": true }, "funnel_config_template_id": { "nullable": true }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "nullable": true } } } } }, "example": { "response": true, "project_funnel": { "id": 74, "name": "Comercial", "prefix": "COM", "order": 0, "condition": "active", "allow_multi_step": false, "project_term": null, "show_cost_info": true, "allow_execution": true, "business_area_id": 83, "form_id": null, "funnel_config_template_id": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "created_at": "2026-01-09T20:51:29.000000Z", "updated_at": "2026-08-19T11:07:44.000000Z", "deleted_at": null } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_funnel_id": { "nullable": true } } }, "example": { "project_funnel_id": null } } } } } }, "/api/management/clone-funnel": { "post": { "tags": [ "project-funnels", "Ciclo de vida" ], "summary": "Clonar um funil", "description": "Cria uma cópia do funil com toda a configuração — etapas, checklists, restrições, etiquetas, status e anexos — sem trazer os projetos. Sem `name`, a cópia recebe um nome derivado do original. Funis arquivados não podem ser clonados. Ver [Criar e configurar um funil](https://docs.olie.ai/guides/funnels/creating-funnels).", "operationId": "clonarFunil", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "project_funnel": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "order": { "type": "integer" }, "condition": { "type": "string" }, "allow_multi_step": { "type": "boolean" }, "project_term": { "nullable": true }, "show_cost_info": { "type": "boolean" }, "allow_execution": { "type": "boolean" }, "business_area_id": { "type": "integer" }, "form_id": { "nullable": true }, "funnel_config_template_id": { "nullable": true }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "nullable": true } } } } }, "example": { "response": true, "project_funnel": { "id": 98, "name": "Comercial (cópia)", "prefix": "COMC", "order": 11, "condition": "active", "allow_multi_step": false, "project_term": null, "show_cost_info": true, "allow_execution": true, "business_area_id": 83, "form_id": null, "funnel_config_template_id": null, "frame_id": "019b329a-4346-7064-bba3-e7c19057cda4", "created_at": "2026-01-09T20:51:29.000000Z", "updated_at": "2026-08-19T11:07:44.000000Z", "deleted_at": null } } } } }, "422": { "description": "Funil arquivado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" } } }, "example": { "response": false, "message": "cant_clone_archived_project_funnel" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_funnel_id": { "nullable": true }, "name": { "nullable": true } } }, "example": { "project_funnel_id": null, "name": null } } } } } }, "/api/management/project-funnels/reorder": { "post": { "tags": [ "project-funnels", "Funis" ], "summary": "Reordenar funis de projeto", "description": "Define a ordem de exibição dos funis da conta. A posição de cada funil é a posição dele no array enviado — o primeiro ID vira o primeiro funil da lista. Funis arquivados também podem ser reordenados. A ordem vale para toda a conta, não por usuário.", "operationId": "reordenarFunisDeProjeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } }, "422": { "description": "Validação falhou", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "project_funnel_ids": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "The project funnel ids field is required.", "validation": { "project_funnel_ids": [ "The project funnel ids field is required." ] } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_funnel_ids": { "type": "array", "items": {} } } }, "example": { "project_funnel_ids": [] } } } } } }, "/api/management/project-funnel": { "post": { "tags": [ "project-funnels", "Funis" ], "summary": "Criar ou atualizar um funil de projeto", "description": "Salva o funil inteiro de uma vez — é o payload da tela de edição. Sem `id` cria um funil novo; com `id` substitui a configuração do funil existente. **O payload é a verdade final**: etapas, checklists, restrições, etiquetas e status que não vierem na requisição são removidos do funil. Itens que estouram o limite do plano não são criados e voltam listados em `objects_above_limit`, sem derrubar o resto do salvamento. Ver [Criar e configurar um funil](https://docs.olie.ai/guides/funnels/creating-funnels), [Etapas do funil](https://docs.olie.ai/guides/funnels/steps) e [Restrições e bloqueios](https://docs.olie.ai/guides/funnels/restrictions).", "operationId": "criarOuAtualizarFunilDeProjeto", "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" }, "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": "Etiquetas repetidas", "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": false, "message": "repeated_tags_are_not_allowed" } } } } }, "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": "", "prefix": null, "condition": "active", "allow_multi_step": false, "allow_execution": true, "show_cost_info": true, "project_term": null, "form": { "id": null }, "steps": [ { "id": null, "name": "", "help_text": null, "sensation_amount": 0, "allow_execution": true, "show_customer_form": false, "show_contact_form": false, "hide_customer_form_when_linked": false, "hide_contact_form_when_linked": false, "step_forward": { "name": "" }, "step_backward": { "name": "" }, "form": { "id": null }, "sort_config": { "field": "", "direction": "asc", "arguments": [] }, "checklists": [ { "id": null, "name": "", "info": null, "required": false, "order": 0 } ], "restrictions": [ { "name": null, "direction": "incoming", "restriction_type": "step", "target_step_id": null, "target_tag_id": null, "target_status_id": null, "hierarchy_scope": "current", "hierarchy_depth": 1 } ], "attachments": [ { "id": null } ] } ], "tags": [ { "id": null, "name": "", "color": "#E53935", "funnel_step_blockings": [ { "funnel_step_id": null, "automation_bypass": false } ] } ], "funnel_status": [ { "id": null, "name": "", "color": "#43A047", "is_conclusive": false, "funnel_step_blockings": [ { "funnel_step_id": null, "automation_bypass": false } ] } ], "access": [ { "id": null, "index_all": false, "index_assigned": true, "index_created": true } ], "attachments": [ { "id": null } ], "template_projects": [ { "id": null } ] } } } } } }, "/api/management/project-funnels/{project_funnel}": { "put": { "tags": [ "project-funnels", "Funis" ], "summary": "Definir modelo de configuração do funil", "description": "Define qual modelo de configuração de quadro o funil passa a usar. É o único campo que este endpoint altera — o restante da configuração do funil é salvo pelo endpoint de criação/edição. O modelo precisa pertencer ao próprio funil; enviar `null` desfaz a associação. Ver [Configuração do quadro](https://docs.olie.ai/guides/funnels/board-view).", "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": null } } } } } }, "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } }, "422": { "description": "Modelo de outro funil", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "funnel_config_template_id": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "The selected funnel config template id is invalid.", "validation": { "funnel_config_template_id": [ "The selected funnel config template id is invalid." ] } } } } } } }, "parameters": [ { "name": "project_funnel", "in": "path", "required": true, "description": "ID do funil de projeto.", "schema": { "type": "string" }, "example": "" } ] }, "/api/management/funnel-steps/{funnel_step_id}/projects": { "post": { "summary": "Vincular um projeto a uma etapa", "responses": { "200": { "description": "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": "Projeto já vinculado à etapa", "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", "Movimentação de projetos" ], "description": "Vincula um projeto a uma etapa do funil — o mesmo efeito de arrastar o cartão para a coluna. Antes de aceitar, a plataforma verifica, nessa ordem, se o funil está ativo e vinculado ao projeto, as restrições de entrada e saída, os requisitos pendentes da etapa de origem e os bloqueios por etiqueta ou status; qualquer recusa volta com o detalhe do que impediu. Use `unlink_others` para mover o projeto (desvinculando as demais etapas do funil) em vez de deixá-lo em etapas simultâneas. A sequência completa está em [Mover projetos entre etapas](https://docs.olie.ai/guides/funnels/moving-projects), e as regras em [Restrições e bloqueios](https://docs.olie.ai/guides/funnels/restrictions) e [Checklists e formulários obrigatórios](https://docs.olie.ai/guides/funnels/requirements).", "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": null, "unlink_others": true, "force_funnel_link": false } } } } }, "parameters": [ { "name": "funnel_step_id", "in": "path", "required": true, "description": "ID da etapa do funil que receberá o projeto.", "schema": { "type": "string" }, "example": "" } ] }, "/api/management/project-bulk-step-move": { "post": { "tags": [ "funnel-steps", "Movimentação de projetos" ], "summary": "Mover múltiplos projetos de etapa", "description": "Aplica a mesma movimentação a vários projetos de uma vez, com as mesmas verificações da movimentação individual. Projetos que já estão na etapa de destino são ignorados sem erro; qualquer outra recusa — restrição, requisito pendente ou bloqueio — interrompe o lote no projeto em que ocorreu, e os projetos seguintes da lista não são processados. As verificações estão descritas em [Mover projetos entre etapas](https://docs.olie.ai/guides/funnels/moving-projects).", "operationId": "moverMLtiplosProjetosDeEtapa", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "projects": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "parent_id": { "nullable": true }, "code": { "type": "string" }, "name": { "type": "string" }, "description": { "nullable": true }, "impact": { "type": "integer" }, "budget": { "type": "integer" }, "frame_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } } } }, "example": { "response": true, "projects": [ { "id": "9c2f1a44-3b2e-4a0f-9b7a-1c4c5f7e8d90", "parent_id": null, "code": "COM-83", "name": "Implantação Laboratório Hawkins", "description": null, "impact": 1, "budget": 18500, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2026-08-02T13:04:11.000000Z", "updated_at": "2026-08-19T10:41:02.000000Z" }, { "id": "9c2f1a44-77b1-4e52-8d31-2a9f0c6b45ee", "parent_id": null, "code": "COM-91", "name": "Reforma da subestação", "description": null, "impact": 1, "budget": 18500, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2026-08-02T13:04:11.000000Z", "updated_at": "2026-08-19T10:41:02.000000Z" } ] } } } }, "422": { "description": "Validação falhou", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "step_id": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "The step id field is required.", "validation": { "step_id": [ "The step id field is required." ] } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_ids": { "type": "array", "items": {} }, "step_id": { "nullable": true }, "unlink_others": { "type": "boolean" }, "force_funnel_link": { "type": "boolean" } } }, "example": { "project_ids": [], "step_id": null, "unlink_others": true, "force_funnel_link": false } } } } } }, "/api/management/get-available-steps": { "get": { "tags": [ "funnel-steps", "Etapas" ], "summary": "Listar etapas disponíveis", "description": "Lista os funis da conta com suas etapas, etiquetas e status, para alimentar seletores de destino em telas de movimentação, automação e filtros. Os parâmetros `id` e `search` filtram etapas, etiquetas e status ao mesmo tempo e devolvem apenas os funis que tiverem alguma correspondência — `id` tem precedência sobre `search`. Os conceitos estão em [Etapas do funil](https://docs.olie.ai/guides/funnels/steps) e [Etiquetas, status e previsão](https://docs.olie.ai/guides/funnels/tags-and-status).", "operationId": "listarEtapasDisponVeis", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "funnels": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "frame_id": { "type": "string" }, "condition": { "type": "string" }, "allow_multi_step": { "type": "boolean" }, "form_id": { "nullable": true }, "allow_execution": { "type": "boolean" }, "steps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "project_funnel_id": { "type": "integer" }, "form_id": { "nullable": true }, "allow_execution": { "type": "boolean" }, "checklists": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "info": { "nullable": true }, "funnel_step_id": { "type": "integer" }, "required": { "type": "boolean" }, "order": { "type": "integer" } } } } } } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "color": { "type": "string", "format": "color" }, "project_funnel_id": { "type": "integer" } } } }, "funnel_status": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "color": { "type": "string", "format": "color" }, "project_funnel_id": { "type": "integer" } } } } } } } } }, "example": { "response": true, "funnels": [ { "id": 12, "name": "Comercial", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "condition": "active", "allow_multi_step": false, "form_id": null, "allow_execution": true, "steps": [ { "id": 128, "name": "Qualificação", "project_funnel_id": 12, "form_id": null, "allow_execution": true, "checklists": [ { "id": 7, "name": "Confirmar orçamento com o cliente", "info": null, "funnel_step_id": 128, "required": true, "order": 1 } ] } ], "tags": [ { "id": 45, "name": "Urgente", "color": "#E53935", "project_funnel_id": 12 } ], "funnel_status": [ { "id": 9, "name": "Ganho", "color": "#43A047", "project_funnel_id": 12 } ] } ] } } } } }, "parameters": [ { "name": "search", "in": "query", "description": "Termo buscado no nome da etapa, da etiqueta e do status. Ignorado quando `id` é informado.", "schema": { "type": "string" }, "example": "" }, { "name": "id", "in": "query", "description": "ID de uma etapa, etiqueta ou status específico. Retorna somente o funil dono do item.", "schema": { "type": "string" }, "example": "" } ] } }, "/api/management/unlink-project-from-funnel-step": { "post": { "tags": [ "funnel-steps", "Movimentação de projetos" ], "summary": "Desvincular um projeto da etapa do funil", "description": "Desvincula um projeto de uma etapa específica do funil, removendo o card daquela etapa. Só é possível quando o projeto está vinculado a mais de uma etapa do mesmo funil: se aquela for a única, a operação é recusada. A desvinculação fica registrada no histórico de atividades do projeto. Ver [Mover projetos entre etapas](https://docs.olie.ai/guides/funnels/moving-projects).", "operationId": "desvincularProjetoDaEtapaDoFunil", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } }, "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": "This action is unauthorized.", "permission": "projects.edit.9c2f1a44-3b2e-4a0f-9b7a-1c4c5f7e8d90" } } } }, "404": { "description": "Projeto não encontrado", "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] 9c2f1a44-3b2e-4a0f-9b7a-1c4c5f7e8d90" } } } }, "422": { "description": "Única etapa vinculada", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "service": { "type": "string" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "examples": { "Única etapa vinculada": { "value": { "response": false, "service": "App\\Exceptions\\Services\\ProjectFunnel\\FunnelSteps\\UnlinkProjectFromFunnelStepException", "message": "cant_unlink_just_one_step", "error": "When projects has just one steps linked, it can't be unlinked" } }, "Validação falhou": { "value": { "response": false, "message": "validation_errors", "error": "The project id field is required. (and 1 more error)", "validation": { "project_id": [ "The project id field is required." ], "funnel_step_id": [ "The funnel step id field is required." ] } } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_id": { "nullable": true }, "funnel_step_id": { "nullable": true } } }, "example": { "project_id": null, "funnel_step_id": null } } } } } }, "/api/management/get-step-data": { "post": { "tags": [ "funnel-steps", "Etapas" ], "summary": "Obter dados da etapa", "description": "Carrega o conteúdo das colunas do quadro: para cada etapa informada, devolve os projetos visíveis ao usuário autenticado, já recortados por `offset`/`limit`, e o total de projetos da etapa. Com `is_counting` a resposta traz apenas os totalizadores da etapa — contagem e soma de orçamento — sem a lista de projetos, que é o modo usado para montar os cabeçalhos das colunas. O quadro está descrito em [Configuração do quadro](https://docs.olie.ai/guides/funnels/board-view) e o formato de `filters` segue [Busca avançada](https://docs.olie.ai/api-reference/general/advanced-search).", "operationId": "obterDadosDaEtapa", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "steps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "project_funnel_id": { "type": "integer" }, "sort_config": { "nullable": true }, "projects": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "parent_id": { "nullable": true }, "code": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "budget": { "type": "integer" }, "impact": { "type": "integer" }, "frame_id": { "type": "string" }, "children_count": { "type": "integer" }, "customer": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "contact": { "nullable": true }, "tags": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "color": { "type": "string", "format": "color" } } } }, "funnel_steps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } } }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "projects_count": { "type": "integer" } } } } } }, "examples": { "Sucesso": { "value": { "response": true, "steps": [ { "id": 128, "project_funnel_id": 12, "sort_config": null, "projects": [ { "id": "9c2f1a44-3b2e-4a0f-9b7a-1c4c5f7e8d90", "parent_id": null, "code": "COM-83", "name": "Implantação Laboratório Hawkins", "description": "Migração do parque de energia", "budget": 18500, "impact": 1, "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "children_count": 0, "customer": { "id": "019b277f-e453-733d-a00e-6d26d444008b", "name": "Hawkins Energia" }, "contact": null, "tags": [ { "id": 45, "name": "Urgente", "color": "#E53935" } ], "funnel_steps": [ { "id": 128, "name": "Qualificação" } ], "created_at": "2026-08-02T13:04:11.000000Z", "updated_at": "2026-08-14T09:22:47.000000Z" } ], "projects_count": 37 } ] } }, "Sucesso (apenas contagem)": { "value": { "response": true, "steps": [ { "id": 128, "project_funnel_id": 12, "sort_config": null, "projects_count": 37, "projects_budget": 412300 }, { "id": 129, "project_funnel_id": 12, "sort_config": null, "projects_count": 12, "projects_budget": 88750.5 } ] } } } } } }, "422": { "description": "Validação falhou", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "steps": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "The steps field is required.", "validation": { "steps": [ "The steps field is required." ] } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "steps": { "type": "array", "items": { "type": "object", "properties": { "id": { "nullable": true }, "offset": { "type": "integer" }, "limit": { "type": "integer" }, "sorting": { "type": "object", "properties": { "field": { "type": "string" }, "direction": { "type": "string" } } } } } }, "is_counting": { "type": "boolean" }, "filters": { "type": "array", "items": {} }, "date_range": { "type": "object", "properties": { "init": { "nullable": true }, "end": { "nullable": true } } } } }, "example": { "steps": [ { "id": null, "offset": 0, "limit": 20, "sorting": { "field": "", "direction": "desc" } } ], "is_counting": false, "filters": [], "date_range": { "init": null, "end": null } } } } } } }, "/api/management/get-step-attachments": { "get": { "tags": [ "funnel-steps", "Anexos" ], "summary": "Listar anexos de etapas", "description": "Lista todos os anexos de etapa cadastrados na conta — arquivos, links e vídeos — do mais recente para o mais antigo, com o usuário que enviou cada um. A lista não é recortada por etapa: ela é a biblioteca de onde os anexos são vinculados às etapas. O link de download de arquivo é temporário e expira. Ver [Anexos do funil e da etapa](https://docs.olie.ai/guides/funnels/attachments).", "operationId": "obterAnexosDaEtapa", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "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": "boolean" }, "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" }, "deleted_at": { "nullable": true }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "avatar_url": { "nullable": true } } } } } } } }, "example": { "response": true, "attachments": [ { "id": 84, "name": "Como preencher a qualificação", "technical_name": "019b277f-e453-733d-a00e-6d26d444008b.mp4", "extension": "mp4", "file_url": "https://cdn.olie.ai/step-attachments/019b277f-e453-733d-a00e-6d26d444008b.mp4?expires=1755600000", "popup_video": true, "watch": true, "user_id": "019c75de-509e-711a-8933-175cb2514cc5", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2026-07-30T18:12:05.000000Z", "updated_at": "2026-08-11T14:03:44.000000Z", "deleted_at": null, "user": { "id": "019c75de-509e-711a-8933-175cb2514cc5", "name": "Equipe de Processos", "avatar_url": null } }, { "id": 82, "name": "Modelo de proposta comercial", "technical_name": "019b1f04-1c2a-7a3e-9f55-3d6b8e2a1c77.pdf", "extension": "pdf", "file_url": "https://cdn.olie.ai/step-attachments/019b1f04-1c2a-7a3e-9f55-3d6b8e2a1c77.pdf?expires=1755600000", "popup_video": false, "watch": false, "user_id": "019c75de-509e-711a-8933-175cb2514cc5", "frame_id": "019aeaa3-2778-73ec-8f8d-59d06cc59dca", "created_at": "2026-07-22T09:41:19.000000Z", "updated_at": "2026-07-22T09:41:19.000000Z", "deleted_at": null, "user": { "id": "019c75de-509e-711a-8933-175cb2514cc5", "name": "Equipe de Processos", "avatar_url": null } } ] } } } } } } }, "/api/management/update-required-step-attachment": { "post": { "tags": [ "funnel-steps", "Anexos" ], "summary": "Atualizar vídeo obrigatório da etapa", "description": "Marca ou desmarca um anexo de vídeo como de visualização obrigatória. Quando obrigatório, o vídeo abre sozinho para quem move o projeto para a etapa e a janela não pode ser dispensada enquanto a movimentação está em curso; a visualização fica registrada no histórico do projeto. Ver [Anexos do funil e da etapa](https://docs.olie.ai/guides/funnels/attachments).", "operationId": "atualizarVDeoObrigatRioDaEtapa", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } }, "404": { "description": "Anexo não encontrado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "step_attachment_model_not_found", "error": "No query results for model [App\\Models\\StepAttachment] 999999" } } } }, "422": { "description": "Validação falhou", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "id": { "type": "array", "items": { "type": "string" } }, "watch": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "The id field is required. (and 1 more error)", "validation": { "id": [ "The id field is required." ], "watch": [ "The watch field is required." ] } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "nullable": true }, "watch": { "type": "boolean" } } }, "example": { "id": null, "watch": true } } } } } }, "/api/management/steps/{step}/metrics": { "get": { "tags": [ "funnel-steps", "Etapas" ], "summary": "Obter métricas da etapa", "description": "Devolve as métricas de permanência da etapa calculadas sobre o histórico de transições: tempo médio, mínimo e máximo (em segundos) e a contagem de entradas. Cada métrica vem em três janelas — desde a criação da etapa, últimos 7 dias e últimos 30 dias. A leitura dos números e o que cada um indica sobre gargalos estão em [Métricas e tempo por etapa](https://docs.olie.ai/guides/funnels/metrics).", "operationId": "obterMTricasDaEtapa", "responses": { "200": { "description": "Sucesso", "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": 184320.5, "unit": "seconds", "meta_data": null }, "entry_count": { "value": 214, "unit": "count", "meta_data": null }, "max_time": { "value": 1209600, "unit": "seconds", "meta_data": null }, "min_time": { "value": 900, "unit": "seconds", "meta_data": null } }, "last_seven_days": { "average_time": { "value": 93600, "unit": "seconds", "meta_data": null }, "entry_count": { "value": 9, "unit": "count", "meta_data": null }, "max_time": { "value": 259200, "unit": "seconds", "meta_data": null }, "min_time": { "value": 3600, "unit": "seconds", "meta_data": null } }, "last_thirty_days": { "average_time": { "value": 127440, "unit": "seconds", "meta_data": null }, "entry_count": { "value": 41, "unit": "count", "meta_data": null }, "max_time": { "value": 604800, "unit": "seconds", "meta_data": null }, "min_time": { "value": 1800, "unit": "seconds", "meta_data": null } } } } } } }, "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": "This action is unauthorized.", "permission": "project_funnels.see_step_metrics" } } } }, "404": { "description": "Etapa não encontrada", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "funnel_step_model_not_found", "error": "No query results for model [App\\Models\\FunnelStep] 999999" } } } } } }, "parameters": [ { "name": "step", "in": "path", "required": true, "description": "ID da etapa do funil.", "schema": { "type": "integer" }, "example": 0 } ] }, "/api/management/step-assistants/{step_assistant}/execute-manually": { "post": { "tags": [ "step-assistants", "Execução" ], "summary": "Executar um assistente manualmente", "description": "Dispara um assistente sob demanda para um projeto, sem depender da movimentação de etapa.\n\nSó vale para assistentes com gatilho `manual` ou com a execução manual habilitada; os demais respondem como não encontrado. O projeto precisa estar na etapa do assistente e ser visível para quem faz a chamada.\n\nA execução é assíncrona: a resposta apenas confirma o enfileiramento, e o resultado aparece no projeto e no histórico de execuções alguns instantes depois. Um assistente inativo não executa nada e ainda assim responde com sucesso.", "operationId": "executarAssistenteDeEtapaManualmente", "responses": { "200": { "description": "Enfileirado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" } } }, "example": { "response": true } } } }, "404": { "description": "Assistente não aceita execução manual", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "step_assistant_model_not_found", "error": "No query results for model [App\\Models\\StepAssistant] c4e2a7d1-58b6-4f09-a3c7-1e9d24b7f065" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "project_id": { "nullable": true } } }, "example": { "project_id": null } } } } }, "parameters": [ { "name": "step_assistant", "in": "path", "required": true, "description": "ID (UUID) do assistente de etapa.", "schema": { "type": "string" }, "example": "" } ] }, "/api/management/steps/{step}/assistants/execution-logs": { "get": { "tags": [ "step-assistants", "Execução" ], "summary": "Listar execuções dos assistentes", "description": "Histórico de execuções de todos os assistentes de uma etapa, do mais recente para o mais antigo.\n\nCada registro traz o assistente, o projeto, a execução do agente de IA (com o texto devolvido e o modelo usado) e o desfecho de cada destino separadamente: a gravação como conteúdo do projeto e a gravação em campo de formulário têm campos próprios de status e de erro, porque uma pode dar certo e a outra falhar.\n\nAceita filtros e paginação por query params, consulte:\n\n- [Filtro básico](https://docs.olie.ai/api-reference/general/basic-filters)\n- [Paginação](https://docs.olie.ai/api-reference/general/pagination)\n\nOs campos de paginação (`current_page`, `per_page`, `total`, ...) vêm na raiz da resposta, ao lado de `data`, e não dentro de `meta` como no restante da API.", "operationId": "obterRegistrosDeExecuODosAssistentes", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "current_page": { "type": "integer" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "step_assistant_id": { "type": "string" }, "project_id": { "type": "string" }, "agent_execution_id": { "type": "string" }, "status": { "type": "string" }, "result": { "type": "string" }, "media_result_status": { "type": "boolean" }, "media_result_error": { "nullable": true }, "dynamic_form_result_status": { "nullable": true }, "dynamic_form_result_error": { "nullable": true }, "execution_time": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "step_assistant": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "ai_agent_id": { "type": "string" } } }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "code": { "type": "string" } } }, "agent_execution": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "type": "string" }, "response": { "type": "string" }, "model": { "type": "string" } } } } } }, "first_page_url": { "type": "string", "format": "uri" }, "from": { "type": "integer" }, "last_page": { "type": "integer" }, "last_page_url": { "type": "string", "format": "uri" }, "links": { "type": "array", "items": { "type": "object", "properties": { "url": { "nullable": true }, "label": { "type": "string" }, "page": { "nullable": true }, "active": { "type": "boolean" } } } }, "next_page_url": { "nullable": true }, "path": { "type": "string", "format": "uri" }, "per_page": { "type": "integer" }, "prev_page_url": { "nullable": true }, "to": { "type": "integer" }, "total": { "type": "integer" } } }, "example": { "current_page": 1, "data": [ { "id": "e1a90c37-2d64-4f8b-93a5-0b7c46d182ef", "step_assistant_id": "9f1c4b02-6f3a-4b8e-9d21-7c5e0a41b8d3", "project_id": "5d8b3e21-4c07-49f6-a1d3-96b8e70c2f54", "agent_execution_id": "b62f80d4-13c9-4e57-a08d-3f5216c9e7ab", "status": "success", "result": "O cliente pediu revisão do orçamento e aguarda retorno sobre o prazo de entrega.", "media_result_status": true, "media_result_error": null, "dynamic_form_result_status": null, "dynamic_form_result_error": null, "execution_time": "2026-08-18T16:44:09.000000Z", "created_at": "2026-08-18T16:44:02.000000Z", "updated_at": "2026-08-18T16:44:09.000000Z", "step_assistant": { "id": "9f1c4b02-6f3a-4b8e-9d21-7c5e0a41b8d3", "name": "Resumo do atendimento", "ai_agent_id": "2b7d94f6-0c31-4a85-b6e2-58f1c0d93a47" }, "project": { "id": "5d8b3e21-4c07-49f6-a1d3-96b8e70c2f54", "name": "Reforma da fachada", "code": "OBR-114" }, "agent_execution": { "id": "b62f80d4-13c9-4e57-a08d-3f5216c9e7ab", "status": "completed", "response": "O cliente pediu revisão do orçamento e aguarda retorno sobre o prazo de entrega.", "model": "claude-sonnet-5" } }, { "id": "4c72b8f0-9a15-4e63-b0d8-72e5931ac48f", "step_assistant_id": "c4e2a7d1-58b6-4f09-a3c7-1e9d24b7f065", "project_id": "5d8b3e21-4c07-49f6-a1d3-96b8e70c2f54", "agent_execution_id": "0a54e9b3-7c28-4d16-95f7-e83b104c6d29", "status": "error", "result": null, "media_result_status": null, "media_result_error": null, "dynamic_form_result_status": false, "dynamic_form_result_error": "No query results for model [App\\Models\\FormEdge] 2231", "execution_time": "2026-08-18T15:02:31.000000Z", "created_at": "2026-08-18T15:02:27.000000Z", "updated_at": "2026-08-18T15:02:31.000000Z", "step_assistant": { "id": "c4e2a7d1-58b6-4f09-a3c7-1e9d24b7f065", "name": "Classificar urgência", "ai_agent_id": "7a3f16c8-9e42-4d70-8b15-c2064ef3d891" }, "project": { "id": "5d8b3e21-4c07-49f6-a1d3-96b8e70c2f54", "name": "Reforma da fachada", "code": "OBR-114" }, "agent_execution": { "id": "0a54e9b3-7c28-4d16-95f7-e83b104c6d29", "status": "failed", "response": null, "model": "claude-sonnet-5" } } ], "first_page_url": "https://api.olie.ai/api/management/steps/312/assistants/execution-logs?page=1", "from": 1, "last_page": 1, "last_page_url": "https://api.olie.ai/api/management/steps/312/assistants/execution-logs?page=1", "links": [ { "url": null, "label": "« Anterior", "page": null, "active": false }, { "url": "https://api.olie.ai/api/management/steps/312/assistants/execution-logs?page=1", "label": "1", "page": 1, "active": true }, { "url": null, "label": "Próximo »", "page": null, "active": false } ], "next_page_url": null, "path": "https://api.olie.ai/api/management/steps/312/assistants/execution-logs", "per_page": 30, "prev_page_url": null, "to": 2, "total": 2 } } } } }, "parameters": [ { "name": "page", "in": "query", "description": "Página desejada. 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": "" }, { "name": "filter[status]", "in": "query", "description": "Situação da execução: `pending`, `success` ou `error`.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[step_assistant_id]", "in": "query", "description": "ID (UUID) do assistente cujas execuções devem ser retornadas.", "schema": { "type": "string" }, "example": "" } ] }, "parameters": [ { "name": "step", "in": "path", "required": true, "description": "ID da etapa do funil.", "schema": { "type": "string" }, "example": "" } ] }, "/api/management/step-assistants": { "get": { "tags": [ "step-assistants", "Assistentes" ], "summary": "Listar todos os assistentes de etapa", "description": "Lista os assistentes de etapa de todos os funis da conta, sem precisar percorrer etapa por etapa. É a visão usada pelo menu de [Assistentes de etapa](https://docs.olie.ai/guides/funnels/step-assistants).\n\nCada item já vem com a etapa e o agente de IA associados. Aceita filtros e paginação por query params, consulte:\n\n- [Filtro básico](https://docs.olie.ai/api-reference/general/basic-filters)\n- [Paginação](https://docs.olie.ai/api-reference/general/pagination)\n\nOs campos de paginação (`current_page`, `per_page`, `total`, ...) vêm na raiz da resposta, ao lado de `data`, e não dentro de `meta` como no restante da API.", "operationId": "listarTodosOsAssistentesDeEtapa", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "current_page": { "type": "integer" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "active": { "type": "boolean" }, "funnel_step_id": { "type": "integer" }, "ai_agent_id": { "type": "string" }, "prompt": { "type": "string" }, "execute_on": { "type": "string" }, "manual_execution_enabled": { "type": "boolean" }, "result_as_media": { "type": "boolean" }, "result_as_dynamic_form": { "nullable": true }, "failure_funnel_step_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "nullable": true }, "funnel_step": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "project_funnel_id": { "type": "integer" } } }, "ai_agent": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } } } }, "first_page_url": { "type": "string", "format": "uri" }, "from": { "type": "integer" }, "last_page": { "type": "integer" }, "last_page_url": { "type": "string", "format": "uri" }, "links": { "type": "array", "items": { "type": "object", "properties": { "url": { "nullable": true }, "label": { "type": "string" }, "page": { "nullable": true }, "active": { "type": "boolean" } } } }, "next_page_url": { "nullable": true }, "path": { "type": "string", "format": "uri" }, "per_page": { "type": "integer" }, "prev_page_url": { "nullable": true }, "to": { "type": "integer" }, "total": { "type": "integer" } } }, "example": { "current_page": 1, "data": [ { "id": "9f1c4b02-6f3a-4b8e-9d21-7c5e0a41b8d3", "name": "Resumo do atendimento", "active": true, "funnel_step_id": 312, "ai_agent_id": "2b7d94f6-0c31-4a85-b6e2-58f1c0d93a47", "prompt": "Resuma em até cinco linhas o histórico de conversas do projeto e destaque o que ficou pendente.", "execute_on": "moved", "manual_execution_enabled": true, "result_as_media": true, "result_as_dynamic_form": null, "failure_funnel_step_id": 318, "created_at": "2026-07-28T14:12:03.000000Z", "updated_at": "2026-08-11T09:41:57.000000Z", "deleted_at": null, "funnel_step": { "id": 312, "name": "Triagem", "project_funnel_id": 47 }, "ai_agent": { "id": "2b7d94f6-0c31-4a85-b6e2-58f1c0d93a47", "name": "Analista de atendimento" } }, { "id": "c4e2a7d1-58b6-4f09-a3c7-1e9d24b7f065", "name": "Classificar urgência", "active": false, "funnel_step_id": 312, "ai_agent_id": "7a3f16c8-9e42-4d70-8b15-c2064ef3d891", "prompt": "Leia a descrição do projeto e responda apenas com uma das opções: baixa, média ou alta.", "execute_on": "manual", "manual_execution_enabled": false, "result_as_media": false, "result_as_dynamic_form": { "pivot_class": "App\\Models\\Project", "form_id": 118, "edge_id": 2231, "id": "{{project.id}}" }, "failure_funnel_step_id": null, "created_at": "2026-08-02T10:03:44.000000Z", "updated_at": "2026-08-02T10:03:44.000000Z", "deleted_at": null, "funnel_step": { "id": 312, "name": "Triagem", "project_funnel_id": 47 }, "ai_agent": { "id": "7a3f16c8-9e42-4d70-8b15-c2064ef3d891", "name": "Classificador" } } ], "first_page_url": "https://api.olie.ai/api/management/step-assistants?page=1", "from": 1, "last_page": 1, "last_page_url": "https://api.olie.ai/api/management/step-assistants?page=1", "links": [ { "url": null, "label": "« Anterior", "page": null, "active": false }, { "url": "https://api.olie.ai/api/management/step-assistants?page=1", "label": "1", "page": 1, "active": true }, { "url": null, "label": "Próximo »", "page": null, "active": false } ], "next_page_url": null, "path": "https://api.olie.ai/api/management/step-assistants", "per_page": 30, "prev_page_url": null, "to": 2, "total": 2 } } } } }, "parameters": [ { "name": "page", "in": "query", "description": "Página desejada. 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": "" }, { "name": "filter[id]", "in": "query", "description": "ID (UUID) de um assistente específico. Aceita vários IDs separados por vírgula.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[name]", "in": "query", "description": "Trecho do nome do assistente.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[active]", "in": "query", "description": "`1` retorna apenas os ativos, `0` apenas os inativos.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[funnel_step_id]", "in": "query", "description": "ID da etapa do funil à qual o assistente pertence.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[ai_agent_id]", "in": "query", "description": "ID (UUID) do agente de IA que executa o assistente.", "schema": { "type": "string" }, "example": "" } ] } }, "/api/management/steps/{step}/assistants": { "get": { "tags": [ "step-assistants", "Assistentes" ], "summary": "Listar assistentes da etapa", "description": "Lista os assistentes de uma etapa específica, do mesmo formato da listagem geral e já restrita à etapa informada.\n\nAceita filtros e paginação por query params, consulte:\n\n- [Filtro básico](https://docs.olie.ai/api-reference/general/basic-filters)\n- [Paginação](https://docs.olie.ai/api-reference/general/pagination)\n\nOs campos de paginação (`current_page`, `per_page`, `total`, ...) vêm na raiz da resposta, ao lado de `data`, e não dentro de `meta` como no restante da API.", "operationId": "listarAssistentesDeUmaEtapaEspecFica", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "current_page": { "type": "integer" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "active": { "type": "boolean" }, "funnel_step_id": { "type": "integer" }, "ai_agent_id": { "type": "string" }, "prompt": { "type": "string" }, "execute_on": { "type": "string" }, "manual_execution_enabled": { "type": "boolean" }, "result_as_media": { "type": "boolean" }, "result_as_dynamic_form": { "nullable": true }, "failure_funnel_step_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "nullable": true }, "funnel_step": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "ai_agent": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } } } }, "first_page_url": { "type": "string", "format": "uri" }, "from": { "type": "integer" }, "last_page": { "type": "integer" }, "last_page_url": { "type": "string", "format": "uri" }, "links": { "type": "array", "items": { "type": "object", "properties": { "url": { "nullable": true }, "label": { "type": "string" }, "page": { "nullable": true }, "active": { "type": "boolean" } } } }, "next_page_url": { "nullable": true }, "path": { "type": "string", "format": "uri" }, "per_page": { "type": "integer" }, "prev_page_url": { "nullable": true }, "to": { "type": "integer" }, "total": { "type": "integer" } } }, "example": { "current_page": 1, "data": [ { "id": "9f1c4b02-6f3a-4b8e-9d21-7c5e0a41b8d3", "name": "Resumo do atendimento", "active": true, "funnel_step_id": 312, "ai_agent_id": "2b7d94f6-0c31-4a85-b6e2-58f1c0d93a47", "prompt": "Resuma em até cinco linhas o histórico de conversas do projeto e destaque o que ficou pendente.", "execute_on": "moved", "manual_execution_enabled": true, "result_as_media": true, "result_as_dynamic_form": null, "failure_funnel_step_id": 318, "created_at": "2026-07-28T14:12:03.000000Z", "updated_at": "2026-08-11T09:41:57.000000Z", "deleted_at": null, "funnel_step": { "id": 312, "name": "Triagem" }, "ai_agent": { "id": "2b7d94f6-0c31-4a85-b6e2-58f1c0d93a47", "name": "Analista de atendimento" } }, { "id": "c4e2a7d1-58b6-4f09-a3c7-1e9d24b7f065", "name": "Classificar urgência", "active": false, "funnel_step_id": 312, "ai_agent_id": "7a3f16c8-9e42-4d70-8b15-c2064ef3d891", "prompt": "Leia a descrição do projeto e responda apenas com uma das opções: baixa, média ou alta.", "execute_on": "manual", "manual_execution_enabled": false, "result_as_media": false, "result_as_dynamic_form": { "pivot_class": "App\\Models\\Project", "form_id": 118, "edge_id": 2231, "id": "{{project.id}}" }, "failure_funnel_step_id": null, "created_at": "2026-08-02T10:03:44.000000Z", "updated_at": "2026-08-02T10:03:44.000000Z", "deleted_at": null, "funnel_step": { "id": 312, "name": "Triagem" }, "ai_agent": { "id": "7a3f16c8-9e42-4d70-8b15-c2064ef3d891", "name": "Classificador" } } ], "first_page_url": "https://api.olie.ai/api/management/steps/312/assistants?page=1", "from": 1, "last_page": 1, "last_page_url": "https://api.olie.ai/api/management/steps/312/assistants?page=1", "links": [ { "url": null, "label": "« Anterior", "page": null, "active": false }, { "url": "https://api.olie.ai/api/management/steps/312/assistants?page=1", "label": "1", "page": 1, "active": true }, { "url": null, "label": "Próximo »", "page": null, "active": false } ], "next_page_url": null, "path": "https://api.olie.ai/api/management/steps/312/assistants", "per_page": 30, "prev_page_url": null, "to": 2, "total": 2 } } } } }, "parameters": [ { "name": "page", "in": "query", "description": "Página desejada. 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": "" }, { "name": "filter[name]", "in": "query", "description": "Trecho do nome do assistente.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[active]", "in": "query", "description": "`1` retorna apenas os ativos, `0` apenas os inativos.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[funnel_step_id]", "in": "query", "description": "ID da etapa do funil. Redundante aqui, já que a etapa vem da URL.", "schema": { "type": "string" }, "example": "" }, { "name": "filter[ai_agent_id]", "in": "query", "description": "ID (UUID) do agente de IA que executa o assistente.", "schema": { "type": "string" }, "example": "" } ] }, "post": { "tags": [ "step-assistants", "Assistentes" ], "summary": "Criar um assistente da etapa", "description": "Cria um assistente na etapa. Se `active` for verdadeiro, ele já entra em operação e passa a disparar no gatilho escolhido em `execute_on`: ao entrar na etapa (`moved`), ao sair dela (`unlinked`) ou somente sob demanda (`manual`).\n\nÉ obrigatório indicar pelo menos um destino para o resultado: `result_as_media` grava como conteúdo do projeto e `result_as_dynamic_form` grava em um campo de formulário dinâmico. Os dois podem ser usados juntos.\n\nA etapa do assistente é a do corpo (`funnel_step_id`) — é ela que vale, e não a da URL.\n\nCada execução consome créditos de IA. Veja [Assistentes de etapa](https://docs.olie.ai/guides/funnels/step-assistants) e [Créditos de IA](https://docs.olie.ai/guides/billing/ai-credits).", "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": { "name": "Resumo do atendimento", "active": true, "funnel_step_id": null, "ai_agent_id": null, "prompt": "", "execute_on": "moved", "manual_execution_enabled": false, "failure_funnel_step_id": null, "result_as_media": true, "result_as_dynamic_form": null } } } } } }, "responses": { "201": { "description": "Criado", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "assistant": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "active": { "type": "boolean" }, "funnel_step_id": { "type": "integer" }, "ai_agent_id": { "type": "string" }, "prompt": { "type": "string" }, "execute_on": { "type": "string" }, "manual_execution_enabled": { "type": "boolean" }, "result_as_media": { "type": "boolean" }, "result_as_dynamic_form": { "nullable": true }, "failure_funnel_step_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "nullable": true } } } } }, "examples": { "Criado": { "value": { "response": true, "assistant": { "id": "9f1c4b02-6f3a-4b8e-9d21-7c5e0a41b8d3", "name": "Resumo do atendimento", "active": true, "funnel_step_id": 312, "ai_agent_id": "2b7d94f6-0c31-4a85-b6e2-58f1c0d93a47", "prompt": "Resuma em até cinco linhas o histórico de conversas do projeto e destaque o que ficou pendente.", "execute_on": "moved", "manual_execution_enabled": true, "result_as_media": true, "result_as_dynamic_form": null, "failure_funnel_step_id": 318, "created_at": "2026-07-28T14:12:03.000000Z", "updated_at": "2026-08-11T09:41:57.000000Z", "deleted_at": null } } }, "Criado com resultado em campo de formulário": { "value": { "response": true, "assistant": { "id": "c4e2a7d1-58b6-4f09-a3c7-1e9d24b7f065", "name": "Classificar urgência", "active": true, "funnel_step_id": 312, "ai_agent_id": "7a3f16c8-9e42-4d70-8b15-c2064ef3d891", "prompt": "Leia a descrição do projeto e responda apenas com uma das opções: baixa, média ou alta.", "execute_on": "manual", "manual_execution_enabled": false, "result_as_media": false, "result_as_dynamic_form": { "pivot_class": "App\\Models\\Project", "form_id": 118, "edge_id": 2231, "id": "{{project.id}}" }, "failure_funnel_step_id": null, "created_at": "2026-08-02T10:03:44.000000Z", "updated_at": "2026-08-02T10:03:44.000000Z", "deleted_at": null } } } } } } }, "422": { "description": "Validação falhou", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "ai_agent_id": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "O campo ai agent id selecionado é inválido.", "validation": { "ai_agent_id": [ "O campo ai agent id selecionado é inválido." ] } } } } } } }, "parameters": [ { "name": "step", "in": "path", "required": true, "description": "ID da etapa do funil.", "schema": { "type": "string" }, "example": "" } ] }, "/api/management/steps/{step}/assistants/{assistant}": { "get": { "tags": [ "step-assistants", "Assistentes" ], "summary": "Obter um assistente da etapa", "description": "Retorna a configuração de um assistente, já com a etapa e o agente de IA associados.", "operationId": "obterAssistenteDaEtapa", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "assistant": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "active": { "type": "boolean" }, "funnel_step_id": { "type": "integer" }, "ai_agent_id": { "type": "string" }, "prompt": { "type": "string" }, "execute_on": { "type": "string" }, "manual_execution_enabled": { "type": "boolean" }, "result_as_media": { "type": "boolean" }, "result_as_dynamic_form": { "nullable": true }, "failure_funnel_step_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "nullable": true }, "funnel_step": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "ai_agent": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } } } } }, "example": { "response": true, "assistant": { "id": "9f1c4b02-6f3a-4b8e-9d21-7c5e0a41b8d3", "name": "Resumo do atendimento", "active": true, "funnel_step_id": 312, "ai_agent_id": "2b7d94f6-0c31-4a85-b6e2-58f1c0d93a47", "prompt": "Resuma em até cinco linhas o histórico de conversas do projeto e destaque o que ficou pendente.", "execute_on": "moved", "manual_execution_enabled": true, "result_as_media": true, "result_as_dynamic_form": null, "failure_funnel_step_id": 318, "created_at": "2026-07-28T14:12:03.000000Z", "updated_at": "2026-08-11T09:41:57.000000Z", "deleted_at": null, "funnel_step": { "id": 312, "name": "Triagem" }, "ai_agent": { "id": "2b7d94f6-0c31-4a85-b6e2-58f1c0d93a47", "name": "Analista de atendimento" } } } } } }, "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": "step_assistant_model_not_found", "error": "No query results for model [App\\Models\\StepAssistant] 9f1c4b02-6f3a-4b8e-9d21-7c5e0a41b8d3" } } } } } }, "put": { "tags": [ "step-assistants", "Assistentes" ], "summary": "Atualizar um assistente da etapa", "description": "Substitui a configuração do assistente. O corpo é o mesmo da criação e não aceita atualização parcial: `name`, `funnel_step_id`, `ai_agent_id`, `prompt` e `execute_on` precisam vir a cada requisição, e ao menos um destino de resultado continua obrigatório.\n\nEnviar `active: false` tira o assistente de operação sem apagar nada: a configuração e o histórico de execuções permanecem, mas ele deixa de disparar.", "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": { "name": "Resumo do atendimento", "active": true, "funnel_step_id": null, "ai_agent_id": null, "prompt": "", "execute_on": "moved", "manual_execution_enabled": false, "failure_funnel_step_id": null, "result_as_media": true, "result_as_dynamic_form": null } } } } } }, "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "assistant": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "active": { "type": "boolean" }, "funnel_step_id": { "type": "integer" }, "ai_agent_id": { "type": "string" }, "prompt": { "type": "string" }, "execute_on": { "type": "string" }, "manual_execution_enabled": { "type": "boolean" }, "result_as_media": { "type": "boolean" }, "result_as_dynamic_form": { "nullable": true }, "failure_funnel_step_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "nullable": true } } } } }, "example": { "response": true, "assistant": { "id": "9f1c4b02-6f3a-4b8e-9d21-7c5e0a41b8d3", "name": "Resumo do atendimento", "active": false, "funnel_step_id": 312, "ai_agent_id": "2b7d94f6-0c31-4a85-b6e2-58f1c0d93a47", "prompt": "Resuma em até cinco linhas o histórico de conversas do projeto e destaque o que ficou pendente.", "execute_on": "moved", "manual_execution_enabled": true, "result_as_media": true, "result_as_dynamic_form": null, "failure_funnel_step_id": 318, "created_at": "2026-07-28T14:12:03.000000Z", "updated_at": "2026-08-19T11:07:22.000000Z", "deleted_at": null } } } } } } }, "delete": { "tags": [ "step-assistants", "Assistentes" ], "summary": "Deletar um assistente da etapa", "description": "Remove o assistente da etapa. A exclusão é lógica: ele para de disparar e some das listagens, mas o histórico de execuções continua acessível. Não há endpoint de restauração — para tirar um assistente de operação temporariamente, prefira desativá-lo pela edição.\n\nA resposta não tem corpo.", "operationId": "deletarAssistenteDaEtapa", "responses": { "204": { "description": "Removido", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "parameters": [ { "name": "step", "in": "path", "required": true, "description": "ID da etapa do funil.", "schema": { "type": "string" }, "example": "" }, { "name": "assistant", "in": "path", "required": true, "description": "ID (UUID) do assistente de etapa.", "schema": { "type": "string" }, "example": "" } ] }, "/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", "Métricas" ], "description": "Consolida os números do funil no período: contagens de projetos e etapas, distribuição e ocupação por etapa, tempo médio no funil e por etapa, atividade recente, uso de etiquetas e status e os anexos do funil. Sem `start_date` e `end_date` o período são os últimos 30 dias; o intervalo informado não pode passar de 3 meses e as datas devem estar em `YYYY-MM-DD`. Ver [Métricas e tempo por etapa](https://docs.olie.ai/guides/funnels/metrics).", "parameters": [ { "name": "start_date", "in": "query", "description": "Início do período no formato `YYYY-MM-DD`. Não pode ser futura. Padrão: 30 dias atrás.", "schema": { "type": "string", "format": "date" }, "example": "" }, { "name": "end_date", "in": "query", "description": "Fim do período no formato `YYYY-MM-DD`. Obrigatória quando `start_date` é informada e não pode ser anterior a ela. Padrão: hoje.", "schema": { "type": "string" }, "example": "" } ] }, "parameters": [ { "name": "project_funnel_id", "in": "path", "required": true, "description": "ID do funil de projeto.", "deprecated": false, "schema": { "type": "integer" }, "example": 0 } ] }, "/api/management/projects/{project}/project-executions": { "get": { "summary": "Listar execuções de um projeto", "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" }, "last_page": { "type": "integer" }, "per_page": { "type": "integer" }, "to": { "type": "integer" }, "total": { "type": "integer" } } }, "project_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" }, "started_at_real": { "nullable": true }, "finished_at_real": { "nullable": true }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "is_template": { "type": "boolean" }, "deleted_at": { "nullable": true } } }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "avatar_url": { "nullable": true } } }, "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" } } } } } } } } } }, "example": { "response": true, "meta": { "current_page": 1, "from": 1, "last_page": 1, "per_page": 30, "to": 2, "total": 2 }, "project_executions": [ { "id": "a14afcbd-38b1-4b97-8950-02c09547611a", "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-08-19T13:05:00.000000Z", "finished_at": "2026-08-19T14:47:12.000000Z", "hourly_rate": 85, "finished_reason": "self_stop", "started_at_real": null, "finished_at_real": null, "project": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "code": "SC-1", "name": "Shopping Center", "is_template": false, "deleted_at": null }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Ana Souza", "avatar_url": null }, "funnel_step": { "id": 181, "name": "Execução", "project_funnel_id": 36, "funnel": { "id": 36, "name": "Obras" } } }, { "id": "a14afbe7-d2bc-4821-9c2b-7ce295f8a962", "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-08-18T09:12:44.000000Z", "finished_at": "2026-08-18T11:30:00.000000Z", "hourly_rate": 85, "finished_reason": "step_moved", "started_at_real": null, "finished_at_real": null, "project": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "code": "SC-1", "name": "Shopping Center", "is_template": false, "deleted_at": null }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Ana Souza", "avatar_url": null }, "funnel_step": { "id": 181, "name": "Execução", "project_funnel_id": 36, "funnel": { "id": 36, "name": "Obras" } } } ] } } } } }, "tags": [ "projects", "Execuções" ], "parameters": [ { "name": "page", "in": "query", "description": "Página desejada. 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": "" }, { "name": "filter[user_id]", "in": "query", "description": "ID (UUID) do usuário dono das execuções.", "schema": { "type": "string", "format": "uuid" }, "example": "" }, { "name": "filter[funnel_step_id]", "in": "query", "description": "ID da etapa do funil em que a execução ocorreu.", "schema": { "type": "integer" }, "example": 0 }, { "name": "filter[start_date_gt]", "in": "query", "description": "Retorna execuções iniciadas nesta data ou depois dela.", "schema": { "type": "string", "format": "date-time" }, "example": "" }, { "name": "filter[end_date_lt]", "in": "query", "description": "Retorna execuções encerradas nesta data ou antes dela.", "schema": { "type": "string", "format": "date-time" }, "example": "" }, { "name": "filter[is_running]", "in": "query", "description": "`true` retorna apenas as execuções em andamento; `false`, apenas as encerradas.", "schema": { "type": "string" }, "example": "" }, { "name": "sort", "in": "query", "description": "Ordenação por `started_at` ou `finished_at`. Use `-` antes do campo para ordem decrescente.", "schema": { "type": "string" }, "example": "" } ], "description": "Lista as execuções registradas em um projeto, com paginação. Aceita recortes por pessoa, por etapa e por período, e ordenação por início ou término.\n\nConsulte [Filtro básico](https://docs.olie.ai/api-reference/general/basic-filters) e [Paginação](https://docs.olie.ai/api-reference/general/pagination)." }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" } ], "post": { "summary": "Iniciar uma execução", "responses": { "201": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "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": { "nullable": true }, "hourly_rate": { "type": "integer" }, "finished_reason": { "nullable": true }, "started_at_real": { "nullable": true }, "finished_at_real": { "nullable": true }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "is_template": { "type": "boolean" }, "deleted_at": { "nullable": true } } }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "avatar_url": { "nullable": true } } }, "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" } } } } } } }, "response": { "type": "boolean" } } }, "example": { "data": { "id": "a14afcbd-38b1-4b97-8950-02c09547611a", "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-08-19T13:05:00.000000Z", "finished_at": null, "hourly_rate": 85, "finished_reason": null, "started_at_real": null, "finished_at_real": null, "project": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "code": "SC-1", "name": "Shopping Center", "is_template": false, "deleted_at": null }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Ana Souza", "avatar_url": null }, "funnel_step": { "id": 181, "name": "Execução", "project_funnel_id": 36, "funnel": { "id": 36, "name": "Obras" } } }, "response": true } } } }, "422": { "description": "Etapa não permite execução", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" } } }, "example": { "response": false, "message": "execution_not_allowed_on_step", "error": "Project executions are not allowed on this funnel/step" } } } } }, "tags": [ "projects", "Execuções" ], "parameters": [ { "name": "funnel_step_id", "in": "query", "description": "ID da etapa onde será executado o projeto", "schema": { "type": "string" }, "example": "string" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "funnel_step_id": { "description": "ID da etapa que vai executar o projeto", "nullable": true } } }, "example": { "funnel_step_id": null } } } }, "description": "Inicia a contagem de tempo do usuário autenticado no projeto, na etapa informada. Qualquer execução que ele tenha em andamento é encerrada automaticamente antes; se já houver uma execução rodando naquela mesma etapa, ela é devolvida sem que uma nova seja criada.\n\nO projeto precisa estar na etapa indicada, e tanto o funil quanto a etapa precisam permitir execução — veja [Permitir execução](https://docs.olie.ai/guides/funnels/creating-funnels). Tokens de aplicação não podem iniciar execuções." } }, "/api/management/projects/{project_id}/project-executions/{project_execution_id}": { "put": { "summary": "Atualizar uma execução", "responses": { "200": { "description": "Encerrada agora", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "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" }, "started_at_real": { "nullable": true }, "finished_at_real": { "nullable": true }, "project": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "name": { "type": "string" }, "is_template": { "type": "boolean" }, "deleted_at": { "nullable": true } } }, "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "avatar_url": { "nullable": true } } }, "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" } } } } } } }, "response": { "type": "boolean" } } }, "examples": { "Encerrada agora": { "value": { "data": { "id": "a14afcbd-38b1-4b97-8950-02c09547611a", "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-08-19T13:05:00.000000Z", "finished_at": "2026-08-19T14:47:12.000000Z", "hourly_rate": 85, "finished_reason": "self_stop", "started_at_real": null, "finished_at_real": null, "project": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "code": "SC-1", "name": "Shopping Center", "is_template": false, "deleted_at": null }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Ana Souza", "avatar_url": null }, "funnel_step": { "id": 181, "name": "Execução", "project_funnel_id": 36, "funnel": { "id": 36, "name": "Obras" } } }, "response": true } }, "Horários ajustados": { "value": { "data": { "id": "a14afcbd-38b1-4b97-8950-02c09547611a", "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-08-19T13:00:00.000000Z", "finished_at": "2026-08-19T15:00:00.000000Z", "hourly_rate": 85, "finished_reason": "self_stop", "started_at_real": null, "finished_at_real": null, "project": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "code": "SC-1", "name": "Shopping Center", "is_template": false, "deleted_at": null }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Ana Souza", "avatar_url": null }, "funnel_step": { "id": 181, "name": "Execução", "project_funnel_id": 36, "funnel": { "id": 36, "name": "Obras" } } }, "response": true } } } } } }, "422": { "description": "Validação falhou", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "message": { "type": "string" }, "error": { "type": "string" }, "validation": { "type": "object", "properties": { "finish_now": { "type": "array", "items": { "type": "string" } } } } } }, "example": { "response": false, "message": "validation_errors", "error": "O campo finish now proíbe que started at esteja presente.", "validation": { "finish_now": [ "O campo finish now proíbe que started at esteja presente." ] } } } } } }, "tags": [ "projects", "Execuções" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "started_at": { "nullable": true }, "finished_at": { "nullable": true }, "finish_now": { "type": "boolean" } } }, "example": { "started_at": null, "finished_at": null, "finish_now": false } } } }, "description": "Ajusta os horários de uma execução ou a encerra imediatamente. Envie `finish_now` como `true` para parar a contagem agora — nesse caso `started_at` e `finished_at` não podem ser enviados.\n\nCorrigir horários exige permissão de edição da execução, enquanto encerrar a própria contagem não. Tokens de aplicação não podem atualizar execuções." }, "parameters": [ { "name": "project_id", "in": "path", "required": true, "description": "ID (UUID) do projeto.", "schema": { "type": "string" }, "example": "{{project_id}}" }, { "name": "project_execution_id", "in": "path", "required": true, "description": "ID (UUID) da execução.", "schema": { "type": "string" }, "example": "" } ], "delete": { "summary": "Remover uma execução", "responses": { "204": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object" } } } } }, "tags": [ "projects", "Execuções" ], "description": "Apaga um registro de execução do projeto. O tempo deixa de contar nos totais do painel e nos relatórios. Exige permissão de edição da execução." } }, "/api/management/project-executions/me": { "get": { "summary": "Obter 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", "Execuções" ], "parameters": [ { "name": "start_date", "in": "query", "description": "Início do período (data ou data-hora). Padrão: começo do dia de hoje.", "schema": { "type": "string" }, "example": "" }, { "name": "end_date", "in": "query", "description": "Fim do período. Padrão: fim do dia de hoje. No máximo 30 dias após `start_date`.", "schema": { "type": "string" }, "example": "" } ], "description": "Retorna o panorama de execuções do usuário autenticado: a execução em andamento (se houver), as execuções recentes e os tempos acumulados no período — total trabalhado, tempo ocioso e tempo no projeto e na etapa atuais.\n\nO período padrão é o dia de hoje e não pode passar de 30 dias. Quem não tem acesso aos cronômetros recebe os tempos como `null` e `hidden_timers` igual a `true`." } }, "/api/management/projects/{project}/project-executions/dashboard": { "get": { "summary": "Obter o painel de execuções do projeto", "responses": { "200": { "description": "Sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "boolean" }, "dashboard": { "type": "object", "properties": { "total_time_invested": { "type": "integer" }, "total_sessions": { "type": "integer" }, "average_duration": { "type": "integer" }, "distribution_by_funnel": { "type": "array", "items": { "type": "object", "properties": { "funnel_id": { "type": "integer" }, "funnel_name": { "type": "string" }, "steps": { "type": "array", "items": { "type": "object", "properties": { "step_id": { "type": "integer" }, "step_name": { "type": "string" }, "time": { "type": "integer" }, "percentage": { "type": "number" } } } } } } }, "top_users_by_time": { "type": "array", "items": { "type": "object", "properties": { "user_id": { "type": "string" }, "user_name": { "type": "string" }, "time": { "type": "integer" }, "percentage": { "type": "number" }, "is_currently_executing": { "type": "boolean" }, "current_execution_id": { "type": "string" }, "steps": { "type": "array", "items": { "type": "object", "properties": { "step_id": { "type": "integer" }, "step_name": { "type": "string" }, "time": { "type": "integer" }, "percentage": { "type": "integer" } } } } } } } } } } }, "example": { "response": true, "dashboard": { "total_time_invested": 14352, "total_sessions": 6, "average_duration": 2392, "distribution_by_funnel": [ { "funnel_id": 36, "funnel_name": "Obras", "steps": [ { "step_id": 181, "step_name": "Execução", "time": 10120, "percentage": 70.51 }, { "step_id": 182, "step_name": "Conferência", "time": 4232, "percentage": 29.49 } ] } ], "top_users_by_time": [ { "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "user_name": "Ana Souza", "time": 9840, "percentage": 68.56, "is_currently_executing": true, "current_execution_id": "a14afcbd-38b1-4b97-8950-02c09547611a", "steps": [ { "step_id": 181, "step_name": "Execução", "time": 9840, "percentage": 100 } ] }, { "user_id": "019c1e88-2d70-71aa-9f04-6b5c1d8e4a37", "user_name": "Bruno Lima", "time": 4512, "percentage": 31.44, "is_currently_executing": false, "current_execution_id": null, "steps": [ { "step_id": 182, "step_name": "Conferência", "time": 4512, "percentage": 100 } ] } ] } } } } } }, "tags": [ "projects", "Execuções" ], "description": "Consolida o tempo trabalhado no projeto: total investido, número de sessões, duração média, distribuição por funil e etapa e o ranking de pessoas por tempo — indicando quem está executando no momento. Todos os tempos são em segundos." }, "parameters": [ { "name": "project", "in": "path", "required": true, "description": "ID (UUID) 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 uma execução", "responses": { "200": { "description": "Sucesso", "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, "project_execution": { "id": "a14afcbd-38b1-4b97-8950-02c09547611a", "project_id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "user_id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "funnel_step_id": 181, "started_at": "2026-08-19T13:05:00.000000Z", "finished_at": "2026-08-19T14:47:12.000000Z", "hourly_rate": 85, "finished_reason": "self_stop", "started_at_real": null, "finished_at_real": null, "project": { "id": "019e0edb-aa7c-70c4-9d2d-3a2f175b5ddf", "code": "SC-1", "name": "Shopping Center", "is_template": false, "deleted_at": null }, "user": { "id": "019c1e87-63f4-71dd-a4e3-6eaea0619c2f", "name": "Ana Souza", "avatar_url": null }, "funnel_step": { "id": 181, "name": "Execução", "project_funnel_id": 36, "funnel": { "id": 36, "name": "Obras" } } } } } } } }, "tags": [ "projects", "Execuções" ], "description": "Retorna uma execução específica com o projeto, a etapa do funil e o usuário relacionados. O valor hora só aparece para quem tem acesso a custos." }, "parameters": [ { "name": "project_execution_id", "in": "path", "required": true, "description": "ID (UUID) da execução.", "schema": { "type": "string" }, "example": "" }, { "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": "Restringe as transições a um projeto (UUID).", "deprecated": false, "schema": { "type": "string" }, "example": "" }, { "name": "funnel_step_id", "in": "query", "description": "Restringe às transições de entrada ou de saída daquela etapa.", "schema": { "type": "integer" }, "example": 0 }, { "name": "user_id", "in": "query", "description": "Restringe às transições feitas por um usuário (UUID), na entrada ou na saída.", "schema": { "type": "string" }, "example": "" }, { "name": "start_date", "in": "query", "description": "Data ou data/hora inicial da entrada na etapa. Só com data, considera o dia inteiro.", "schema": { "type": "string" }, "example": "" }, { "name": "end_date", "in": "query", "description": "Data ou data/hora final da entrada na etapa. Não pode ser anterior a `start_date`.", "schema": { "type": "string" }, "example": "" }, { "name": "page", "in": "query", "description": "Página desejada. Padrão 1.", "schema": { "type": "integer" }, "example": 0 }, { "name": "perPage", "in": "query", "description": "Itens por página. Padrão 30, máximo 100.", "schema": { "type": "string" }, "example": "" } ], "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": "Validação falhou", "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", "Métricas" ], "description": "Lista o histórico de entradas e saídas das etapas do funil, com quem moveu, quando e quanto tempo o projeto ficou em cada etapa. É a base bruta das métricas: cada registro traz a etapa, o usuário de entrada e de saída e a transição anterior que o originou. O resultado é paginado. Ver [Métricas e tempo por etapa](https://docs.olie.ai/guides/funnels/metrics) e [Paginação](https://docs.olie.ai/api-reference/general/pagination)." }, "parameters": [ { "name": "project_funnel_id", "in": "path", "required": true, "description": "ID do funil de projeto.", "schema": { "type": "integer" }, "example": 0 } ] }, "/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": [ { "description": "Payload para `POST /export/project`.", "title": "Export Project", "type": "object", "properties": { "columns": { "type": "array", "example": [ "project.id", "project.name", "project.customer" ], "description": "Chaves das colunas (deve incluir todas as requiredKeys do catálogo em GET /export/{type}/columns).", "items": { "type": "string" } }, "dynamic_forms": { "type": "array", "example": [ { "model": "project" }, { "model": "project_funnel", "id": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7" } ], "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", "description": "Obrigatório para `project_funnel` e `funnel_step`.", "format": "uuid" } }, "required": [ "model" ] } }, "filters": { "type": "array", "description": "Busca avançada (array de filtros).", "items": { "type": "object" } } }, "required": [ "columns" ] }, { "description": "Payload para `POST /export/customer`.", "title": "Export Customer", "type": "object", "properties": { "columns": { "type": "array", "example": [ "customer.id", "customer.name" ], "description": "Chaves das colunas (deve incluir todas as requiredKeys do catálogo em GET /export/{type}/columns).", "items": { "type": "string" } }, "include_dynamic_form": { "type": "boolean", "example": true, "description": "Quando `true`, inclui o formulário dinâmico do frame no payload/colunas do export." }, "filters": { "type": "array", "description": "Busca avançada (array de filtros).", "items": { "type": "object" } } }, "required": [ "columns" ] }, { "description": "Payload para `POST /export/contact`.", "title": "Export Contact", "type": "object", "properties": { "columns": { "type": "array", "example": [ "contact.id", "contact.name" ], "description": "Chaves das colunas (deve incluir todas as requiredKeys do catálogo em GET /export/{type}/columns).", "items": { "type": "string" } }, "include_dynamic_form": { "type": "boolean", "example": true, "description": "Quando `true`, inclui o formulário dinâmico do frame no payload/colunas do export." }, "filters": { "type": "array", "description": "Busca avançada (array de filtros).", "items": { "type": "object" } } }, "required": [ "columns" ] }, { "description": "Payload para `POST /export/form_answer`. Exporta respostas do formulário; colunas dinâmicas vêm das edges do form.", "title": "Export Form Answer", "type": "object", "properties": { "form_id": { "type": "integer", "example": 18, "description": "ID do formulário (do frame atual) cujas respostas serão exportadas." } }, "required": [ "form_id" ] }, { "description": "Payload para `POST /export/answer_history`. Identifica o pivot/modelo cujo histórico de respostas será exportado.", "title": "Export Answer History", "type": "object", "properties": { "target": { "type": "object", "properties": { "pivot_class": { "type": "string", "example": "App\\Models\\Project", "description": "FQCN do modelo pivot." }, "form_id": { "type": "integer", "example": 18, "description": "ID do formulário associado ao histórico." }, "id": { "type": "string", "example": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7", "description": "ID do registro pivot (quando aplicável).", "format": "uuid" }, "father_class": { "type": "string", "description": "FQCN do modelo pai, quando o pivot depende de um pai." }, "father_id": { "type": "string", "description": "Obrigatório quando `father_class` é informado.", "format": "uuid" } }, "required": [ "pivot_class", "form_id" ] } }, "required": [ "target" ] }, { "description": "Payload para `POST /export/agent_execution`. Exporta todas as colunas do catálogo. Body opcional com filtros Spatie QueryBuilder.", "title": "Export Agent Execution", "type": "object", "properties": { "filter": { "type": "object", "example": { "status": "completed" }, "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" } } }, "sort": { "type": "string", "example": "-created_at", "description": "Ordenação Spatie (`campo` ou `-campo`). Campos: `credits_debited`, `tokens_used`, `latency`, `created_at`." } } }, { "description": "Payload para `POST /export/project_execution`. Exporta todas as colunas do catálogo. Exige `project_id` e/ou `user_id` (ao menos um).", "title": "Export Project Execution", "type": "object", "properties": { "project_id": { "type": "string", "example": "019dd427-5d13-71bf-9a09-d75aa2bf4bd7", "description": "UUID do projeto. Obrigatório se `user_id` não for enviado. Requer permissão de view no projeto.", "format": "uuid" }, "user_id": { "type": "string", "example": "ee989a1d-afe3-4ff7-f4fb-bec440e8b372", "description": "UUID do usuário. Obrigatório se `project_id` não for enviado. Requer permissão de view no usuário.", "format": "uuid" }, "filter": { "type": "object", "example": { "is_running": false }, "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 } } }, "sort": { "type": "string", "example": "-started_at", "description": "Ordenação Spatie (`campo` ou `-campo`). Campos: `started_at`, `finished_at`." } } } ] }, "example": { "columns": [ "project.id", "project.name", "project.customer" ], "dynamic_forms": [ { "model": "project" }, { "model": "project_funnel" } ] } } }, "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": [] } ] } }, "/api/management/answers-history/export": { "post": { "summary": "Exportar histórico de respostas de formulário", "responses": { "200": { "description": "200" } }, "tags": [ "answers-history", "export" ], "description": "Exportar histórico de respostas de formulário para um arquivo excel." } } }, "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } } }, "security": [ { "BearerAuth": [] } ] }