API pública | Pandora Solver
API pública v1 do Pandora Solver: projetos, Pontos de Atenção (PAT), iniciativas, grupos RACI e empresas. Autenticação por chave (cak_, pak_, sak_) e servidor MCP.
Recursos expostos
- Projects API — List projects across versions with status, dates and manager. (escopo
projects:read) - PATs API — Read, create, update and soft-delete Points of Attention. (escopo
pats:read) - Initiatives API — List strategic initiatives, owners and status. (escopo
initiatives:read) - Groups API — List corporate RACI groups used as Panbox rooms. (escopo
groups:read) - Companies API — Super-admin only: list every licensed company. (escopo
companies:read)
Autenticação
Base URL: https://cypphyzoctpoqltdseam.supabase.co/functions/v1. Envie a chave como Bearer token: Authorization: Bearer cak_…
cak_— Company key. Scoped to one company automatically.pak_— Project key. Scoped to a single project of the company.sak_— Super-admin key. Must pass `?company_code=` on data endpoints.
Escopos
projects:read— Projects (read)pats:read— Points of Attention (read)pats:write— Points of Attention (create / update / delete)initiatives:read— Initiatives (read)groups:read— RACI groups (read)queue:read— XML queue log (read)companies:read— Companies (read) — super admin only
Endpoints
GET /api-companies— Returns every company in Pandora. Super-admin keys only. (escopocompanies:read, super admin)GET /api-projects— Returns projects for a company. Super-admin keys must pass `company_code`. (escopoprojects:read)GET /api-pats— Returns active PATs for a company. Filterable by `projcode` and `status`. (escopopats:read)POST /api-pats— Creates a PAT anchored to a project, an initiative or a corporate RACI group of the key's company. Requires `pats:write`. Body: `projcode`, `title` (required) plus optional `description`, `impact`, `area`, `responsible`, `priority`, `urgency`, `status`, `expected_date`, `deadline_date`, `progress_percent`. For a RACI group use `projcode = "GRP:<group-id>"` (same value as `room_scope` in /api-groups). AI agents may identify themselves with header `X-Agent-Code: PSA<NAME>` (and optional `X-Agent-Name`); the agent is auto-onboarded into the company team and becomes the PAT author and responsible, so the PAT is mirrored into Panbox. (escopopats:write)PATCH /api-pats— Updates business fields of an existing PAT. Body must include `id`. Requires `pats:write`. `projcode`, `company_code` and `pat_code` cannot be changed. Sending `X-Agent-Code` reassigns the PAT to that agent (send `assign_to_agent: false` to keep the current responsible). (escopopats:write)DELETE /api-pats?id=<uuid>— Marks the PAT as deleted (`is_deleted = true`). Never removes the row. Requires `pats:write`. (escopopats:write)GET /api-initiatives— Returns strategic initiatives for a company. Filterable by `status`. (escopoinitiatives:read)GET /api-groups— Returns the groups of the company's corporate RACI matrix. Each group is a Panbox room (`room_scope = GRP:<id>`) and a valid PAT anchor (`pat_projcode`). The RACI "Geral" group is omitted (it is the unified Geral room) unless `include_general=true`. Only active (non-deleted) matrices are returned. (escopogroups:read)
Valores válidos (listas fechadas)
status (inglês): open · in_progress · blocked · closed · cancelled
priority (pt-BR minúsculo): alta · média · baixa
urgency: urgente · alta · normal · baixa
A escrita é tolerante (aceita sinônimos legados como aberto ou Alta); a leitura devolve sempre o valor canônico.
Paginação
Baseada em cursor: limit (1–500, padrão 100) e cursor (o next_cursor da resposta anterior). Quando next_cursor é null, a lista terminou.
Servidor MCP
Manifesto: https://pandorasolver.com/.well-known/mcp.json
Transporte: http-streamable · Autenticação: OAuth 2.1 (Authorization Code + PKCE, registro dinâmico de cliente)
Contratos completos
Exemplos curl e respostas de cada endpoint em https://pandorasolver.com/api/docs.