# GLMChat V2.2 Route-to-UI Matrix

| API contract | Primary UI | Authentication / approval | Offline behaviour | Verification |
|---|---|---|---|---|
| `GET /api/status` | boot, install gate, setup recovery | public, secret-free | cached shell may render; response never cached | bootstrap/browser/install tests |
| `POST /api/setup` | first-use setup wizard | setup-only, CSRF/bootstrap controls | online only | PHP/browser setup contracts |
| `POST /api/login`, `/api/logout`, `GET /api/session` | PIN login, lock/logout | six-digit PIN/session | encrypted local-only unlock where supported; server auth online | auth/static/browser tests |
| `GET/PATCH /api/settings`, API-key/test-provider routes | Settings | authenticated; current PIN for key replacement | settings retain local presentation state; provider changes online | Node/PHP contracts |
| conversation collection/item routes | Chat history and active chat | authenticated; recent PIN for protected delete | drafts local; supported metadata mutations queued | browser/offline/Node tests |
| `POST /api/chat`, generation cancellation | Chat | authenticated, CSRF, cost preflight | chat remains explicit draft; never auto-submitted | Node contracts/browser UI |
| `GET /api/projects`, upload, item/file/download routes | Projects and Project workspace | authenticated; recent PIN for protected metadata/delete | selected supported changes use ordered queue; provider work pauses | migration/PHP/UI tests |
| `/api/automation-definitions` collection/items | Agent, Team and Workflow wizards; Library | authenticated, CSRF | typed definitions/drafts persist in IndexedDB and sync explicitly | agentic Node tests |
| `/api/templates` collection/items | Automation Library | authenticated; recent PIN for delete | local defaults remain usable; server templates refresh online | Node/migration/UI tests |
| `/api/workflows` collection/start/detail | Runs and Run inspector | authenticated, CSRF, budget enforcement | definitions/runs saved locally as waiting for connection | agentic/migration/UI tests |
| workflow pause/resume/cancel routes | Run controls | authenticated, CSRF | local waiting runs launch only after explicit Resume online | Node/PHP/browser evidence |
| workflow approval decision route | Approval cards | authenticated; recent PIN for destructive tools | waits safely; no offline execution | agentic contracts/UI evidence |
| workflow intervention route | Run intervention panel | authenticated; recent PIN for sensitive interventions | online only; state remains inspectable offline | agentic contracts/UI evidence |
| `GET /api/tools`, `POST /api/tools/execute` | Tool wizard and run approvals | authenticated; schema/risk policy; recent PIN when destructive | no silent tool execution offline | ToolRegistry/ToolExecutor tests |
| prompt routes | Library and save-from-chat | authenticated | local edits remain visible; persistence online/queued where supported | Node/UI contracts |
| cost summary/events/preflight | Home badges, Chat estimate, Costs | authenticated | last known display only; hard enforcement remains server-side | Node/PHP/UI tests |
| sync snapshot/batch/conflicts/resolve | Offline & Sync | authenticated, CSRF for mutations | authoritative queue/conflict recovery surface | browser deferred reopen synchronisation/offline tests |
| TTS voices/generation | Voice screen and Speak action | authenticated, provider limits | online only; temporary audio URL revoked | Node/static/UI evidence |
| data privacy/export/reauth/delete/reset/revoke | Privacy & Data | authenticated; recent PIN/confirmation as mapped | local clear is separate; server actions online | PHP/Node/UI evidence |
| `GET /api/health` | Diagnostics | authenticated, secret-safe | last loaded state only | PHP/static/UI evidence |
| `POST /api/audit` | project/workflow compatibility entry | authenticated, CSRF, budget limits | definition may be saved; inference online | workflow contracts |

Dynamic resource identifiers are UUID-validated. No retained production route is intentionally exposed without a corresponding UI or compatibility entry point.
