# Create an English enrollment prompt
curl -X POST https://api.voxmind.ai/organisations/42/predefined-texts \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"org_id": 42,
"language": "en-UK",
"text_code": 1,
"text": "Please say your full name to register your voice."
}'
# Create prompts for multiple languages
prompts = [
{"language": "en-UK", "text_code": 1, "text": "Please say your full name to register your voice."},
{"language": "fr-FR", "text_code": 1, "text": "Veuillez dire votre nom complet pour enregistrer votre voix."},
{"language": "de-DE", "text_code": 1, "text": "Bitte sagen Sie Ihren vollständigen Namen, um Ihre Stimme zu registrieren."},
]
for prompt in prompts:
resp = requests.post(
"https://api.voxmind.ai/organisations/42/predefined-texts",
headers={"Authorization": "Bearer YOUR_API_TOKEN"},
json={"org_id": 42, **prompt},
)
print(resp.status_code, resp.json())
{
"id": 23,
"org_id": 42,
"language": "en-UK",
"text_code": 1,
"text": "Please say your full name to register your voice.",
"created_at": "2025-03-15T10:00:00Z",
"updated_at": "2025-03-15T10:00:00Z"
}
{
"code": 409,
"message": "A predefined text with language 'en-UK' and text_code 1 already exists for this organisation"
}
Devices & Texts
Create Predefined Text
Create a custom voice prompt for a specific language and text code.
POST
/
organisations
/
{orgId}
/
predefined-texts
# Create an English enrollment prompt
curl -X POST https://api.voxmind.ai/organisations/42/predefined-texts \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"org_id": 42,
"language": "en-UK",
"text_code": 1,
"text": "Please say your full name to register your voice."
}'
# Create prompts for multiple languages
prompts = [
{"language": "en-UK", "text_code": 1, "text": "Please say your full name to register your voice."},
{"language": "fr-FR", "text_code": 1, "text": "Veuillez dire votre nom complet pour enregistrer votre voix."},
{"language": "de-DE", "text_code": 1, "text": "Bitte sagen Sie Ihren vollständigen Namen, um Ihre Stimme zu registrieren."},
]
for prompt in prompts:
resp = requests.post(
"https://api.voxmind.ai/organisations/42/predefined-texts",
headers={"Authorization": "Bearer YOUR_API_TOKEN"},
json={"org_id": 42, **prompt},
)
print(resp.status_code, resp.json())
{
"id": 23,
"org_id": 42,
"language": "en-UK",
"text_code": 1,
"text": "Please say your full name to register your voice.",
"created_at": "2025-03-15T10:00:00Z",
"updated_at": "2025-03-15T10:00:00Z"
}
{
"code": 409,
"message": "A predefined text with language 'en-UK' and text_code 1 already exists for this organisation"
}
Overview
Creates a new predefined text for your organisation. Each text is uniquely identified by the combination oflanguage and text_code — you cannot have two texts with the same language and text_code pair. If you want to update an existing text, use the Update Predefined Text endpoint instead.
Path Parameters
string
required
Your organisation’s unique identifier.
Request Body
integer
required
Your organisation’s numeric ID. Must match the
orgId path parameter.string
required
The language of this text, in
[ISO 639-1]-[ISO 3166-1 alpha-2] format. Example: en-UK, fr-FR. See Language Support for the full list.integer
required
An integer you define to categorise this text. Use a consistent convention across your organisation — for example,
1 = enrollment prompt, 2 = verification prompt, 3 = failure message. The values themselves are arbitrary; the meaning is defined by your implementation.string
required
The actual text content — the prompt or instruction displayed or spoken to users. There is no hard character limit but keep prompts concise (under 200 characters) to avoid user friction.
# Create an English enrollment prompt
curl -X POST https://api.voxmind.ai/organisations/42/predefined-texts \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"org_id": 42,
"language": "en-UK",
"text_code": 1,
"text": "Please say your full name to register your voice."
}'
# Create prompts for multiple languages
prompts = [
{"language": "en-UK", "text_code": 1, "text": "Please say your full name to register your voice."},
{"language": "fr-FR", "text_code": 1, "text": "Veuillez dire votre nom complet pour enregistrer votre voix."},
{"language": "de-DE", "text_code": 1, "text": "Bitte sagen Sie Ihren vollständigen Namen, um Ihre Stimme zu registrieren."},
]
for prompt in prompts:
resp = requests.post(
"https://api.voxmind.ai/organisations/42/predefined-texts",
headers={"Authorization": "Bearer YOUR_API_TOKEN"},
json={"org_id": 42, **prompt},
)
print(resp.status_code, resp.json())
{
"id": 23,
"org_id": 42,
"language": "en-UK",
"text_code": 1,
"text": "Please say your full name to register your voice.",
"created_at": "2025-03-15T10:00:00Z",
"updated_at": "2025-03-15T10:00:00Z"
}
{
"code": 409,
"message": "A predefined text with language 'en-UK' and text_code 1 already exists for this organisation"
}

