Transfer Device

Transfer Device

POST https://{server_address}/api/v1/organization/device/transfer

To successfully trasnfer device, you need to fulfil these requirements:

Choose Either User or Organization ID

Specify one of two identifiers – either newUserId or newOrgId. Note that if you provide newUserId, the system will ignore newOrgId, and the other way around.

Access to Destination Organization:

You must have access rights to the organization to which you're transferring the device. If you don't specify an organization, the system will default to using the organization of the new owner.

Activation of New Owner's Account: The account of the new device owner must be activated for the transfer to be successful.

Headers

NameTypeDescription

Authorization*

Bearer {access_token}

Content-Type*

application/json

Request Body

NameTypeDescription

deviceId*

1

Device identifier.

newUserId

1

New device owner identifier.

newOrgId

1

New organization owner identifier.

{
    "error": {
        "message": "Device with identifier 1 is not found or belong to another organization."
    }
}

Request examples:

# curl command example:
$ curl -X POST -H "Content-Type: application/json" \
      -H "Authorization: Bearer {accessToken}" \
      -d '{"deviceId":1,"newUserId":1}' \
      https://fra1.blynk.cloud/api/v1/organization/device/transfer

$ curl -X POST -H "Content-Type: application/json" \
      -H "Authorization: Bearer eIdWHQqRfFmvP5LDDh-IGxPUzi7I27HthzCPAVmS" \
      -d '{"deviceId":1,"newUserId":1}' \
      https://fra1.blynk.cloud/api/v1/organization/device/transfer

Last updated