/v1/apps/{app_id}/statusAuthUpdate app status (active, suspended, archived)
Path parameters
app_id*stringId of the app.
Request body
status*enum (3)New app status
Example: "suspended"
Response · 200 Status updated.
id*stringUnique identifier of the app.
slug*stringURL-safe identifier of the app, unique within its parent.
Example: "acme-app"
display_name*stringHuman-readable name of the app.
Example: "Acme"
workspace_id*stringOwning workspace UUID.
status*objectApp status: `active`, `suspended` (sign-ins refused) or `archived`.
environment*objectWhich environment this app IS. One app is one environment — there is no switch; a staging app is a separate app created via `POST /v1/apps/:appId/clone`. Set at create time and never changed afterwards. Every app that predates this field is `production`.
Example: "production"
created_by*stringAccount that created the app.
metadata*objectFree-form JSON object you attach to the app; returned as stored.
created_at*string · date-timeWhen the app was created (ISO 8601).
updated_at*string · date-timeWhen the app was last changed (ISO 8601).
audit_retention_days*numberDays of `audit_log` history kept for this app. A nightly job deletes rows older than this. 30-3650.
Example: 365
webhook_attempt_retention_days*numberDays of outbound-webhook delivery-attempt history kept for this app. 7-365.
Example: 30
Example
Request
PATCH https://api.auth.productcraft.co/v1/apps/{app_id}/status
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"status": "suspended"
}import { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const app = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").updateStatus({ status: "suspended" });auth.admin.app(…).updateStatus(params, options?): Auth.App
Response
{
"id": "string",
"slug": "acme-app",
"display_name": "Acme",
"workspace_id": "string",
"status": {},
"environment": "production",
"created_by": "string",
"metadata": {},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"audit_retention_days": 365,
"webhook_attempt_retention_days": 30
}