Change an email provider
- Sandbox: available
- Staging: available
- Production: unknown
Changes an email provider your current project has set up: replaces its secret, the sender address, or both. Each value is stored encrypted and is never returned.
Auth: bearer token of a project admin. The caller must also be a Practitioner, an admin or hold the System Owner access policy. Scope: the caller's project (from the token).
Behaviour
providernames the provider to change. One that is not set up returns 404PROVIDER_NOT_CONFIGURED: set it up withPOST /v1/email/templates/provider.- Send
secret,from, or both. The rules are those ofPOST; a secret the provider does not take returns 422INVALID_SECRET. fromis one sender address for the whole project, so changing it changes it for every provider. It cannot be cleared, only replaced.- When the server has no encryption key, nothing is stored and the answer is 503
ENCRYPTION_UNAVAILABLE. - A 409 means the project changed while the server wrote. Read it again and retry.
- The answer has the project's providers as
GET /v1/email/templates/providerreturns them.
Example
curl -X PATCH 'https://api.sandbox.ovok.com/v1/email/templates/provider' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "provider": "brevo", "secret": "xkeysib-…" }'bearerAuthorizationBearer <JWT>application/json- body
provider*string"brevo""sendgrid""resend""smtp"secret?stringThe API key, or the smtp(s):// URL for SMTP. Never returned.
1 <= length <= 2000from?stringThe sender address, the EMAIL_FROM secret.
emaillength <= 254The providers after the change.
application/json- response
projectId*stringfrom*stringThe sender address, or null when none is set.
providers*array<>curl -X PATCH 'https://api.sandbox.ovok.com/v1/email/templates/provider' \ -H 'Content-Type: application/json' \ -d '{ "provider": "brevo"}'{ "projectId": "string", "from": "string", "providers": [ { "provider": "brevo", "configured": true, "ready": true } ]}Set up an email provider POST
Sets up an email provider for your current project: stores its secret and, optionally, the sender address. Each value is stored encrypted with a key of the project's own and is never returned. **Auth:** bearer token of a project admin. The caller must also be a Practitioner, an admin or hold the System Owner access policy. **Scope:** the caller's project (from the token). ## Behaviour - `provider` is `brevo`, `sendgrid`, `resend` or `smtp`. - `secret` is the provider's credential, up to 2,000 characters: - Brevo: an API key starting with `xkeysib-`. - SendGrid: an API key starting with `SG.`. - Resend: an API key starting with `re_`. - SMTP: a URL `smtp://user:password@host:port` or `smtps://…`, whose host resolves to a public address. Anything else returns 422 `INVALID_SECRET`. The key is not tried against the provider. - `from` is the sender address, one for the whole project. SendGrid and SMTP need it: setting one up when the project has none and `from` is not sent returns 422 `FROM_REQUIRED`. Brevo and Resend send from the template's own sender when there is none. Sending `from` sets it for the whole project, so Resend then sends from it too. - A provider whose secret this server cannot read (stored with another key) counts as not set up, so `POST` replaces it. - A provider that is already set up returns 409 `PROVIDER_CONFIGURED`: change it with `PATCH /v1/email/templates/provider`. - When the server has no encryption key, nothing is stored and the answer is 503 `ENCRYPTION_UNAVAILABLE`. - A 409 without a code means the project changed while the server wrote. Read it again and retry. - The answer is 201, with the project's providers as `GET /v1/email/templates/provider` returns them. ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/v1/email/templates/provider' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "provider": "brevo", "secret": "xkeysib-…", "from": "care@example.com" }' ```
Get application health GET
Returns the health of the Ovok backend and its Redis and FHIR store dependencies, together with build identity. Use it for liveness probes and as the source for a monitor that reads the response body. **Auth:** none. The route needs no bearer token. ## Behaviour - Also served at `/` and `/_health`. - Redis and FHIR store are probed in parallel. Each probe has a 2000 ms limit. A timeout or an error counts as `ok: false` for that dependency. - `ok` is `true` only when both `dependencies.redis.ok` and `dependencies.fhirStore.ok` are `true`. Email is not checked. - The HTTP status is always `200`, even when a dependency is down. Read `ok` and `dependencies` from the body. To get a non-2xx status on failure, use `GET /healthcheck/ready`. - `version`, `buildEnv`, `commitHash` and `buildDate` identify the build and are `null` when the build did not set them. `runningSince` is the process start time. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/healthcheck' ``` ```json { "ok": true, "dependencies": { "redis": { "ok": true }, "fhirStore": { "ok": true } }, "buildEnv": "production", "runningSince": "2026-04-12T17:21:21.410Z" } ```