# Clear Cloud Phone recycle bin

Permanently clear recycled Cloud Phones. Requires delete permission and access to the selected phones. Supply either 1–1000 unique positive IDs or `all: true` with IDs omitted or empty. Full cleanup covers only the current team and the caller’s authorized phone/group scope. Invalid or inaccessible selections fail before processing. Each selected phone returns a result; failures on individual phones do not stop the batch. `ACCEPTED` means asynchronous cleanup was accepted, not completed. `UNCHANGED` means no eligible recycle record changed. Inspect every item even when the top-level `code` is 0. This operation is irreversible. No task ID or public cleanup-status endpoint is returned; inspect the recycle bin in the client before retrying. Repeating `all: true` may include newly recycled phones.

Endpoint: POST /api/cloudphone/recycle/clear
Version: 2026-09-05

## Request fields (application/json):

  - `ids` (array)
    Cloud Phone IDs as decimal strings. Required unless all is true; 1–1000 unique positive IDs.

  - `all` (boolean | null)
    Clear all eligible phones within the current team and authorized scope. When true, omit ids or pass an empty array; otherwise supply ids.

  - `ids` (any, required)

  - `all` (string)
    Enum: "false", "null"

  - `all` (string, required)
    Enum: "true"

## Request examples:

  - `selected` (unknown)

  - `all` (unknown)

## Response 200:

  - `200` (unknown)
    Batch acceptance results. Inspect each item; successful submission does not mean cleanup has finished.

## Response 200 fields (application/json):

  - `code` (integer, required)
    Return result code 0:Normal Other codes are exceptions.

  - `msg` (string | null, required)
    Error message

  - `requestId` (string, required)
    Operation Request ID

  - `data` (array, required)

  - `data.id` (string, required)
    Example: 9007199254740993

  - `data.state` (string, required)
    ACCEPTED: asynchronous cleanup accepted; UNCHANGED: no eligible record changed; FAILED: this phone failed. Acceptance does not mean cleanup is complete.
    Enum: "ACCEPTED", "UNCHANGED", "FAILED"

  - `data.code` (integer, required)
    Per-phone result code: 0 for ACCEPTED or UNCHANGED; a business error code for FAILED.

