Delete tenant
/tenant/{id}
Delete a tenant by id. This is permanent — the row is gone and cannot be restored (re-creating the same id yields a fresh row with no metadata).
The API refuses to delete a tenant that still owns any integrated accounts, returning 409 Conflict with the message "Can't delete tenant with connected accounts.". Delete the accounts first (individually via DELETE /integrated-account/{id}, or in one call via POST /integrated-account/bulk-delete with {"tenant_id":"..."}), then retry.
Session callers must pass ?environment_id=<uuid> — the API will not guess which environment's row to delete.
Path Parameters
The tenant id, percent-encoded as a single path segment. Tenant ids are free-form and may contain /, spaces or non-ASCII, so reserved characters have to be escaped: acme/prod is requested as /tenant/acme%2Fprod. Sent raw, it is two path segments, matches no route, and comes back 404. Only unreserved escapes are normalised before the request reaches the API, so %2F arrives intact and is decoded back to the original id.
acme-corpQuery Parameters
Required for session auth. Ignored for API tokens.
8a2b104d-74a6-47f2-b93e-c6b611e82391Response Body
The date and time when the tenant was created.
2026-07-02T09:14:03.117ZThe environment this tenant belongs to.
8a2b104d-74a6-47f2-b93e-c6b611e82391The tenant identifier — caller-chosen and immutable once created. Unique within its environment, so the same value can exist independently in each environment (for example development, staging and production). Free-form up to 255 characters: whatever you already use to identify a customer, including /, spaces and non-ASCII. The only values rejected are the ones no URL path segment can carry — control characters, leading or trailing whitespace, and the dot segments . and ...
acme-corpFree-form JSON object stored verbatim. Truto does not interpret this field — use it for tier, region, billing plan, or any other customer attribute your app cares about.
{"tier":"gold","region":"wnam"}Display name shown in the dashboard. Defaults to the tenant id on create if not supplied; can be edited later via PATCH /tenant/{id}.
Acme CorpThe date and time when the tenant was last updated.
2026-07-02T09:14:03.117ZErrors
| Status | Description |
|---|---|
400 | Session auth without environment_id. |
403 | You do not have access to the requested environment. |
404 | Tenant not found in the given environment. |
409 | Tenant still has connected integrated accounts. |
curl -X DELETE 'https://api.truto.one/tenant/{id}' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json'const response = await fetch('https://api.truto.one/tenant/{id}', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/tenant/{id}"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
response = requests.delete(url, headers=headers, params=params)
print(response.json())