Home Kit Orders
Email Results
Email the customer that the lab results of their home kit are ready
POST
/
api
/
v1
/
home-kit-orders
/
{id}
/
results
/
email
curl --request POST \
--url https://anivahealth.com/api/v1/home-kit-orders/d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a/results/email \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"with_reports": true
}'
{
"recipient_email": "maria.schmidt@example.com",
"attachment_count": 1,
"sent_at": "2026-10-15T09:12:44.512Z"
}
{
"error": "No lab report has arrived yet.",
"reason": "no_reports"
}
Send the customer one email that tells them their lab results are ready. The email goes to the
email of the home kit order’s profile.
The email uses generic partner branding: the name and the logo of the profile’s primary profile
group. It is in German when the profile language is de, and in English for all other languages.
Set with_reports to true to attach the lab reports of the kit. The email
attaches every report that the customer can see in the app. Set it to false to
send only the notice. Add note to show a personal note in the email, at most 1000 characters.
Every attached report is a PDF encrypted with AES-256. The password is the date_of_birth of the
profile as 8 digits, DDMMYYYY, without dots: a customer born on 1 February 1985 types
01021985. The email tells the customer this format, but never the birthdate itself.
Each call sends one email. Calls are not deduplicated: if you call the endpoint twice, the customer
gets two emails.
The email is not sent when:
- No lab report has arrived yet.
- The profile has no email address, or only a placeholder
@aniva.emailaddress. - The profile has turned off transactional emails. To turn them on again, set
transactional_emails_enabledtotruewith Update Profile. with_reportsistrueand the profile has nodate_of_birth. Set it with Update Profile, or send withwith_reports: false.- The order is one of the demo home kit orders. A demo order has no customer to email.
results_view scope plus the home_kit_orders_view or home_kit_orders_manage scope.
Request
Path parameters
string
required
Unique identifier (UUID) of the home kit order whose results to email.
Body parameters
boolean
required
true attaches the lab reports as password-protected PDF files. false sends only the notice that the results are
ready.string
A personal note that the email shows below the notice. At most 1000 characters.
Response
On success, the API returns200 OK.
string
required
The address the email went to: the
email of the profile.integer
required
The number of lab reports attached.
0 when with_reports is false.string
required
When the email was sent, as a UTC instant (ISO 8601 with
Z suffix).Error responses
An error body haserror, a human-readable message, and reason, a stable code. Validation errors
and a missing results_view scope have no reason.
| Status | Reason | Description |
|---|---|---|
400 | — | Validation error — invalid ID, missing with_reports, or note longer than 1000 characters. |
403 | access_denied | Forbidden — your API key does not have the scopes, or the home kit order is outside your access context. |
404 | not_found | Home kit order not found. |
409 | demo_order | The order is a demo home kit order. It has no customer to email. |
409 | no_reports | No lab report has arrived yet. |
409 | no_email | The profile has no email address. |
409 | placeholder_email | The profile has only a placeholder @aniva.email address. Update the profile with a real email. |
409 | unsubscribed | The profile has turned off transactional emails. Set transactional_emails_enabled to true first. |
409 | no_birthdate | with_reports is true and the profile has no date_of_birth, the PDF password. |
413 | reports_too_large | The reports are too large for one email. Send the email with with_reports: false. |
422 | report_unprotectable | A report is not a PDF, or it could not be password-protected. Send with with_reports: false. |
500 | — | Internal server error. |
502 | report_unavailable | A lab report could not be loaded. No email was sent. |
502 | send_failed | The email provider refused the email. No email was sent. |
curl --request POST \
--url https://anivahealth.com/api/v1/home-kit-orders/d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a/results/email \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"with_reports": true
}'
{
"recipient_email": "maria.schmidt@example.com",
"attachment_count": 1,
"sent_at": "2026-10-15T09:12:44.512Z"
}
{
"error": "No lab report has arrived yet.",
"reason": "no_reports"
}
⌘I
curl --request POST \
--url https://anivahealth.com/api/v1/home-kit-orders/d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a/results/email \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"with_reports": true
}'
{
"recipient_email": "maria.schmidt@example.com",
"attachment_count": 1,
"sent_at": "2026-10-15T09:12:44.512Z"
}
{
"error": "No lab report has arrived yet.",
"reason": "no_reports"
}