/v1/apps/{app_id}/tenants/{tenant_id}AuthUpdate a tenant (display_name, slug, status, metadata).
Path parameters
app_id*stringId of the app.
tenant_id*stringId of the tenant.
Request body
display_namestringHuman-readable name of the tenant.
Example: "Acme Inc"
slugstringURL-safe identifier of the tenant, unique within its parent.
statusenum (3)New tenant status: `active`, `suspended` or `archived`.
metadataobjectFree-form JSON object you attach to the tenant; returned as stored.
Response · 200
id*stringUnique identifier of the tenant.
display_id*stringCustomer-facing prefixed identifier.
Example: "tnt_3a9f2b1c0d4e"
app_id*stringThe Auth app the tenant belongs to.
slug*stringURL-safe identifier of the tenant, unique within its parent.
Example: "acme-org"
display_name*stringHuman-readable name of the tenant.
Example: "Acme Org"
status*objectTenant status: `active`, `suspended` or `archived`.
metadata*objectFree-form JSON object you attach to the tenant; returned as stored.
created_at*string · date-timeWhen the tenant was created (ISO 8601).
updated_at*string · date-timeWhen the tenant was last changed (ISO 8601).
Example
Request
PATCH https://api.auth.productcraft.co/v1/apps/{app_id}/tenants/{tenant_id}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"display_name": "Acme Inc",
"slug": "string",
"status": "active",
"metadata": {}
}import { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const tenant = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").tenants.update("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { display_name: "Acme Inc" });auth.admin.app(…).tenants.update(tenantId, params?, options?): Auth.Tenant
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"
}