Device registration
This page walks through registering a device to an end user using the Connhex Device Ownership service.
Prerequisites
Before a device can be registered, it must be:
- Provisioned in Connhex Cloud — via Connhex Control, SnapLink, or the Provisioning API
- Registered in Connhex Manufacturing — see Manufacturing
Provisioning is typically performed during the production or testing phase. See Bulk connectables provisioning for details on how to integrate it in your production process.
Authenticating the user
The end user must be authenticated before registering a device. Refer to the Token Authentication quickstart to obtain a valid token.
The user must have the resource:devices:register authorization action in their policy. See Permissions setup for details on how to configure roles and policies.
Registering the device
Call the Register a device endpoint with the device identifier (typically the serial number):
curl -X POST https://apis.<domain>/ownerships \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"deviceId": "<serial-number>"}'
Responses
| Status | Description |
|---|---|
201 | Device registered successfully. Returns the resourceId of the created resource. |
403 | The user is not authorized to register devices. Check the user's policy. |
404 | The device was not found in Connhex Manufacturing. Ensure the device has been provisioned and has a manufacturing entry. |
What happens under the hood
The Device Ownership service orchestrates several steps when a registration request is received. See the internal workflow documentation for a detailed breakdown.