Auth API reference

Auth API · Consumer-Tenants

patch/{app_slug}/v1/tenants/{tenant_id}Auth

Patch a tenant. Any subset of {display_name, slug, status, metadata}. PAK must hold auth.tenant.update.

Path parameters

app_slug*string

Slug of the app.

tenant_id*string

Id of the tenant.

Request body

display_namestring

Human-readable name of the tenant.

Example: "Acme Inc"

slugstring

URL-safe identifier of the tenant, unique within its parent.

statusenum (3)

New tenant status: `active`, `suspended` or `archived`.

metadataobject

Free-form JSON object you attach to the tenant; returned as stored.

Response · 200 Updated tenant.

id*string

Unique identifier of the tenant.

display_id*string

Short, human-friendly id of the tenant (shown in the console).

Example: "tnt_3a9f2b1c0d4e"

app_id*string

The Auth app the tenant belongs to.

slug*string

URL-safe identifier of the tenant, unique within its parent.

Example: "acme-org"

display_name*string

Human-readable name of the tenant.

Example: "Acme Org"

status*object

Tenant status: `active`, `suspended` or `archived`.

metadata*object

Free-form JSON object you attach to the tenant; returned as stored.

created_at*string · date-time

When the tenant was created (ISO 8601).

updated_at*string · date-time

When the tenant was last changed (ISO 8601).

Example

Request

PATCH https://api.auth.productcraft.co/{app_slug}/v1/tenants/{tenant_id}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "display_name": "Acme Inc",
  "slug": "string",
  "status": "active",
  "metadata": {}
}

Response

{
  "id": "string",
  "display_id": "tnt_3a9f2b1c0d4e",
  "app_id": "string",
  "slug": "acme-org",
  "display_name": "Acme Org",
  "status": {},
  "metadata": {},
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}