The sample shows the POST /environments/{{envID}}/users/{{userID}}/devices
operation to add an EMAIL device to the specified user resource.
The status
parameter is optional. Use cases:
status
can be one of:
ACTIVE
(default, if not provided): The device is pre-paired for the user. The user is not required to activate the device before performing its first authentication.ACTIVATION_REQUIRED
: The user must activate the device before performing its first authentication.ACTIVATION_REQUIRED
(default, if not provided). Thus in this case, a user is required to activate the device before performing its first authentication.If the status is ACTIVATION_REQUIRED
, you can use the notification
property during device creation to create a custom device pairing notification. This is only applicable with SMS, Voice and Email devices. This property is not returned with GET
operations and cannot be used with PUT
operations. For more information, see Custom device pairing notification with device creation.
Note: An actor making a self request must have an access token that includes the p1:create:device
scope.
Property | Type | Required? |
---|---|---|
type |
String | Required |
email |
String | Required |
policy.id |
String | Required |
notification |
String | Optional |
testMode |
String | Optional |
block.status |
String | Optional |
block.blockedAt |
Date | Optional |
lock.status |
String | Optional |
lock.expiresAt |
Date | Optional |
policy.id |
String | Optional |
policy.type |
String | Optional |
nickname |
String | Optional |
See the Device properties data model for full property descriptions.