Assign FOTA Licenses to HTTP Devices

POST /licenses/{acc}/assign

Assigns FOTA licenses to HTTP devices.

Uses and Requirements

The account must have unused licenses available to assign to the devices. You can get the total number of licenses and the number of used licenses with the GET /licenses/{account} request.

Request Components

HTTP Request


Resource Path and Query Parameters

You must include the account name in the path.

Parameter Name Data Type Description
string Account identifier.

Header Parameters

The request header must contain a current ThingSpace authorization token and a current VZ-M2M-session token.

Parameter Name Data Type Description
string HTTP Authorization request header containing a valid Bearer token.
string A valid session token returned by a Connectivity Management POST /session/login request.
string Must be application/json.

Request Body

The request body provides the device list.

Parameter Name Data Type Description
array of IMEI strings The IMEIs of the devices to assign licenses to.

Example Request

Assign licenses to two devices.

curl$ACC/assign -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN' -H 'Content-Type: application/json' -d
  "deviceList": [

Success Responses

Status 200

Parameter Name Data Type Description
accountName string Account identifier
licTotalCount integer Total FOTA license count.
licUsedCount integer Assigned FOTA license count.
deviceList array of devices IMEI device list.
deviceList.deviceId string Device identifier.
deviceList.status string Status of the license assignment. Valid values include:
  • Success
  • Failure
deviceList.resultReason string More information about the status, such as "Success", "Device license preexisting", or a reason for a failure, such as "Device Not Found."

Example Success Response

  "accountName": "string",
  "licTotalCount": 1000,
  "licUsedCount": 502,
  "deviceList": [
      "deviceId": "990003425730524",
      "status": "Success",
      "resultReason": "Success"
      "deviceId": "990000473475967",
      "status": "Failure",
      "resultReason": "Device does not exist."

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.