Skip to main content
POST
/
api
/
v1
/
profiles
curl --request POST \
  --url https://anivahealth.com/api/v1/profiles \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "first_name": "Maria",
    "last_name": "Schmidt",
    "sex": 2,
    "date_of_birth": "1985-03-22",
    "profile_group_slug": "acme-clinic-berlin",
    "email": "maria.schmidt@example.com",
    "phone": "+4930123456789",
    "height": 168,
    "weight": 65,
    "language": "de"
  }'
{
  "id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
  "handle": null,
  "first_name": "Maria",
  "last_name": "Schmidt",
  "email": "maria.schmidt@example.com",
  "phone": "+4930123456789",
  "sex": 2,
  "date_of_birth": "1985-03-22",
  "height": 168,
  "weight": 65,
  "language": "de"
}
Create a new patient profile and assign it to a profile group. The profile holds demographic data used across appointments and lab orders.
Requires the CREATE_USER scope. Requests made with a key that lacks this scope return 403 Forbidden.

Request

Body parameters

first_name
string
required
First name of the patient. Must use latin characters, between 1 and 100 characters.
last_name
string
Last name of the patient. Must use latin characters, between 1 and 100 characters.
sex
integer
required
Biological sex per ISO/IEC 5218. Use 1 for male and 2 for female.
date_of_birth
string
required
Date of birth in YYYY-MM-DD format. Must be a date in the past.
profile_group_slug
string
required
Slug of the profile group to assign this profile to. The profile group must be within your API key’s access context.
email
string
Email address for the profile. If omitted, Aniva auto-generates an email address.
phone
string
Phone number in E.164 format (e.g., +14155552671).
height
number
Height in centimeters.
weight
number
Weight in kilograms.
language
string
default:"en"
Preferred language for the profile. Accepted values: en, de, fi. Defaults to en.

Response

On success, the API returns 201 Created with the newly created profile.
id
string
required
Unique profile identifier (UUID).
handle
string
Profile handle or username. May be null.
first_name
string
First name. May be null.
last_name
string
Last name. May be null.
email
string
Email address. May be null.
phone
string
Phone number in E.164 format. May be null.
sex
integer
Biological sex per ISO/IEC 5218 (1 = male, 2 = female). May be null.
date_of_birth
string
Date of birth in YYYY-MM-DD format. May be null.
height
number
Height in centimeters. May be null.
weight
number
Weight in kilograms. May be null.
language
string
Preferred language (en, de, or fi).

Error responses

StatusDescription
400Validation error — one or more fields failed validation.
403Forbidden — missing CREATE_USER scope or profile group is outside your access context.
404Profile group not found.
500Internal server error.
curl --request POST \
  --url https://anivahealth.com/api/v1/profiles \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "first_name": "Maria",
    "last_name": "Schmidt",
    "sex": 2,
    "date_of_birth": "1985-03-22",
    "profile_group_slug": "acme-clinic-berlin",
    "email": "maria.schmidt@example.com",
    "phone": "+4930123456789",
    "height": 168,
    "weight": 65,
    "language": "de"
  }'
{
  "id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
  "handle": null,
  "first_name": "Maria",
  "last_name": "Schmidt",
  "email": "maria.schmidt@example.com",
  "phone": "+4930123456789",
  "sex": 2,
  "date_of_birth": "1985-03-22",
  "height": 168,
  "weight": 65,
  "language": "de"
}