Skip to main content

πŸ‘©β€πŸ’» Users

Cryptr stores user profiles for your application in a dedicated hosted cloud database for a specific Organization. User profile information can come from your users directly. The sources are magic link signup, SSO (via SAML) logins, or Active Directory.

  • A (User) represents an end user of your customer or partner in your Cryptr service.
note

Your Cryptr subscription plan could limit the number of users. See our pricing for more details.

The User's Organization domain​

Each end-user is stored in a distinct directory for a dedicated customer (Organization). You can figure out the domain of the user's Organization from this user's atttribute domain.

The User type​

Each new user get a unique id (identifier) generated and which is impossible to update.

ATTRIBUTES​

__domain__ ID​

The __domain__ is the User's Organization domain.


__environment__ ENUM​

The __environment__ is the User's storage database with the following available values: SANDBOX, PRODUCTION.


id UUID​

The immutable identifier.


avatar_hexa_color STRING​

Each time a new user is created, a random color in hexadecimal format, like #4B0082 that is generated and associated to the user.


metadata MetaData List​

User's MetaData. See Token Customization > Set meta data value of metakey


profile PROFILE​

The OpenID Connect profile specification defines a set of standard Claims. They can be requested to be returned either in the UserInfo Response or in the ID Token.

EXAMPLE​
A User type

{
"__access__": "limited_to:misapret",
"__type__": "User",
"__domain__": "misapret",
"__managed_by__": "your_domain",
"__environment__": "production",
"id": "8724da20-c140-4d01-82d2-bc87079a6f6e",
"metadata": [],
"profile": {
"__access__": "limited_to:misapret",
"__domain__": "misapret",
"__environment__": "production",
"__managed_by__": "your-domain",
"__type__": "Profile",
"address": {
"__access__": "limited_to:misapret",
"__domain__": "misapret",
"__environment__": "production",
"__managed_by__": "your-domain",
"__type__": "Address",
"formatted": "165 avenue de Bretagne\n59000 Lille, France",
"street_address": "165 avenue de Bretagne",
"city": "Lille",
"region": "Nord",
"postal_code": "59000",
"country": "FR"
},
"given_name": "Janis",
"family_name": "Joplin",
"name": "Janis Joplin",
"nickname": "Jany",
"profile": "http://www.example.com/profile",
"phone_number": "+1-555-415-1337",
"picture": "http://www.example.com/avatar.jpeg",
"website": "http://www.example.com",
"email": "janis.joplin@example.com",
"gender": "female",
"birthdate": "1943-01-19",
"zoneinfo": "America/Los_Angeles",
"locale": "fr"
}
}

The Profile type​

ATTRIBUTES​

email STRING​

Email


phone_number STRING​

User telephone number as E.164 format. For example, +1 (425) 555-1212 or +56 (2) 687 2400.


given_name STRING​

The first name is an Open Id Connect Profile attribute.


nickname STRING​

It's an Open Id Connect Profile attribute.


profile URL​

It's an Open Id Connect Profile attribute.


picture URL​

It's an Open Id Connect Profile attribute.


website URL​

Insertion date time


gender ENUM​

It's an Open Id Connect Profile attribute.


zoneinfo ENUM​

It's an Open Id Connect Profile attribute.


locale ENUM​

It's an Open Id Connect Profile attribute.


address ADDRESS​

Userβ€˜s postal address. The value of the address member is a Address type defined here.

birthdate DATE​

User's birthday represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format.

The Address type​

ATTRIBUTES​

formatted STRING​

The Full mailing address is formatted to display or use on a mailing label. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair ("\r\n") or as a single line feed character ("\n").


street_address STRING​

The complete address includes house number, street name, PO box, and extended street address information on multiple lines. This field may contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair ("\r\n") or as a single line feed character ("\n").

locality STRING​

City or locality component.


region STRING​

State, province, prefecture, or region component of the User.


postal_code STRING​

