Users (RBAC)
Create User
POST
Create User
Mint a per-user API key scoped to a single index. Requires RBAC enabled on the service (
The legacy single API key (
Read-only user:
SDK-supplied index (legacy path):
CYBORGDB_SERVICE_ROOT_KEY set) and the request must be authenticated with the root key.
See Multi-Tenancy & RBAC for the full operator playbook.
Authentication
Required — root API key in theX-API-Key header:
CYBORGDB_API_KEY) is not accepted on this route; it returns 403.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
index_name | string | Name of the index the user will be scoped to. |
Request Body
For
POST, the index key rides in the JSON body as index_key (alongside permissions). The sibling GET /v1/indexes/{index_name}/users and DELETE /v1/indexes/{index_name}/users/{user_id} endpoints have no request body, so they take the same key via the X-Index-Key header instead.Response
Exceptions
400:permissionsis missing, empty, or contains values outside{"read", "write"}.401: Authentication failed (invalid root API key).403: RBAC is not enabled (CYBORGDB_SERVICE_ROOT_KEYunset), or the caller is not using the root key.404: Index not found.500: Internal server error.