Skip to content

Create a user account

POST
/user
curl --request POST \
--url https://client-api.abi.ai/user \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "uniqueId": "123abc789xyz", "firstName": "Jane", "lastName": "Doe", "email": "janedoe@example.com", "phone": "+441234567890", "validatePhone": true, "address": "123 Main St, Apt 4B", "age": 34, "dateOfBirth": "1994-10-07", "gender": "male", "language": "en", "country": "it", "location": "es", "origin": "gb", "physicianCountry": "es", "privacyAt": false, "termsAt": false, "shouldNotify": true, "subscriptionStartDate": "2021-11-17", "subscriptionEndDate": "2022-05-31", "associatedAccounts": 5, "productName": "Free trial" }'
Media typeapplication/json
object
uniqueId

An optional identifier from your system

string
Example
123abc789xyz
firstName

The user’s first name.

string
Example
Jane
lastName

The user’s surname.

string
Example
Doe
email

The user’s email address.

string format: email
Example
janedoe@example.com
phone

The user’s mobile number including international dialing code (E.164).

string
Example
+441234567890
validatePhone

Validate the supplied phone number before creating the user.

boolean
Example
true
address

The user’s address.

string
Example
123 Main St, Apt 4B
age

The user’s age.

number
Example
34
dateOfBirth

The user’s date of birth.

string format: date
Example
1994-10-07
gender

The user’s gender

string
Allowed values: male female other
Example
female
language
required

The language Abi uses to communicate with the user.

string
Example
en
country

The user’s nationality or country code.

string
Example
it
location

The country where the user lives or is currently located.

string
Example
es
origin

The country in which the user was born.

string
Example
gb
physicianCountry
required

The country in which responding healthcare professionals are licensed.

string
Example
es
privacyAt

Whether the user has accepted the Privacy Notice.

boolean
Example
false
termsAt

Whether the user has accepted the Terms and Conditions.

boolean
Example
false
shouldNotify

Send the configured invitation notification when contact details are supplied.

boolean
default: true
Example
true
subscriptionStartDate

The UTC date on which the subscription becomes active.

string format: date
Example
2021-11-17
subscriptionEndDate

The UTC date on which the subscription expires.

string format: date
Example
2022-05-31
associatedAccounts

The number of associated accounts allowed by an enabled group-account policy. This user becomes the main policy holder.

integer
Example
5
productName

The Abi-provided product identifier for this account subscription.

string
Example
Free trial

User created. See the User account model for the full response-field reference.

Media typeapplication/json
object
Example
{
"id": "abi1234",
"uniqueId": "123abc789xyz",
"userStatus": "activeUser",
"firstName": "Jane",
"lastName": "Doe",
"email": "janedoe@gmail.com",
"gender": "female",
"phone": "+441234567890",
"origin": "gb",
"location": "es",
"country": "it",
"physicianCountry": "es",
"language": "en",
"dateOfBirth": "1994-10-07",
"partnerName": "Abi",
"associatedAccounts": 5
}