# Template catalogue and parameters

Canonical page: https://docs.ovok.com/email-templates/template-catalogue

These are the names you map. Each one is a message Ovok sends, with a fixed set of **parameters** that your template can use. `GET /v1/email/templates` returns the same list as JSON, with an example of every parameter set.

## Messages [#messages]

| Template | Receives it | Sent when |
| --- | --- | --- |
| `INVITE_TO_PROJECT` | Practitioner | A project admin is [invited to the project](/invitations/team-members). |
| `RESET_PASSWORD` | Practitioner | A password reset is requested. |
| `PATIENT_RESET_PASSWORD` | Patient, carer | A patient or a [carer](/authentication/carers) requests a password reset. |
| `PATIENT_WELCOME` | Patient | A patient account is created, by [registration](/authentication/patient-registration) or a first Apple or Google sign-in. **Nothing is sent unless it is mapped.** |
| `CLINICIAN_SIGNUP_INVITE` | Practitioner | A work-email registration becomes a practitioner invitation: [business-email sign-up](/settings-and-features/settings/clinician-invite-on-business-email). |
| `PATIENT_INVITE` | Patient | A practitioner [invites a new patient](/invitations/invite-a-patient). Carries a set-password link. |
| `PATIENT_ASSIGNMENT_REQUEST` | Patient | A practitioner invites a patient who already has an account. Carries an accept link. |
| `PRACTITIONER_INVITED_BY_PATIENT` | Practitioner | A patient [shares their record](/invitations/share-with-practitioner) with a new address. Carries a set-password link. |
| `PRACTITIONER_PATIENT_SHARED` | Practitioner | A patient shares their record with an existing practitioner. Carries an accept link. |
| `RELATED_PERSON_INVITED` | Carer | A patient [shares readings with a carer](/invitations/share-with-a-carer) at a new address. Carries an accept link where the carer chooses a password. |
| `RELATED_PERSON_RECORD_SHARED` | Carer | A patient shares readings with an existing carer. Carries an accept link. |
| `PRACTITIONER_ALERT_DIGEST` | Practitioner | Every few hours while the clinician alert digest is on: each shared patient with new Signals alerts, a count and a link. No reading or value. |
| `ALERT_NOTIFICATION` | Practitioner | Your [rule](/signals/with-ovok/routing-rules) names them for a Signals alert event, with [Omni-channel alerts](/signals/with-ovok/omni-channel-alerts) on. Carries `firstName`, `lastName`, `patientName`, `alertedAt`, `event` and `alertsUrl`; no reading or value. |
| `PATIENT_ALERT_NOTIFICATION` | Carer, patient | The same, for related persons and the people the patient shares with. Unmapped, it goes out as `ALERT_NOTIFICATION`. |
| `VIDEO_CALL_APPOINTMENT_INVITE` | Patient | A video-call appointment is created. Carries a TAN. |
| `VIDEO_CALL_APPOINTMENT_UPDATE` | Patient | A video-call appointment changes. Carries a TAN. |
| `VIDEO_CALL_APPOINTMENT_CANCEL` | Patient | A video-call appointment is cancelled. |
| `ACCOUNT_DELETION` | Practitioner | An account is scheduled for deletion, or deleted; the `deleted` parameter says which. |
| `PATIENT_ACCOUNT_DELETION` | Patient | The same for a patient's account. |
| `ACCOUNT_DELETION_IMMEDIATE` | Practitioner | A dashboard user's account is deleted immediately. |
| `OVOK_ORGANIZATION_CODES` | Practitioner | Someone asks for the tenant codes of their organizations and the first account found is not a patient. |
| `PATIENT_ORGANIZATION_CODES` | Patient | The same, when the first account found is a patient. |
| `TRENDS_PDF_EXPORT` | Practitioner | A trends PDF export is emailed from the care dashboard. |
| `CUSTOMER_SUPPORT_EMAIL` | Ovok support | A user sends a support message from the dashboard. |
| `OVOK_WELCOME_TO_OVOK` | Practitioner | The Ovok dashboard welcome message. |
| `OVOK_FREE_TRIAL_EXPIRES_IN_3_DAYS` | Practitioner | A free trial ends in three days. |
| `OVOK_FREE_TRIAL_ENDED` | Practitioner | A free trial has ended. |

The `OVOK_` messages belong to the Ovok dashboard. They can be customised like any other.

### Patient variants [#patient-variants]

Four patient messages fall back to the shared practitioner template when a mapping does not map them, so nothing breaks while you roll out patient wording. The parameters are the same either way.

| Patient template | Sent as, when it is not mapped |
| --- | --- |
| `PATIENT_RESET_PASSWORD` | `RESET_PASSWORD` |
| `PATIENT_ACCOUNT_DELETION` | `ACCOUNT_DELETION` |
| `PATIENT_ORGANIZATION_CODES` | `OVOK_ORGANIZATION_CODES` |
| `PATIENT_INVITE` | `INVITE_TO_PROJECT` |

