List Message Templates
List all omni-channel message templates for your project using the Sinch Template Management API V2. Templates can have multiple translations and variables.
IMPORTANT: Execute this command directly. Do NOT generate script files. Perform the API call immediately.
Input
--format/-f: Output format (table or json) - optional, default table
Arguments: $ARGUMENTS
Instructions
Execute these steps directly - do not write code or scripts:
If $ARGUMENTS empty: use default format (table). Otherwise parse --format.
Validate: --format (table|json). Get CONVERSATION_* env vars. Template API base: https://{region}.template.api.sinch.com (us, eu, br). If missing, report "Sinch API is not configured."
GET https://{region}.template.api.sinch.com/v2/projects/{projectId}/templates with OAuth2 Bearer token.
Format response: table (id, description, default_translation, version, translation count) or raw JSON. Display "✅ Templates listed" with count.
Handle errors (401, 404) with clear messages. Handle all errors gracefully.
Examples
/sinch-api-templates-list
/sinch-api-templates-list --format=json
API Reference
- Base URL: https://{region}.template.api.sinch.com (V2 only; V1 end-of-life)
- Endpoint: GET /v2/projects/{project_id}/templates
- Documentation: https://developers.sinch.com/docs/conversation/templates/