Zip code or postal code component of the User.


country STRING​

Country name component.

Create a User​

Creates a new user in an Organization.

Query
curl --request POST 'https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/org/:org_domain/users' \
--data-raw '{
"domain": "misapret",
"environment": "production",
"profile": {
"address": {
"__type__": "Address",
"formatted": "165 avenue de Bretagne\n59000 Lille, France",
"street_address": "165 avenue de Bretagne",
"city": "Lille",
"region": "Nord",
"postal_code": "59000",
"country": "FR"
},
"given_name": "Janis",
"family_name": "Joplin",
"name": "Janis Joplin",
"nickname": "Jany",
"profile": "http://www.example.com/profile",
"phone_number": "+1-555-415-1337",
"picture": "http://www.example.com/avatar.jpeg",
"website": "http://www.example.com",
"email": "josefa.farrell@yahoo.com",
"gender": "female",
"birthdate": "1943-01-19",
"zoneinfo": "America/Los_Angeles",
"locale": "fr"
}
}'


PARAMETERS​

domain STRING REQUIRED​

You need to precise the domain of the Organization to store this created User in the good directory (Organization's domain).


environment ENUM REQUIRED​

The environment is the User's storage database with the following available values: SANDBOX, PRODUCTION.


email STRING REQUIRED​

Email is a required field as it is part of the security of the created end-user account.


phone_number STRING​

User telephone number as E.164 format. For example, +1 (425) 555-1212 or +56 (2) 687 2400.


given_name STRING​

The first name is an Open Id Connect Profile attribute.


nickname STRING​

It's an Open Id Connect Profile attribute.


profile URL​

It's an Open Id Connect Profile attribute.


picture URL​

It's an Open Id Connect Profile attribute.


website URL​

Insertion date time


gender ENUM​

It's an Open Id Connect Profile attribute, available options are male, female or null.


zoneinfo ENUM​

It's an Open Id Connect Profile attribute.


locale ENUM​

It's an Open Id Connect Profile attribute.


address ADDRESS​

Userβ€˜s postal address. The value of the address member is a Address type defined here.

RETURNS​

Returns a User attached to an Organization if the creation succeeded. Returns an error if create parameters are invalid (e.g. specifying an invalid code or an invalid source).

Retrieve a User​

By ID​

Fetch a User by its given id.

Query

curl 'https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/org/:org_domain/users/:user_id?environment=:environment'

PARAMETERS​

No parameters.

RETURNS​

Returns the User for a valid identifier. If it’s for a deleted User, a subset of the User’s information is returned, including a deleted property that is set to true.

By email​

Fetch a User by its given email.

Query

curl'https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/org/:org_domain/user-by-email/:user_email?environment=:email'

PARAMETERS​

No parameters.

RETURNS​

Returns a User for a valid identifier. If it’s for a deleted User, a subset of the User’s information is returned, including a deleted property that’s set to true.

Update a User​

Update an existing user.

Query

curl https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/org/:org_domain/users/${USER_ID} \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d profile="https://franksinatra.com"



PARAMETERS​

profile PROFILE​

The OpenID Connect profile specification defines a set of standard Claims. They can be requested to be returned either in the UserInfo Response or in the ID Token.

RETURNS​

Returns an updated Users from an Organization if the update succeeded. Returns an error if create parameters are invalid (e.g. specifying an invalid code or an invalid source).

List all Users​

Returns a list of your Users. The Users are returned sorted by creation date, with the most recent users appearing first.

Query

curl https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/org/:org_domain/users?environment=:environment


PARAMETERS​

page INTEGER​

Precise the page of your listing, see how to paginate the Cryptr API.


per_page INTEGER​

Precise the size of the pages of the pagination of the list. See how to paginate the Cryptr API.


RETURNS​

A dictionary with a data property that contains an array of up to limit users. Each entry in the array is a separate user type. If no users are available, the resulting array will be empty. This request should never return an error.