get_org_self_delete_by_orgid
Calls GET /api/org-self-delete/{orgId} as the signed-in person · REST reference
The caller's view of deleting an organization
With the caller's own token. Requires org.manage in the organization or platform authority. Says whether the caller owns it and which parent would have to approve, shows the owner the deletion preview with every blocker, and shows the organization's request.
Arguments
| Argument | Type | Description | |
|---|---|---|---|
orgIdpath | string (uuid) | required |
Example call
A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_org_self_delete_by_orgid",
"arguments": {
"orgId": "11111111-1111-4111-8111-111111111111"
}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
The caller's view.
{
"data": {
"callerIsOwner": true,
"callerMayCancel": true,
"isPlatform": true,
"orgId": "11111111-1111-4111-8111-111111111111",
"orgName": "string",
"parentOrgId": "11111111-1111-4111-8111-111111111111",
"parentOrgName": "string",
"preview": {
"blocked": true,
"blockedReason": "string",
"blockers": [],
"groupsRemoved": [],
"membershipsRemoved": 1,
"orgId": "string",
"orgName": "string",
"permissionsRetired": 1,
"rolesRemoved": [],
"usersDeactivated": [],
"usersKept": []
},
"request": {
"createdAt": 1,
"expiresAt": 1,
"id": "11111111-1111-4111-8111-111111111111",
"orgId": "11111111-1111-4111-8111-111111111111",
"orgName": "string",
"requestedBy": {},
"status": "AWAITING_CODE",
"cancelledAt": 1,
"completedAt": 1,
"confirmedAt": 1,
"decidedAt": 1,
"parentOrgId": "11111111-1111-4111-8111-111111111111",
"parentOrgName": "string",
"reason": "string"
}
},
"success": true
}Fields
| Field | Type | Description |
|---|---|---|
data | object | |
data.callerIsOwner | boolean | Whether the caller owns this organization — and so may ask to delete it. Gate on this, never a role name. |
data.callerMayCancel | boolean | |
data.isPlatform | boolean | The platform organization cannot be deleted. |
data.orgId | string (uuid) | |
data.orgName | string | |
data.parentOrgId | string (uuid) | null | |
data.parentOrgName | string | null | |
data.preview | object | null | What deleting the organization now would remove and keep, and every blocker. Only for the owner — it names every member's address. |
data.preview.blocked | boolean | |
data.preview.blockedReason | string | null | |
data.preview.blockers | array of object | Every reason this organization may not be deleted yet; empty when it may. |
data.preview.groupsRemoved | array of object | The organization's live groups — its OWNER and MEMBER groups among them; each is soft-deleted. |
data.preview.membershipsRemoved | integer | Current (non-REMOVED) memberships into those groups; each is stamped REMOVED. |
data.preview.orgId | string | |
data.preview.orgName | string | |
data.preview.permissionsRetired | integer | The organization's per-org permissions. Not written: every grant path requires a live organization, so they confer nothing once it is deleted. |
data.preview.rolesRemoved | array of object | The organization's own live roles (its OWNER and ORG_USER roles); each is soft-deleted. |
data.preview.usersDeactivated | array of object | Members who belong to no other live organization. Each is soft-deleted and their DynamoDB auth row suspended, so they cannot sign in by either path. |
data.preview.usersKept | array of object | Members of another live organization. Kept, and lose only this organization's memberships; keptBy names the organization(s) that keep them. |
data.request | object | null | The organization's current or recently finished request. |
data.request.cancelledAt | integer | null | |
data.request.completedAt | integer | null | |
data.request.confirmedAt | integer | null | |
data.request.createdAt | integer | Epoch milliseconds. |
data.request.decidedAt | integer | null | |
data.request.expiresAt | integer | Epoch milliseconds — the current step's deadline: the code's (OTP_EXPIRY_SECONDS), then seven days for the parent. |
data.request.id | string (uuid) | |
data.request.orgId | string (uuid) | |
data.request.orgName | string | |
data.request.parentOrgId | string (uuid) | null | The parent organization that must approve; null when there is none. |
data.request.parentOrgName | string | null | |
data.request.reason | string | null | Why it was cancelled or declined. |
data.request.requestedBy | object | |
data.request.status | "AWAITING_CODE" | "AWAITING_PARENT" | "COMPLETED" | "CANCELLED" | "DECLINED" | "EXPIRED" | AWAITING_CODE until the owner enters the emailed code; AWAITING_PARENT while a child organization waits for its parent; COMPLETED once deleted. CANCELLED and DECLINED carry reason. EXPIRED when the current step's deadline passed. |
success | true |
When it fails
A failed call returns isError: true with the API's message as text.
400The request was malformed or failed a guard.
403Authenticated, but the caller holds none of the required permissions.
404No such resource — or none this caller may see.
What the model is shown
This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.
{
"name": "get_org_self_delete_by_orgid",
"description": "GET /api/org-self-delete/{orgId} — With the caller's own token. Requires `org.manage` in the organization or platform authority. Says whether the caller owns it and which parent would have to approve, shows the owner the deletion preview with every blocker, and shows the organization's request.",
"inputSchema": {
"type": "object",
"properties": {
"orgId": {
"type": "string"
}
},
"required": [
"orgId"
]
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false
}
}