Get example email template params
- Sandbox: available
- Staging: available
- Production: unknown
Returns one example set of params for every email template, keyed by template name. Use it to preview what a template receives. For the types, nullability and audience of each param, use GET /v1/email/templates instead.
Auth: bearer token. Any signed-in user can call it. The response is the same for every project.
Behaviour
- The response is an object with one key per template name. Each value is an example of the params that template receives when it is sent.
- The values are fixed sample data, not data from your project.
Example
curl -X GET 'https://api.sandbox.ovok.com/email/templates' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'Example params for every template, keyed by template name.
application/json- response
[key: string]?curl -X GET 'https://api.sandbox.ovok.com/email/templates'{ "property1": { "property1": null, "property2": null }, "property2": { "property1": null, "property2": null }}Delete a document DELETE
Deletes a document and its stored file. This cannot be undone. **Auth:** bearer token. The document is read and deleted with your token, so you need read and delete access to the DocumentReference. ## Behaviour - The stored file is deleted first, then the DocumentReference. - If deleting the stored file fails, the DocumentReference is still deleted. - Public links to the document stop working. ## Example ```bash curl -X DELETE 'https://api.sandbox.ovok.com/document/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ``` ```json { "message": "Document deleted successfully" } ```
List email templates and their params GET
Lists every email template a project can map in its email ConceptMap, with the params each one receives. Use it when you write or review a template. **Auth:** bearer token. The caller must be a Practitioner, an admin or a super admin, or hold the "System Owner" access policy. **Scope:** none. The list is the same for every project. ## Behaviour - Each entry has the template `name`, the `audience` (`patient` or `practitioner`), the `params`, a full `example`, and the `syntax` each provider uses to reference a param. - `audience` tells you whose app the `baseUrl` param points at: the patient app or the practitioner dashboard. - Every listed param is always sent. A param marked `nullable` is `null` when there is no value. - A send whose params do not match its template is refused, so a template can rely on every param listed. - Resend accepts text and numbers only. A list param `x` reaches Resend as `xList`, with one item per line, and a null reaches it as an empty string. - Entries follow the order of the `TemplateNames` enum. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/email/templates' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```