Delete Devices

Delete Devices:
POST /devices/actions/delete

Deletes up to 100 specified devices from the account. You must deactivate service for the devices before you can delete them.

Contents

See also:
Deactivate Service for Devices

Uses and Requirements

You must use this API method if you have deactivated a 4G device and want to use the SIM in a different device, or want to use the same device with a different SIM. Until you delete the device, the SIM and the device are still paired in the Verizon database and neither one can be reused.

NOTE: All historical records of the device will be deleted when you delete the device. Be sure to retrieve any device history (usage history, connection history) that you might want before you delete the device.

Request Components

HTTP Request

POST https://thingspace.verizon.com/api/m2m/v1/devices/actions/delete

Query Parameters

None.

Header Parameters

The request header must contain the current session token.

Parameter Name Data Type Description
VZ-M2M-Token
required
string A valid session token.

Request Body

The request body identifies the devices to delete.

Parameter Name Data Type Description
devicesToDelete
required
array of deviceIds A list of up to 100 devices that you want to delete, specified by device identifier. You only need to provide one identifier per device.
deviceIds
required
array of objects One object per device to be deleted. Each object must contain a kind and id element identifying the device.
kind,
id

required for devices
string The type and value of the device identifier.
  • ESN - decimal, 11 digits
  • ICCID - decimal, up to 20 digits
  • IMEI - decimal, up to 15 digits
  • MEID - hexadecimal, 14 characters
  • EID
accountName
optional
string The Verizon billing account that the device group belongs to. An account name is usually numeric, and must include any leading zeros.

Example Request Body

Delete three devices

{
  "devicesToDelete": [
    {
      "deviceIds": [
        {
          "id": "09005470263",
          "kind": "esn"
        }
      ]
    },
    {
      "deviceIds": [
        {
          "id": "85000022411113460014",
          "kind": "iccid"
        }
      ]
    },
    {
      "deviceIds": [
        {
          "id": "85000022412313460016",
          "kind": "iccid"
        }
      ]
    }
  ]
}

Success Responses

Status 200

Contains the device identifiers and a success or failure response for each device in the request.

Parameter Name Data Type Description
deviceIds Identifiers for the device.
id
string The value of the device identifier.
kind
string The type of the device identifier.
status string “Success” if the device was deleted, or “Failed” if there was a problem.
message string Not present if status==Success. One of these messages if status==Failed:
  • The device is not in deactivate state.
  • The user does not have access to delete the device.

Example Success Response

Two devices are successfully deleted and one is not.

{
  "deleteDevicesResponse":[
    {
      "deviceIds":{
        "id":"09005470263",
        "kind":"esn"
      },
      "status":"Success"
    },
    {
      "deviceIds":{
        "id":"85000022411113460014",
        "kind":"iccid"
      },
      "status":"Success"
    },
    {
      "deviceIds":{
        "id":"85000022412313460016",
        "kind":"iccid"
      },
      "status":"Failed",
      "message": "The device is not in deactive state."
    }
  ]
}

Failure Responses

Status 400

All syntax error messages are returned in this format:

{
  "errorCode": "error code string",
  "errorMessage": "error message string"
}

Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.

Try It Out!