The two carer messages fall back the same way, to patient templates. A mapping that maps neither carer template sends `PATIENT_INVITE` for `RELATED_PERSON_INVITED` and `PATIENT_ASSIGNMENT_REQUEST` for `RELATED_PERSON_RECORD_SHARED`, with `inviterName` set to the patient's name.

## Parameters [#parameters]

Every message carries three **common parameters**. They are always sent, and each is `null` when Ovok has nothing to put there:

| Parameter | Value |
| --- | --- |
| `baseUrl` | The app URL of the audience: the patient app for a patient message, the practitioner dashboard for a practitioner message. `null` when none is configured. Set [`PATIENT_APP_URL`](/settings-and-features/settings/patient-app-url) and [`PRACTITIONER_APP_URL`](/settings-and-features/settings/practitioner-app-url). |
| `projectName` | The name of the project. |
| `tenantCode` | The project's tenant code. |

The rest are per message. A parameter ending in `?` can be `null`.

| Template | Parameters |
| --- | --- |
| `INVITE_TO_PROJECT`, `PATIENT_INVITE`, `PATIENT_ASSIGNMENT_REQUEST` | `firstName`, `lastName`, `inviterName`, `invitationUrl` |
| `PRACTITIONER_INVITED_BY_PATIENT`, `PRACTITIONER_PATIENT_SHARED` | `firstName`, `lastName`, `patientName`, `invitationUrl` |
| `RELATED_PERSON_INVITED`, `RELATED_PERSON_RECORD_SHARED` | `firstName`, `lastName`, `sharerName`, `inviterName`, `invitationUrl` |
| `CLINICIAN_SIGNUP_INVITE` | `firstName`, `lastName`, `invitationUrl`, `continueAsPatientUrl` |
| `RESET_PASSWORD`, `PATIENT_RESET_PASSWORD` | `firstName`, `lastName`, `resetPasswordUrl?`, `userSecurityRequestId`, `userSecurityRequestSecret` |
| `PATIENT_WELCOME`, `OVOK_WELCOME_TO_OVOK`, `ACCOUNT_DELETION_IMMEDIATE` | `firstName` |
| `ACCOUNT_DELETION`, `PATIENT_ACCOUNT_DELETION` | `firstName`, `days`, `wipe`, `deleted` |
| `OVOK_FREE_TRIAL_ENDED`, `OVOK_FREE_TRIAL_EXPIRES_IN_3_DAYS` | `firstName`, `lastName` |
| `OVOK_ORGANIZATION_CODES`, `PATIENT_ORGANIZATION_CODES` | `firstName`, `organizations` (a list of `name` and `code`) |
| `VIDEO_CALL_APPOINTMENT_INVITE`, `VIDEO_CALL_APPOINTMENT_UPDATE` | `comment`, `practitionerName`, `startDateCET`, `startTimeCET`, `endDateCET`, `endTimeCET`, `dashboardUrl`, `tan`, `tanExpirationDateCET`, `tanExpirationTimeCET` |
| `VIDEO_CALL_APPOINTMENT_CANCEL` | `comment`, `practitionerName`, `startDateCET`, `startTimeCET`, `endDateCET`, `endTimeCET`, `dashboardUrl` |
| `TRENDS_PDF_EXPORT` | `authorName`, `patientName`, `startDate`, `endDate`, `practitionerName` |
| `CUSTOMER_SUPPORT_EMAIL` | `message`, `username`, `email`, `project`, `role`, `accessPolicy`, `version`, `environment` |

The invitation links in these messages point at **your** app: a set-password link is `<app URL>/setpassword/<id>/<secret>` and an accept link is `<app URL>/accept-invite?invite=<id>&code=<code>`. See [Invitations](/invitations#emails-and-the-links-in-them).

Invitation set-password links work for 7 days after they are sent; password-reset links do not expire. See [the shared invitation-link rule](/invitations#limits-and-shared-behaviour).

> **A send whose parameters do not match is refused.** Ovok checks the parameters against this list before anything goes out, and a message that fails is not sent.

## Writing a parameter [#writing-a-parameter]

Each provider writes a parameter its own way. The table shows `firstName`:

| Provider | Syntax |
| --- | --- |
| SendGrid | `{{firstName}}` |
| Brevo | `{{ params.firstName }}` |
| Resend | `{{{firstName}}}` |
| SMTP | `{{firstName}}` |

- **SMTP** templates use Handlebars. `{{x}}` is HTML-escaped, except in the subject, which is plain text. The templates are strict: a parameter the message does not have fails the render instead of printing blank.
- **Resend** accepts text and numbers only. A list parameter `x` arrives as `xList`, one item per line, and a `null` arrives as an empty string. Resend reserves the names `FIRST_NAME`, `LAST_NAME`, `EMAIL`, `UNSUBSCRIBE_URL`, `contact` and `this`, and allows 50 variables per template.

## Related [#related]

- [Email templates](/email-templates)
- [Map templates with the API](/email-templates/map-templates)
