API Reference
# Add Devices to an Account ### `POST /devices/actions/add` Adds up to 200 new devices to an account, without activating lines of service for them. Use this resource if you want to manage some device settings before you are ready to activate service for the devices. **NOTE**: This is not a required or recommended step. You do not need to add devices to an account before activating them. Verizon recommends using [/devices/actions/activate](https://thingspace.verizon.com/documentation/api-documentation.html#/http/standard-apis/connectivity-management/api-endpoints/device-management/activate-service-for-devices/api-reference) to add devices and activate service for them in a single step. The devices that you want to add must already exist in the Verizon Device Management Database (DMD). After you add devices, they are in the “Pre-active” provisioning state in the ThingSpace Platform. They do not appear in your Verizon Wireless billing account or in the My Business Account or Verizon Enterprise Center portals. To activate lines of service for devices after you have added them, see [/devices/actions/activate](https://thingspace.verizon.com/documentation/api-documentation.html#/http/standard-apis/connectivity-management/api-endpoints/device-management/activate-service-for-devices/api-reference). ## HTTP Request [POST https://thingspace.verizon.com/api/m2m/v1/devices/actions/add](https://thingspace.verizon.com/documentation/api-documentation.html#/http/standard-apis/connectivity-management/api-endpoints/device-management/add-devices/add-devices) ## Header Parameters The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token, and must set the content-type to JSON. | Parameter Name | Data Type | Description | |----------------------|-----------|:-----------------------------------------------------| | **Authorization** *(required)* | string | HTTP Authorization bearer token. | | **VZ-M2M-Token** *(required)* | string | A valid session token returned by `POST /session/login`. | | **Content-Type** *(required)* | string | Must be `application/json`. | ## Request Body Add two 4G devices: ```json { "accountName": "0000123456-00001", "customFields": [ { "key": "CustomField2", "value": "SuperVend" } ], "devicesToAdd":[ { "deviceIds":[ { "kind":"imei", "id":"15-digit IMEI" }, { "kind":"iccid", "id":"20-digit ICCID" } ] }, { "deviceIds":[ { "kind":"imei", "id":"15-digit IMEI" }, { "kind":"iccid", "id":"20-digit ICCID" } ] } ], "state": "Pre-active", "groupName": "West Region", "skuNumber": "up to 20-character SKU", "smrsOid": "object ID of the device in the subscription manager" } ``` ## Request Body Parameters All parameters are *(required)* unless marked *(optional)* | Parameter Name | Data Type | Description | |------------------------------------------|-----------------------------|---------------------------------------------| | **accountName** *(optional, but recommended)* | string | The billing account to which the devices are added. If you have access to multiple billing accounts, then you must specify an account. If you have access to only one account, the devices are added to that account even if you don’t include this parameter. An account name is usually numeric and must include any leading zeros. <br> **Note**: By coding for the account number today, you prevent future code from breaking if you ever add a new sub-account. | | **customFields** *(optional)*| array | The names and values (`key`, `value`) for any custom fields that you want set for the devices as they are added to the account. | | **key** *(required for `customFields`)* | string | The name of the custom field. Valid names are **CustomField1**, **CustomField2**, **CustomField3**, **CustomField4** and **CustomField5**. | | **value** *(required for `customFields`)* | string | The value of the custom field. | | **devicesToAdd** | array | The devices that you want to add by `deviceId` value. | | **deviceId** | array | An array of device identifier values (`kind`, `id`) | | **kind, id** | string | The type (kind) and value (id) of the device identifiers. For 4G devices: **IMEI** (up to 16 digits) and **ICCID** (up to 20 digits), in that order. For eUICC devices: **IMEI** and **EID** (the request must also include an **smsrOid**) <br> **NOTE**: If you are using a `skuNumber` to add 4G devices, you must provide only the **ICCID** identifier. | | **state** | string | The initial service state for the devices. The only valid state is **Pre-active**. | | **groupName** *(optional)* | string | The name of a device group to add the devices to. They are added to the default device group if you don’t include this parameter. | | **skuNumber** *(optional)* | string | The Stock Keeping Unit (SKU) number of a 4G device type with an embedded SIM. This can be used with ICCID device identifiers instead of an IMEI when adding 4G devices. The `SkuNumber` is used with all devices in the request, so all devices must be of the same type. <br> **NOTE**: Only 4G devices with embedded SIMs can be added by SKU at this time. | | **smsrOid** *(required for devices with eUICC)* | string | The Subscription Manager Secure Routing Object ID of the device. | ## Success Responses **Status 200** Contains a device identifier and a success or failure response for each device in the request. ```json [ { "deviceIds": [ { "id": "20-digit ICCID", "kind": "iccid" } ], "response": "Success" } ] ``` ## Success Respone Parameters | Parameter Name | Data Type | Description | |--------------------|---------------|------------------------------------| | **deviceIds** | array | Identifiers for the device. | | **kind** | string | The type of the device identifier. Valid types of identifiers are: **EID**, **ICCID** and **IMEI**. | | **id** | string | The value of the device identifier. | | **response** | string | The status message for the current device. This will be **Success** or **Failed**. | ## Failure Responses All error messages are returned in this format: ```json { "errorCode": "error code string", "errorMessage": "error message string" } ```