Skip to content
Last updated

Add users to a client account

Prerequisites

User properties

FieldRequiredDescription
first_nameYesUser's first name
last_nameYesUser's last name
emailYesEmail address (also the username for login)
phoneNoPhone number in E.164 format
time_zoneNoIANA time zone (for example, America/Chicago)

Step 1: Create the user

Send POST /v1/users with the user details. Authenticate using the client's API key so the user is associated with the correct client.

curl -X POST \
  https://api.dev.paradisegateway.net/v1/users \
  -H "Content-Type: application/json" \
  -H "APIKEY: CLIENT-API-KEY" \
  -d '{
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "jane.smith@example.com",
    "phone": "+15559876543",
    "time_zone": "America/Chicago"
  }'

Response

A 201 Created response returns the new user.

{
  "id": "USER-5NvxCyMmeKxIv8jz39b4urQb",
  "object": "user",
  "first_name": "Jane",
  "last_name": "Smith",
  "email": "jane.smith@example.com",
  "phone": "+15559876543",
  "time_zone": "America/Chicago",
  "is_mfa_active": false,
  "is_active": true,
  "is_locked": false,
  "correlation_id": "c3d4e5f6-a7b8-9012-cdef-123456789abc"
}

Step 2: List existing users

To see all users on the client account, send GET /v1/users.

curl https://api.dev.paradisegateway.net/v1/users \
  -H "APIKEY: CLIENT-API-KEY"

The response is an array of user objects associated with the client whose API key you used.

User states

FieldDescription
is_activetrue = the user can log in and make API calls
is_lockedtrue = the account is locked (too many failed login attempts)
is_mfa_activetrue = multi-factor authentication is enabled

Next steps