Skip to main content
DELETE
/
devices
/
{device_id}
Remove Device
curl --request DELETE \
  --url https://api.example.com/devices/{device_id}
{
  "404": {},
  "500": {},
  "code": "<string>",
  "message": "<string>",
  "results": "<string>"
}
Remove a device from the server’s device registry. Note that this operation only removes the device from the server - it does not log out the device from WhatsApp. To logout from WhatsApp, use the Logout Device endpoint first.

Endpoint

DELETE /devices/{device_id}

Authentication

This endpoint requires HTTP Basic Authentication.

Path Parameters

device_id
string
required
Device ID to remove from the server

Response

code
string
Response code
message
string
Response message
results
string
Additional result data (typically null)

Response Example

{
  "code": "SUCCESS",
  "message": "Device removed successfully",
  "results": null
}

Error Responses

404
object
Device Not Found
500
object
Internal Server Error

Example Request

curl -X DELETE http://localhost:3000/devices/my-device-id \
  -u username:password

Important Notes

This endpoint does NOT logout the device from WhatsApp. It only removes the device from the server’s registry.To properly logout a device from WhatsApp before removal:
  1. First call POST /devices//logout
  2. Then call this endpoint to remove the device from the server
If you remove a device that is still logged into WhatsApp without logging out first, the device will remain active on WhatsApp but won’t be manageable through this API anymore.

Use Cases

  • Clean up unused device slots
  • Remove devices after proper logout
  • Manage device inventory in multi-device setups
  • Free up resources by removing inactive devices

Build docs developers (and LLMs) love