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:

  1. If the actor makes the request on behalf of another user, the value assigned to status can be one of:
  2. If the actor making the request is the same user for whom the device is created, the status can only be 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.

Prerequisites

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.