Limpiar un número

Sirve para limpiar la sesión de WhatsApp de un número: después hay que volver a escanear el código QR. Es irreversible y requiere accounts:operate.

POST
/devices/{device}/clean

"Desconectar" (whatsapp-preverified-number-assignment D60; spec device-connection-actions): never erases the number information and never frees the place, QR and Meta, both modes.

  • QR: provider logout of the WhatsApp session; the instance (uid, token) stays so the user scans again; alias, color, image, app name, identity and history are kept.
  • Meta: the QR sibling's one-to-one is turned back on FIRST (synchronously, while the row still has its number, D60.7); then only the access token is cleared (no provider call, status() answers pending_login, D60.10); uid (phone_number_id), waba_id, identity and is_coexistence are kept, so the same number reconnects with Embedded Signup on the same row (also at or over the pool: D59 S1 / D20 rule 4). number goes NULL as before (the card shows number_key). 409 device_retired on a retired row; 409 operation_in_progress while a Meta signup holds a number reservation. 200 {data: DeviceResource, numbers_capacity} (numbers_capacity omitted when it cannot be computed, D59.12)

Escritura · requiere el permiso accounts:operate.

⚠️ Operación irreversible. No hay papelera ni deshacer: resetear o limpiar un número mata su sesión de WhatsApp (hay que volver a escanear el código), purgar la cola descarta los mensajes encolados sin dejar registro de lo descartado, y los borrados eliminan el recurso.

Autorización

http
headerAuthorizationBearer <clave>

Parámetros de la ruta

device*integer

The device ID

Cuerpo de la respuesta

application/json
  1. response
data*array<unknown>
numbers_capacity*string|null
curl -X POST "https://example.com/devices/0/clean"
{  "data": [    null  ],  "numbers_capacity": "string"}