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

# Delete user plan

> End a plan you gave to one of your users

This endpoint ends a plan you gave with [Update user plan](/api-reference/white-label/update-user-plan), for example when the customer cancels with you. The plan ends immediately: its unused minutes, and what is left of a yearly prepayment, go back to the owner's balance, and the user keeps their other minutes and their chat credits. It is the **Remove plan** button in the **Plan** action of your administration panel.

Without a plan, the user is handled like any other user without one: your [default limits](/api-reference/white-label/get-default-limits) apply while free accounts are allowed, and if they are not, the account is deactivated, as when a paid plan ends.

<Note>
  This endpoint is available to the **account owner** (with an active plan) and to team members with **Billing Access**. Other users receive a 403 Forbidden error. Only users of your platform can be changed: any other ID, including the owner account, returns 404. Plans a user subscribed to on your platform cannot be removed here.
</Note>

Deleting a user also ends the plan you gave them, and returns its unused minutes, and what is left of a yearly prepayment, to the owner's balance.

### Path Parameters

<ParamField path="id" type="integer" required>
  The ID of the user. Administrators can list user IDs with [Get platform users](/api-reference/white-label/get-users).
</ParamField>

### Response

<ResponseField name="message" type="string">
  `Plan removed.`
</ResponseField>

<ResponseField name="data" type="null">
  Always `null`: the user has no plan anymore
</ResponseField>

<ResponseExample>
  ```json 200 Plan Removed theme={null}
  {
    "message": "Plan removed.",
    "data": null
  }
  ```

  ```json 401 Unauthenticated theme={null}
  {
    "message": "Unauthenticated."
  }
  ```

  ```json 403 Not Administrator theme={null}
  {
    "message": "You are not an administrator."
  }
  ```

  ```json 403 No Billing Access theme={null}
  {
    "message": "You do not have access to these settings."
  }
  ```

  ```json 404 User Not Found theme={null}
  {
    "message": "User not found."
  }
  ```

  ```json 422 No Plan theme={null}
  {
    "message": "This user has no plan."
  }
  ```

  ```json 422 Subscribed on the Platform theme={null}
  {
    "message": "This user's plan is paid in the platform, so it cannot be removed here."
  }
  ```

  ```json 429 Too Many Requests theme={null}
  {
    "message": "Too Many Attempts."
  }
  ```
</ResponseExample>

### Rate limit

The platform settings, default limits, user settings and plan endpoints share a limit of 60 requests per minute for each account. Above it they return `429`, and the `Retry-After` response header tells you how many seconds to wait.

### Example

```bash theme={null}
curl -X DELETE https://app.autocalls.ai/api/white-label/users/123/plan \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.