# List the project's email template mappings

Canonical page: https://docs.ovok.com/api/email/list-the-project-s-email-template-mappings

`GET /v1/projects/me/email-templates`

Lists the email template mappings of your current project: for each Ovok template name, which template of your email provider it sends, in which language and for which domain. It also lists the template names the project has no mapping for.

**Auth:** bearer token. The caller must be a Practitioner, a project admin, or hold the System Owner access policy.
**Scope:** the caller's project (from the token).

## Behaviour

- `mappings` holds the project's **own** mappings. Mappings of the parent project and of the platform are not listed.
- `unmapped` holds the template names the project has no mapping for, in any language or domain. It does not say that nothing is sent: a parent project's or the platform's mapping may still apply, and an unmapped patient template (`PATIENT_RESET_PASSWORD`, `PATIENT_ACCOUNT_DELETION`, `PATIENT_ORGANIZATION_CODES`, `PATIENT_INVITE`) is sent as its shared template when the mapping maps that one.
- A mapping applies to a mail in its `language` and for its `domain`. A `null` `language` or `domain` means the mapping names none. Sending tries the most specific context first: domain and language, domain and the project's default language, domain alone, language alone, the default language, then no context. Within one level it takes the project's mapping, then its parent's, then the platform's, so a parent's or the platform's mapping at a more specific level is used before the project's own at a less specific one.
- `ready` is `false` when the project's secrets lack what the provider needs: its credential (`BREVO_API_KEY`, `SENDGRID_API_KEY`, `RESEND_API_KEY` or `SMTP_URL`), and `EMAIL_FROM` for SendGrid and SMTP. It only checks that they are there, not that they work. A mapping that is not ready cannot send; sending moves on to the next mapping that applies.
- One language and domain use one provider. When a project has several ConceptMaps for the same language and domain, only the most recently updated one is read, as sending does.
- Mappings are ordered as the template names are, then by language and domain. Their `html` is left out: `GET /v1/projects/me/email-templates/:name` returns it.

## Example

```bash
curl -X GET 'https://api.sandbox.ovok.com/v1/projects/me/email-templates' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
```
