---
title: "Create a new tenant"
method: POST
path: "/api/tenants"
---

# Create a new tenant

`POST /api/tenants`

Create a new tenant with optional resource quotas.

## Request body

- CreateTenantRequest
  - `id` string, required — Tenant ID (unique)
  - `name` string, required — Display name
  - `quotas` ResourceQuotas
    - `max_nodes` integer, nullable — Maximum number of nodes
    - `max_edges` integer, nullable — Maximum number of edges
    - `max_memory_bytes` integer, nullable — Maximum memory in bytes
    - `max_storage_bytes` integer, nullable — Maximum storage in bytes
    - `max_connections` integer, nullable — Maximum concurrent connections
    - `max_query_time_ms` integer, nullable — Maximum query execution time in milliseconds

## Response `201`

Tenant created

- Tenant
  - `id` string — Tenant ID (unique identifier)
  - `name` string — Display name
  - `enabled` boolean — Whether the tenant is enabled
  - `created_at` integer — Creation timestamp (Unix seconds)
  - `quotas` ResourceQuotas
    - `max_nodes` integer, nullable — Maximum number of nodes
    - `max_edges` integer, nullable — Maximum number of edges
    - `max_memory_bytes` integer, nullable — Maximum memory in bytes
    - `max_storage_bytes` integer, nullable — Maximum storage in bytes
    - `max_connections` integer, nullable — Maximum concurrent connections
    - `max_query_time_ms` integer, nullable — Maximum query execution time in milliseconds
  - `nlq_config` object, nullable — NLQ configuration
  - `agent_config` object, nullable — Agent configuration
  - `embed_config` object, nullable — Auto-embed configuration

## Other responses

- `409` — Tenant already exists

---

[API](https://skmtc.net/samyama-ai/apis/samyama-graph-database-api.md) · [All operations](https://skmtc.net/samyama-ai/apis/samyama-graph-database-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/samyama-ai/samyama-graph-database-api/versions/047a40292bc8/schema)
