Create an active Patient by Template name, without an invitation email

Create an active Patient by Template name, without an invitation email

This API is intended for automated flows, such as automated tests, where a user must be able to log in right away without going through the invitation email. For regular onboarding of real users, use the regular create API, which sends an invitation email.

Creates a user that is active immediately, using the username and password supplied in the request.

Unlike the regular create API, no invitation email is sent and there is nothing for the user to accept: the credentials in this request are the user's credentials, so they can log in as soon as this call returns. The created user is therefore returned with _invitationAccepted set to true.

The template is identified by name in the path, and custom attributes can be specified in the request body.

The password must satisfy the password policy configured for the environment. A password that does not, or a username that is already taken, fails with USER_CREATION_FAILED.

MFA is applied exactly as the template configures it. If the template requires MFA, then so does this user's login, which is worth checking before using this API to create users for automated tests.

A patient created this way can always log in, so _canLogin is set to true and any value sent for it in the request is ignored.

(*)This parameter is mandatory only if its optional parent attribute is defined. Click here for more information.

Request Body Parameters:

ParameterTypeMandatoryDescriptionExample
_nameobjecttrue
_name.firstNamestringtrue(*)A person's first nameJohn
_name.lastNamestringtrue(*)A person's last nameSmith
_descriptionstringfalseA description, can be up to 5000 characters longLorem Ipsum
_emailstringfalseAn email address in the RFC-5322 specification[email protected]
_phonestringfalseA person's phone An E.164 formatted phone number+12345678901
_localestringfalseA person's locale Locale in the following format: {language-ISO639}-{countryCode-ISO3166} lowercase.en-us
_genderstringfalseA persons gender Values:MALE,FEMALE,UNDISCLOSEDFEMALE
_dateOfBirthstringfalseA person's date of birth A UTC date in the ISO-8601 format2007-12-20
_addressobjectfalse
_address.countryCodestringtrue(*)A 2-letter country code defined in ISO-3166US
_address.statestringfalseA stateMassachusetts
_address.citystringfalseA cityBoston
_address.zipCodestringfalseA zipcode02101
_address.address1stringfalseAn address11 Main St.
_address.address2stringfalseAn address's specificsEntry B, Apartment 1
_mfaobjectfalse
_mfa.enabledbooleanfalseMFA login enabled or disabled. When omitted, the template's configured default is applied.
_mfa.expirationInMinutesintegerfalseMFA expiration time in minutes
_credentialTypestringfalseWhat type of credentials is used when logging in to the system. Only one type can be used. Default:PASSWORD Values:PASSWORD,OTP
_additionalPhonestringfalseAn E.164 formatted phone number+12345678901
_nationalIdstringfalseA person's national ID123456789
_canLoginbooleanfalseDetermine whether a patient has the ability to login to the system or not. When omitted, the patient template's configured default is applied.
_usernamestringtrueUser's username. Can be an email or a regular username. With this username you login to the system.[email protected] or john123
_passwordstringtrueA passwordAa123456
_ownerOrganizationobjecttrue
_ownerOrganization.idstringtrue(*)
_caregiverobjectfalse
_caregiver.idstringtrue(*)
Path Parameters:
ParameterTypeMandatoryDescriptionExample
templateNamestringtruenull

This API requires PROTECTED_API permission(s).

Path Params
string
required
Body Params
_name
object
required
string

A description, can be up to 5000 characters long

string

An email address in the RFC-5322 specification

string

A person's phone An E.164 formatted phone number

string

A person's locale Locale in the following format: {language-ISO639}-{countryCode-ISO3166} lowercase.

string
enum

A persons gender

Allowed:
string

A person's date of birth A UTC date in the ISO-8601 format

_address
object
_mfa
object
string
enum

What type of credentials is used when logging in to the system. Only one type can be used. Default:PASSWORD

Allowed:
string

An E.164 formatted phone number

string
length between 1 and 50

A person's national ID

boolean

Determine whether a patient has the ability to login to the system or not. When omitted, the patient template's configured default is applied.

string
required

User's username. Can be an email or a regular username. With this username you login to the system.

string
required

A password

_ownerOrganization
object
required
_caregiver
object
Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json