Profiles
Create Profile
Create a new patient profile and assign it to a profile group
POST
Create a new patient profile and assign it to a profile group. The profile holds demographic data used across appointments and lab orders.
Send an optional
The panel is picked at random from the ones your API key can see, so its
Idempotency-Key header to make this create safe to retry — a repeat of the same key returns the original response instead of creating a second one. See Idempotency.
Request
Body parameters
string
required
First name of the patient. Must use latin characters, between 1 and 100 characters.
string
required
Last name of the patient. Must use latin characters, between 1 and 100 characters. Labs reject
orders for a patient without a surname, so a profile cannot be created without one.Three values are reserved to seed test fixtures — see Sandbox test fixtures.
integer
required
Biological sex per ISO/IEC 5218. Use
0 for unknown, 1 for male, 2 for female.string
required
Date of birth in
YYYY-MM-DD format. Must be a date in the past.string
required
Polymorphic reference (UUID or slug) to the profile group to assign this profile to. The UUID is
the immutable identifier and survives slug renames; the slug remains accepted for marketing and
partner integrations built on readable identifiers. UUID is preferred. The profile group must be
within your API key’s access context.
string
Email address for the profile. If omitted, Aniva auto-generates an email address.Supplying
email also makes the create retry-safe: an address can only ever have one profile, so
a repeated request returns 409 instead of a second profile. Auto-generated addresses are unique per
request, so repeats without email DO create separate profiles — send email if your integration
retries.string
Phone number in E.164 format (e.g.,
+14155552671).number
Height in centimeters.
number
Weight in kilograms.
string
default:"en"
Preferred language for the profile. Accepted values:
en, de, fi. Defaults to en.boolean
Whether this profile should receive transactional (programmatic) emails — appointment
confirmations, result-ready notices, etc. Overrides the profile group default. Distinct from
marketing opt-in. Omit to use the default.
boolean
Whether this profile opts in to marketing emails (newsletters, product updates). Overrides the
profile group default. Distinct from transactional emails. Omit to use the profile group default.
Write-only: not returned in the profile response.
Sandbox test fixtures
Every read path worth testing — List Appointments, Get Results, Download Document — is empty until a real blood draw happens days later. That makes an automated integration test awkward to write. Threelast_name values are reserved to solve it. Create a profile with one and Aniva
pre-populates the state described below before responding, so your next call already sees it:
Matching is case-insensitive. Every other field — including
date_of_birth and sex — is stored and
used normally, so the reference ranges you get back are the real age- and sex-specific ones for the
profile you created.
The appointment is booked at the Aniva Test location, on a real bookable slot at least five days
from now (or five days ago, for the past states). Seeding it places no lab order and books no
courier.
Give test profiles an address you control. Aniva’s appointment reminders are driven by
scheduled_at, so the upcoming fixture will send them unless the profile is opted out via
transactional_emails_enabled: false.panel_id always resolves
against your own List Panels. Clinical biomarkers get a value inside the
biomarker’s reference range; genes get a random genotype from Aniva’s reference data, with the matching variants, clinical significance and rs ids following from it.
Panel and values are regenerated on every create, so assert on shape rather than on a specific
panel or exact numbers.
Response
On success, the API returns201 Created with the newly created profile.
string
required
Unique profile identifier (UUID).
string
Profile handle or username. May be
null.string
First name. May be
null.string
Last name. May be
null.string
Email address. May be
null.string
Phone number in E.164 format. May be
null.integer
Biological sex per ISO/IEC 5218 (
0 = unknown, 1 = male, 2 = female). May be null.string
Date of birth in
YYYY-MM-DD format. May be null.number
Height in centimeters. May be
null.number
Weight in kilograms. May be
null.string
Preferred language (
en, de, or fi).boolean
Whether this profile receives transactional (programmatic) emails.
null when never set.string
ISO 8601 timestamp of when the profile was created.
string
ISO 8601 timestamp of the last update.
null for newly-created profiles.Error responses
A
409 looks like this — treat it as “this profile already exists” and look it up with
List Profiles (?email=) rather than retrying the create: