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

# Remove data

> Removes unused GB from a residential or premium residential package and credits it to your reusable GB credit balance.

Removes unused GB from an existing residential or premium residential package and credits it to your reusable Customer API **GB credit balance**. GB credits are spent automatically on your next [create order](/api/orders/create) or [add data](/api/packages/add-data) call, before your wallet balance.

Use it to move bandwidth between packages: remove GB from one package, then add it to another.

<Note>
  A package must keep at least 0.01 GB after removal.
</Note>

<ParamField path="id" type="string" required>
  ID of the package to remove data from, from [list packages](/api/packages/list).
</ParamField>

<ParamField body="quantity" type="number" required>
  Number of unused GB to remove.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://flameproxies.com/api/customer/packages/PACKAGE_ID/remove-data \
    -H "Authorization: Bearer fp_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{"quantity":2}'
  ```

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

  package_id = 123
  resp = requests.post(
      f"https://flameproxies.com/api/customer/packages/{package_id}/remove-data",
      headers={"Authorization": "Bearer fp_live_xxx"},
      json={"quantity": 2},
  )
  print(resp.json()["data_balance_gb"])
  ```

  ```javascript Node.js theme={null}
  const packageId = 123;
  const resp = await fetch(
    `https://flameproxies.com/api/customer/packages/${packageId}/remove-data`,
    {
      method: "POST",
      headers: {
        Authorization: "Bearer fp_live_xxx",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ quantity: 2 }),
    }
  );
  console.log(await resp.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "package_id": 123,
    "internal_id": "70437286-78a1-427c-b9fd-c299baadf3a9",
    "subuser_id": "56789",
    "plan": "residential",
    "removed_gb": 2,
    "removed_bytes": 2000000000,
    "credited_gb": 2,
    "data_balance_gb": 5,
    "remaining_bytes": 8000000000
  }
  ```
</ResponseExample>

## Response

<ResponseField name="package_id" type="number">
  Numeric package ID.
</ResponseField>

<ResponseField name="internal_id" type="string">
  The package's UUID.
</ResponseField>

<ResponseField name="subuser_id" type="string">
  ID of the sub-user behind this package.
</ResponseField>

<ResponseField name="plan" type="string">
  Product: `residential` or `premium_residential`.
</ResponseField>

<ResponseField name="removed_gb" type="number">
  GB removed from the package.
</ResponseField>

<ResponseField name="removed_bytes" type="number">
  Bytes removed from the package.
</ResponseField>

<ResponseField name="credited_gb" type="number">
  GB added to your GB credit balance.
</ResponseField>

<ResponseField name="data_balance_gb" type="number">
  Your GB credit balance after the removal.
</ResponseField>

<ResponseField name="remaining_bytes" type="number">
  Bytes left on the package after the removal.
</ResponseField>
