> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linkedcamp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Sub-Account

> Cancel and delete a sub-account from an agency account.

<Note>
  This endpoint requires an **agency owner** token. This action is **irreversible**.
</Note>

## Headers

<ParamField header="token" type="string" required>
  Token from the agency owner account.
</ParamField>

## Body Parameters

<ParamField body="email" type="string" required>
  Email address of the sub-account to cancel.
</ParamField>

<ParamField body="reason" type="string" required>
  Reason for cancelling the sub-account.
</ParamField>

<ParamField body="description" type="string" required>
  Detailed description of why the sub-account is being cancelled.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful.
</ResponseField>

<ResponseField name="message" type="string">
  A human-readable result message.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.linkedcamp.com/users/cancel \
    -H "token: YOUR_AGENCY_OWNER_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "email": "jane@example.com",
      "reason": "Client requested cancellation",
      "description": "The client no longer needs LinkedIn outreach services."
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.linkedcamp.com/users/cancel",
      headers={"token": "YOUR_AGENCY_OWNER_TOKEN"},
      json={
          "email": "jane@example.com",
          "reason": "Client requested cancellation",
          "description": "The client no longer needs LinkedIn outreach services.",
      },
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.linkedcamp.com/users/cancel", {
    method: "POST",
    headers: {
      "token": "YOUR_AGENCY_OWNER_TOKEN",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      email: "jane@example.com",
      reason: "Client requested cancellation",
      description: "The client no longer needs LinkedIn outreach services.",
    }),
  });
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "User deleted successfully!"
  }
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "message": "Invalid user email!"
  }
  ```
</ResponseExample>
