{"slug":"business/API_REFERENCE","title":"Surface / API Mapping","section":"business","sectionLabel":"Business","status":"unclassified","type":"document","path":"business/API_REFERENCE.mdx","bytes":4638,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"## Surface / API Mapping\n\n- `/api/v1/workspace/*` backs User Workbench projections.\n- `/api/v1/cognitive/*` backs the Twin Workbench (Cloudflare-native runtime, `iw-agent-runtime`).\n- governed approvals, destructive actions, and controlled mutation belong to governance (embedded in Operational Workbench).\n- Twin endpoints are not, by themselves, the customer-facing product-shell contract.\n\n---\n\n# IntegrateWise API Reference\n\n## Gateway (port 8786)\n\nAll API routes go through the gateway at `/api/v1/*`.\n\n### Authentication\n\n- Header: `Authorization: Bearer <spineDb_jwt>`\n- Header: `x-tenant-id: <tenant_uuid>`\n- Header: `x-user-id: <user_uuid>`\n\n### Core Endpoints\n\n#### Entity 360\n\n| Method | Path                      | Description              |\n| ------ | ------------------------- | ------------------------ |\n| GET    | `/api/v1/entity360/:id`   | Get entity 360 view      |\n| POST   | `/api/v1/entity360`       | Get with layer selection |\n| POST   | `/api/v1/entity360/batch` | Batch multiple entities  |\n\n#### Twin\n\n| Method | Path                              | Description                   |\n| ------ | --------------------------------- | ----------------------------- |\n| GET    | `/api/v1/cognitive/twin/360/:id`  | Entity 360 + trigger insights |\n| POST   | `/api/v1/cognitive/twin/evaluate` | Batch trigger evaluation      |\n| GET    | `/api/v1/cognitive/twin/triggers` | List registered triggers      |\n| POST   | `/api/v1/cognitive/twin/ask`      | Natural language query        |\n| POST   | `/api/v1/cognitive/twin/predict`  | Prediction (renewal/risk)     |\n\n#### Identity Resolution\n\n| Method | Path                                            | Description           |\n| ------ | ----------------------------------------------- | --------------------- |\n| GET    | `/api/v1/identity/candidates`                   | List merge candidates |\n| POST   | `/api/v1/identity/candidates/:id/merge`         | Merge records         |\n| POST   | `/api/v1/identity/candidates/:id/keep-separate` | Not duplicates        |\n| POST   | `/api/v1/identity/candidates/:id/defer`         | Defer decision        |\n| GET    | `/api/v1/identity/stats`                        | Resolution statistics |\n\n#### Workspace\n\n| Method | Path                           | Description           |\n| ------ | ------------------------------ | --------------------- |\n| GET    | `/api/v1/workspace/entities`   | List entities by type |\n| GET    | `/api/v1/workspace/connectors` | List connectors       |\n\n#### Connectors\n\n| Method | Path                                     | Description          |\n| ------ | ---------------------------------------- | -------------------- |\n| GET    | `/api/v1/connectors/:provider/authorize` | Start OAuth          |\n| GET    | `/api/v1/connectors/:provider/callback`  | OAuth callback       |\n| GET    | `/api/v1/connectors/stats`               | Connector statistics |\n\n#### Intelligence\n\n| Method | Path                                | Description         |\n| ------ | ----------------------------------- | ------------------- |\n| GET    | `/api/v1/intelligence/signals`      | Active signals      |\n| POST   | `/api/v1/cognitive/think/analyze`   | Manual analysis     |\n| GET    | `/api/v1/cognitive/govern/policies` | Governance policies |\n\n#### Knowledge\n\n| Method | Path                          | Description      |\n| ------ | ----------------------------- | ---------------- |\n| GET    | `/api/v1/knowledge/memories`  | AI memories      |\n| GET    | `/api/v1/knowledge/topics`    | Knowledge topics |\n| GET    | `/api/v1/knowledge/documents` | Documents        |\n| POST   | `/api/v1/knowledge/ingest`    | Ingest content   |\n\n#### Pipeline\n\n| Method | Path                                | Description     |\n| ------ | ----------------------------------- | --------------- |\n| GET    | `/api/v1/pipeline/status`           | Pipeline status |\n| GET    | `/api/v1/cognitive/spine/entities`  | Spine entities  |\n| GET    | `/api/v1/cognitive/spine/dashboard` | Dashboard stats |\n\n### Service Ports (Local Dev)\n\n| Service       | Port | Inspector |\n| ------------- | ---- | --------- |\n| Gateway       | 8786 | 9246      |\n| Web App       | 3000 | —         |\n| Spine-v2      | 8795 | 9255      |\n| Pipeline      | 8794 | 9254      |\n| Normalizer    | 8793 | 9253      |\n| Knowledge     | 8789 | 9249      |\n| Think         | 8798 | 9258      |\n| Act           | 8780 | 9240      |\n| Govern        | 8787 | 9247      |\n| Connector     | 8785 | 9245      |\n| Workflow      | 8800 | 9271      |\n| Tenants       | 8797 | 9257      |\n| Billing       | 8783 | 9243      |\n| MCP Connector | 8792 | 9252      |\n"}