Standard APIsConnectivity ManagementAPI EndpointsDevice ManagementDelete Deactivated Devices

API Reference

Delete Devices

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 are 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.

POST devices/actions/delete

Header Parameters

The request header must set the content-type to JSON, contain a current ThingSpace authorization token and a current VZ-M2M session token. For more details on how to get these tokens, visit Getting Started.

Parameter NameData TypeDescription
Authorization (required)stringHTTP Authorization request header containing a valid Bearer token: Authorization: Bearer {token}
VZ-M2M-Token (required)stringA valid session token returned by a Connectivity Management POST /session/login request.
Content-Type (required)stringMust be application/json.

HTTP Request

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

Request Parameters

The request body identifies the devices to delete.

Parameter NameTypeDescription
devicesToDelete (required)arrayA array 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)arrayOne object per device to be deleted. Each object must contain a kind and id element identifying the device.
kind, id (required)stringThe type and value of the device identifier.
ESN - Electornic Serial Number, 11 digits
ICCID - Integrated Circuit Card ID, up to 20 digits
IMEI - International Mobile Equipmet Identifier, up to 16 digits
EID - Embedded Identity Document, 32 digits
accountName (optional but Recommended)stringThe Verizon billing account that the device group belongs to. An account name is numeric and must include any leading zeros. This is recommedned because coding for the account number today, you prevent future code from breaking if you ever add a new sub-account.

Example Request Body

Delete three devices

{
   "devicesToDelete":[
      {
         "deviceIds":[
            {
               "id":"11-digit ESN",
               "kind":"esn"
            }
         ]
      },
      {
         "deviceIds":[
            {
               "id":"20-digit ICCID",
               "kind":"iccid"
            }
         ]
      },
      {
         "deviceIds":[
            {
               "id":"20-digit ICCID",
               "kind":"iccid"
            }
         ]
      }
   ]
} 

Success Responses

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

Example Response

Two devices are successfully deleted and one is not.

{
   "deleteDevicesResponse":[
      {
         "deviceIds":{
            "id":"11-digit ESN",
            "kind":"esn"
         },
         "status":"Success"
      },
      {
         "deviceIds":{
            "id":"20-digit ICCID",
            "kind":"iccid"
         },
         "status":"Success"
      },
      {
         "deviceIds":{
            "id":"20-digit ICCID",
            "kind":"iccid"
         },
         "status":"Failed",
         "message":"The device is not in deactive state."
      }
   ]
} 

Response Parameters

Parameter NameTypeDescription
deleteDevicesResponsearrayAn array of deviceId objects.
deviceIdsobjectIdentifiers for the devices, containing a kind and id.
idstringThe value of the device identifier.
kindstringThe type of the device identifier.
statusstring“Success” if the device was deleted, or “Failed” if there was a problem.
messagestringNot present if status = Success. if status = Failed then this will provide troubleshooting information (i.e. The device is not in deactivate state. The user does not have access to delete the device.).

On this page