Skip to main content
flag
Mon - Fri   10:00 – 18:00

TTS Templates

Base URL for your account: https://cpaas.studio

GET POST /api/voice/v1/tts/templates

Lists your account's text-to-speech templates — the ids and variables you send to Voice Broadcast with Text to Speech in template mode. Templates are created in the web app (Voice › Text To Speech › Templates) and approved by the platform before use; only approved templates can be sent.

Parameters

Param Type Required Notes
id string no One template by its id (e.g. TPL7K2M9QX4WQ). Unknown → TTS_TEMPLATE_NOT_FOUND.
status string no approved, pending or rejected.

Request example

curl "https://cpaas.studio/api/voice/v1/tts/templates?status=approved" \
  -H "X-API-KEY: cpk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Success response (data)

[
    {
        "id": "TPL7K2M9QX4WQ",
        "name": "Bill reminder",
        "language": "en",
        "text": "Dear {customer_name}, your bill of {amount} rupees is due.",
        "variables": [
            "customer_name",
            "amount"
        ],
        "status": "approved",
        "updated_at": "2026-10-05T09:00:00+00:00"
    }
]

Errors

Code Status When
TTS_TEMPLATE_NOT_FOUND 404 id doesn't match any template on your account.
REQ_VALIDATION_FAILED 422 status is not approved, pending or rejected.

Notes

  • Your account only. A template that is edited goes back to pending and cannot be sent until it is approved again.

Need more context? See Getting started for authentication, the response envelope, and the full error-code reference.