---
title: "Create Viber template"
method: POST
path: "/viber/1/senders/{sender}/templates"
tags: ["channels", "viber", "viber-business-messages", "viber-template-management"]
---

# Create Viber template

`POST /viber/1/senders/{sender}/templates`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/viber/1/senders/{sender}/templates`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic

Create a new Viber template for a given sender. Templates must be approved by Viber before they can be used for sending messages.

## Path parameters

- `sender` string, required: Sender id.

## Request body

- 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488TemplateRequest: Request to create or register a new Viber message template.
  - `category` 'OTP' | 'TRANSACTIONAL', required: Business category of the template, used for classification and approval routing.
  - `body` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488TemplateBody[], required: List of template bodies per language. Currently limited to one body per template.
    - `language` 'ar' | 'hy' | 'be' | 'bs' | 'bg' | 'my' | 'hr' | 'cs' | 'da' | 'nl' | 'en' | 'fi' | 'fr' | 'ka' | 'de' | 'el' | 'he' | 'hu' | 'id' | 'it' | 'ja' | 'ne' | 'no' | 'fa' | 'pl' | 'ro' | 'ru' | 'sr' | 'sk' | 'sl' | 'es' | 'sv' | 'th' | 'tr' | 'uk' | 'vi' | 'zh-Hans' | 'zh-Hant' | 'pt_BR' | 'pt_PT' | 'fr_FR' | 'es_ES', required: Language code for the template body.
    - `template` string, required: Template message text with optional placeholders for variables (e.g., {{1}}, {{2}}). Maximum 1000 characters. Last word in the template text cannot be a placeholder.
  - `params` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488TemplateParam[]: List of variable parameters used in the template. Maximum 8 parameters allowed. For OTP category, at least one parameter with name '{{pin}}' is required.
    - `type` 'TEXT', required: Type of template parameter.
    - `name` string, required: Name or identifier of the parameter, used to reference it in the template. Must have the same name as the placeholder in the template content.
    - `example` string, required: Example value for the parameter, used for template preview and validation.
  - `name` string: Optional human-readable name for the template to help with identification. Maximum 64 characters, allowed: letters, digits, and spaces.

## Response `201`

Created

- 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488ViberTemplateResponse: Viber message template response containing template details and current status.
  - `templateId` string: Unique identifier of the template.
  - `version` string: Template version number.
  - `sender` string: Sender for which the template is registered.
  - `createdAt` integer: Unix timestamp in milliseconds when the template was created.
  - `category` 'OTP' | 'TRANSACTIONAL': Business category of the template, used for classification and approval routing.
  - `status` 'PENDING' | 'APPROVED' | 'DECLINED': Current approval status of the template in the review process.
  - `lastModified` integer: Unix timestamp in milliseconds when the template was last modified.
  - `params` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488TemplateParam[]: List of variable parameters defined in the template.
    - `type` 'TEXT', required: Type of template parameter.
    - `name` string, required: Name or identifier of the parameter, used to reference it in the template. Must have the same name as the placeholder in the template content.
    - `example` string, required: Example value for the parameter, used for template preview and validation.
  - `body` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488TemplateBody[]: List of template bodies per language containing the actual message text.
    - `language` 'ar' | 'hy' | 'be' | 'bs' | 'bg' | 'my' | 'hr' | 'cs' | 'da' | 'nl' | 'en' | 'fi' | 'fr' | 'ka' | 'de' | 'el' | 'he' | 'hu' | 'id' | 'it' | 'ja' | 'ne' | 'no' | 'fa' | 'pl' | 'ro' | 'ru' | 'sr' | 'sk' | 'sl' | 'es' | 'sv' | 'th' | 'tr' | 'uk' | 'vi' | 'zh-Hans' | 'zh-Hant' | 'pt_BR' | 'pt_PT' | 'fr_FR' | 'es_ES', required: Language code for the template body.
    - `template` string, required: Template message text with optional placeholders for variables (e.g., {{1}}, {{2}}). Maximum 1000 characters. Last word in the template text cannot be a placeholder.
  - `name` string: Optional human-readable name for the template to help with identification.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
