The Node.js API is multi-tenant — every user, document, and search result is scoped to a company. Companies are the root tenant entity: you must create a company before you can create users or documents under it. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/juescoryisus/QualityDocD/llms.txt
Use this file to discover all available pages before exploring further.
slug you choose at creation time becomes the permanent identifier used in every subsequent login request to target that tenant.
This endpoint has no authentication requirement in the current implementation. It is intended for initial tenant provisioning — see the warning below before exposing it in a production environment.
POST /companies
Creates a new company tenant. On success, the API inserts the record and returns the full company object with its generatedid and createdAt timestamp.
Request body
Human-readable display name for the company (e.g.
"Acme Corp"). Stored as-is and shown in UI contexts.URL-safe identifier for the company (e.g.
"acme-corp"). Must be unique across all tenants. The slug is passed as companySlug in POST /auth/login to identify the tenant during authentication — choose it carefully and treat it as immutable after users are provisioned.Response — 201 Created
Auto-generated primary key for the company record.
The human-readable name as provided in the request.
The URL-safe tenant identifier as provided in the request.
ISO 8601 timestamp of when the company record was created.
Error responses
| Status | Meaning |
|---|---|
400 Bad Request | The request body failed Zod validation — name or slug is missing or empty. |
500 Internal Server Error | A database error occurred (e.g. slug uniqueness constraint violation). |
Example
Slug stability
Theslug field is used as companySlug in POST /auth/login to route login requests to the correct tenant: