Create Device Group

Create a new device group and optionally add devices to the group. Device groups can make it easier to manage similar devices and to get reports on their usage.

Contents

See also:
Get a List of Device Groups
Get Information about a Device Group
Update a Device Group
Delete a Device Group
Change Device Custom Fields

Request Components

HTTP Request

POST https://thingspace.verizon.com/api/m2m/v1/groups

Resource and Query Parameters

None.

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

The information about the device group that you want to create.

Parameter Name Data Type Description
accountName
required
string The Verizon billing account that the device group will belong to. An account name is usually numeric, and must include any leading zeros.
groupName
required
string The name for the new device group. This name must be unique within the specified account.
groupDescription
required
string A description for the device group.
devicesToAdd
optional
array of deviceId objects Zero or more devices to add to the device group. You can use POST /devices/actions/list to get a list of all devices in the account.
kind,
id

required for devicesToAdd
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
  • MDN - decimal, 10 digits
  • MEID - hexadecimal, 14 characters
  • MSISDN - decimal, 11 digits

Example Request Body

{
   "accountName":"0000123456-00001",
   "groupName":"group name",
   "groupDescription":"descriptive string",
   "devicesToAdd":[
      {
         "kind":"imei",
         "id":"15-digit IMEI"
      }
   ]
}

Success Responses

Status 200

Parameter Name Data Type Description
success Boolean A value of “true” indicates that the device group was created successfully.

Example Success Response

{ "success": true }

Failure Responses

Status 400

All 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!