REST API
Implemented routes, sessions, tools, files, and errors.
Base URL: https://api.edgein.ai. Portal users authenticate with secure session cookies. External AI clients should use OAuth through the universal MCP integration. An API request cannot select another tenant by supplying a company name.
Implemented routes
GET /health— service and configuration health.GET /api/me— current authenticated actor and tenant.GET /api/tools— tool descriptors available to the current actor.POST /api/tools/{name}— invoke an authorized tool with a JSON object body.POST /api/upload?name=…— upload file bytes; company or workspace parameters may be required by ownership rules.GET /api/documents/{id}/previewand/download— authorized original access.GET /api/subscription/plans— configured plan list.
Registration and authentication routes include /api/registration/status, /api/registration/start, /api/registration/complete, /api/auth/login, /api/auth/forgot, /api/auth/reset, and /api/auth/logout. Availability of registration depends on the production feature flag.
Response and errors
Tool calls return JSON. Invalid input, missing permissions, missing records, quota limits, and unexpected failures use HTTP error codes with a bounded error message. Use GET /api/tools for the actual schema instead of assuming every employee has every operation. Avoid logging tokens, reset links, or confidential response bodies.