# Email organization codes

Canonical page: https://docs.ovok.com/api/organization-code-information/email-organization-codes

`POST /organizations/code/email`

Emails a user the tenant codes of every organization (project) they have an account in. Use it on a sign-in screen for users who forgot their organization code.

**Auth:** none.

## Behaviour

- The route always answers 202 with no body and does the work in the background, so the answer does not tell you whether the email has an account.
- The background job finds every account with this email, then looks up the tenant code of each project. If there are no accounts or no codes, no email is sent.
- The email lists each project's name and code. It uses the `PATIENT_ORGANIZATION_CODES` template when the first account found is a Patient, and `OVOK_ORGANIZATION_CODES` otherwise. Language and domain come from the request.
- The email address is lowercased.

## Example

```bash
curl -X POST 'https://api.sandbox.ovok.com/organizations/code/email' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "max.mustermann@example.com"
  }'
```
