convoup Docs
Docs / Core Concepts / Language Support

Language Support

Templates can be created in multiple languages. The SDK defaults to en_US.

Specifying Language

Pass a language parameter to override the default:

// English (default)
await client.sendOtp({
  to: '+918851479441',
  template: 'test_welcome_template',
  code: '123456',
});

// Hindi
await client.sendOtp({
  to: '+918851479441',
  template: 'test_welcome_template',
  code: '123456',
  language: 'hi_IN',
});

// Tamil
await client.sendReminder({
  to: '+918851479441',
  template: 'test_welcome_template',
  params: ['Kumar', 'Jul 20'],
  language: 'ta_IN',
});
curl -X POST https://api.convoup.com/api/v1/templates \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "to": "+918851479441",
    "template_name": "test_welcome_template",
    "language": "hi_IN",
    "body_params": [{"type": "text", "text": "123456"}]
  }'

Common Language Codes

LanguageCode
English (US)en_US
English (India)en_IN
Hindihi_IN
Tamilta_IN
Telugute_IN
Bengalibn_IN
Marathimr_IN
Kannadakn_IN
Malayalamml_IN
Gujaratigu_IN

Per-Language Templates

Each language variant requires a separate template approved by Meta. Create language-specific templates in the Convoup dashboard under Templates > Create Template.

For example, to support English and Hindi OTP messages:

  1. Create otp_english with body Your OTP is {{1}}
  2. Create otp_hindi with body आपका OTP {{1}} है
  3. Submit both for Meta approval
  4. Send using the appropriate language parameter

Fallback Behavior

If you send a message with a language code that doesn't have an approved template, the API returns a TEMPLATE_NOT_FOUND error. There is no automatic fallback to another language.

Common Mistake
Sending with language: 'hi_IN' when you only have an en_US template will return TEMPLATE_NOT_FOUND. Create the language-specific template first.

Next Steps