AI Translation

Translate text

  • Sandbox: available
  • Staging: available
  • Production: unknown
POST
/ai/translation

Translates a list of strings from one language to another with an LLM. Use it to draft translations for content and localization keys.

Auth: bearer token. Scope: the caller's project (from the token). The project's settings can add instructions to the translation prompt.

Behaviour

  • sourceLanguage and targetLanguage take a language code such as en or de-DE, or a language name. Each is 2 to 100 characters.
  • text holds 1 or more strings. Each string and all strings together are limited to 10,000 characters.
  • Strings can be plain text, HTML or Markdown, and can contain placeholders such as {{name}}. Markup and placeholders are meant to be kept as they are, but the output comes from an LLM, so check it before you publish it.
  • The response returns the translations in text, in the same order as the input.
  • If the project has a setting named TRANSLATION_ADDITIONAL_PROMPT, its value is added to the prompt for every translation in that project.
  • Nothing is stored. The route only returns the translation.

Example

curl -X POST 'https://api.sandbox.ovok.com/ai/translation' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \  -H 'Content-Type: application/json' \  -d '{    "sourceLanguage": "en",    "targetLanguage": "de",    "text": ["Hello {{name}}, how are you?", "<p>Your appointment is <b>today</b>.</p>"]  }'

Request Body

application/json
  1. body
sourceLanguage*string
Length2 <= length <= 100
targetLanguage*string
Length2 <= length <= 100
text*array<>
Items1 <= items

Response Body

The translated strings, in the same order as the input.

application/json
  1. response
sourceLanguage*string
Length2 <= length <= 100
targetLanguage*string
Length2 <= length <= 100
text*array<>
Items1 <= items
Example Request
curl -X POST 'https://api.sandbox.ovok.com/ai/translation' \  -H 'Content-Type: application/json' \  -d '{  "sourceLanguage": "string",  "targetLanguage": "string",  "text": [    "string"  ]}'
Example Response
{  "sourceLanguage": "string",  "targetLanguage": "string",  "text": [    "string"  ]}

Fetch data of existing accounts GET

Lists the email addresses of every account in the caller's project. Use it to build a participant picker, for example for a video call. **Auth:** bearer token. The caller must be a Practitioner, a project admin or a super admin, or hold an access policy named "System Owner". Other callers get 403. **Scope:** the project of the token. ## Behaviour - Every project membership with a Patient or Practitioner profile and a User is included. Accounts whose User has no email are left out. - The handler returns only the `email` of each account. - The list is not paginated and has no defined sort order. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/accounts' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```

Change user password PATCH

Changes the password of the signed-in user. Use it from an account settings screen where the user knows their current password. **Auth:** bearer token. **Scope:** the User of the token. ## Behaviour - `oldPassword` must match the current password. A wrong `oldPassword`, or an account with no password set, gives 401. - The new password may equal the old one. - The password must have at least 12 characters, not counting spaces at either end, and must not be on Ovok's list of common and breached passwords. Any character is allowed and none is required. A refused password answers 422 with the error on `newPassword`. - The route does not end existing sessions. - The email address is not marked as verified by this route. - The response is the updated `User` without its password hash. ## Example ```bash curl -X PATCH 'https://api.sandbox.ovok.com/v2/auth/change-password' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "oldPassword": "Ex4mple-Passw0rd", "newPassword": "a-new-password" }' ```