# Sinch API Templates Create

> Create a new message template via Sinch Template Management API (V2)

- Skill: `sinch/sinch-api-templates-create` (Agent Skill)
- Install (CLI): `npx skillmds@latest add sinch/sinch-api-templates-create`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sinch/sinch-api-templates-create/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: sinch (https://skillmd.com/u/sinch)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/sinch/sinch-api-templates-create

---


# Create Message Template

Create a new omni-channel message template with the Sinch Template Management API V2. Supports text, variables (${key}), and multiple language translations.

**IMPORTANT: Execute this command directly. Do NOT generate script files. Perform the API call immediately.**

## Input

- `--description` / `-d`: Template description - optional
- `--default-language` / `-l`: Default language code (e.g. en-US) - required
- `--text` / `-t`: Template text with optional ${variable} placeholders - required
- `--variables` / `-v`: Comma-separated variable names or JSON with key/preview_value - optional

Arguments: $ARGUMENTS

## Instructions

**Execute these steps directly - do not write code or scripts:**

0. If $ARGUMENTS empty: ask for description, default language, template text, and variable names (if any). Otherwise parse.

1. Validate: --default-language (e.g. en-US), --text (non-empty). Parse --variables into array of {key, preview_value}. Build translations array with one item: language_code, variables, text_message.text.

2. Get CONVERSATION_* env vars. Template API: https://{region}.template.api.sinch.com. If missing, report "Sinch API is not configured."

3. Request body: description, default_translation (default language), translations: [{ language_code, variables: [{key, preview_value}], text_message: { text } }].

4. POST https://{region}.template.api.sinch.com/v2/projects/{projectId}/templates with OAuth2 and JSON body.

5. On success: "✅ Template created" with template id and version. Handle 400 (validation), 401 with clear messages.

6. Handle all errors gracefully.

## Examples

```
/sinch-api-templates-create --default-language=en-US --text="Hello ${name}, your order ${order_id} is ready."
/sinch-api-templates-create -l en-US -t "Hi ${customer_name}!" -v name,customer_name -d "Welcome template"
```

## API Reference

- **Endpoint**: POST /v2/projects/{project_id}/templates
- **Documentation**: https://developers.sinch.com/docs/conversation/templates/

