post_org_self_delete_by_orgid_by_requestid_cancel

Changes data · you confirm first

Calls POST /api/org-self-delete/{orgId}/{requestId}/cancel as the signed-in person · REST reference

Withdraw a deletion request

The person who made it, the organization's owner, or platform staff (403 for anyone else). A request awaiting its code or its parent can be withdrawn; its code stops working.

Arguments

ArgumentTypeDescription
orgIdpathstring (uuid)required
requestIdpathstring (uuid)required
bodyJSONobjectThe request body, as a JSON object. Its fields are listed below.

Fields of body

FieldTypeDescription
reasonstring

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.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "post_org_self_delete_by_orgid_by_requestid_cancel",
    "arguments": {
      "orgId": "11111111-1111-4111-8111-111111111111",
      "requestId": "11111111-1111-4111-8111-111111111111",
      "body": {
        "reason": "string"
      }
    }
  }
}
Confirmation
The client shows the person the exact request and waits. Nothing runs until they tick Make this change. See Reading and changing.

Result

On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.

Withdrawn.

json
{
  "data": {
    "createdAt": 1,
    "expiresAt": 1,
    "id": "11111111-1111-4111-8111-111111111111",
    "orgId": "11111111-1111-4111-8111-111111111111",
    "orgName": "string",
    "requestedBy": {
      "email": "string",
      "userId": "11111111-1111-4111-8111-111111111111",
      "firstName": "string",
      "lastName": "string"
    },
    "status": "AWAITING_CODE",
    "cancelledAt": 1,
    "completedAt": 1,
    "confirmedAt": 1,
    "decidedAt": 1,
    "parentOrgId": "11111111-1111-4111-8111-111111111111",
    "parentOrgName": "string",
    "reason": "string"
  },
  "success": true
}

Fields

FieldTypeDescription
dataobject
data.cancelledAtinteger | null
data.completedAtinteger | null
data.confirmedAtinteger | null
data.createdAtintegerEpoch milliseconds.
data.decidedAtinteger | null
data.expiresAtintegerEpoch milliseconds — the current step's deadline: the code's (OTP_EXPIRY_SECONDS), then seven days for the parent.
data.idstring (uuid)
data.orgIdstring (uuid)
data.orgNamestring
data.parentOrgIdstring (uuid) | nullThe parent organization that must approve; null when there is none.
data.parentOrgNamestring | null
data.reasonstring | nullWhy it was cancelled or declined.
data.requestedByobject
data.requestedBy.emailstring
data.requestedBy.firstNamestring | null
data.requestedBy.lastNamestring | null
data.requestedBy.userIdstring (uuid)
data.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.
successtrue

When it fails

A failed call returns isError: true with the API's message as text. A change the person declines, or lets time out, also comes back this way and nothing changes.

400

The request was malformed or failed a guard.

403

Authenticated, but the caller holds none of the required permissions.

404

No request with that id for this organization.

409

The resource is not in a state that allows this operation.

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.

json
{
  "name": "post_org_self_delete_by_orgid_by_requestid_cancel",
  "description": "POST /api/org-self-delete/{orgId}/{requestId}/cancel — The person who made it, the organization's owner, or platform staff (403 for anyone else). A request awaiting its code or its parent can be withdrawn; its code stops working.\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "orgId": {
        "type": "string"
      },
      "requestId": {
        "type": "string"
      },
      "body": {
        "type": "string",
        "description": "The JSON request body: { reason: string }"
      }
    },
    "required": [
      "orgId",
      "requestId"
    ]
  },
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": false
  }
}