TenantService
Tenants

Destroys the tenant, its subjects, every objective associated with it and everything reachable from those objectives, and its widget sessions. This is the full erasure hammer, wider than DELETE /widget_sessions, which removes only what widget sessions created. The work runs in the background: this returns the tenant in STATE_ERASING rather than a count of what was removed, since a large tenant's history cannot be destroyed inside a request. Poll the tenant to follow it — STATE_ERASING while it runs, NotFound once it finishes. Erasure is terminal; a tenant cannot be recovered once it starts.

delete/v1/workspaces/{workspaceId}/tenants/{id}

Request

  • Base URL
    https://api.cadenya.com
  • URL
    https://api.cadenya.com/v1/workspaces/{workspaceId}/tenants/{id}
  • Auth
    HTTP bearer

Path parameters

workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q

Workspace ID.

idstring required

Tenant to destroy. Accepts the canonical tenant_… form or the external_id:<value> form.

Response

OK

state'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ERASING' enum required

The current lifecycle state of the tenant. Output only.

Example response

{
  "metadata": {
    "accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
    "workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
    "profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
  }
}

Changes