channels
viber
viber-business-messages
viber-template-management

Create Viber template

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

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)
  • Auth
    • OAuth 2
      Client credentials
      Token URL: https://api.infobip.com/auth/1/oauth2/token
    • or API key in header Authorization
    • or API key in header Authorization
    • or HTTP basic

Path parameters

senderstring required

Sender id.

Request body

category'OTP' | 'TRANSACTIONAL' required

Business category of the template, used for classification and approval routing.

namestring

Optional human-readable name for the template to help with identification. Maximum 64 characters, allowed: letters, digits, and spaces.

Example request

{
  "category": "TRANSACTIONAL",
  "body": [
    {
      "language": "en",
      "template": "Your order {{orderId}} has been confirmed."
    }
  ],
  "params": [
    {
      "type": "TEXT",
      "name": "orderId",
      "example": "ORD-12345"
    }
  ],
  "name": "Account Balance Notification"
}

Response

Created

templateIdstring

Unique identifier of the template.

versionstring

Template version number.

senderstring

Sender for which the template is registered.

createdAtinteger

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.

lastModifiedinteger

Unix timestamp in milliseconds when the template was last modified.

namestring

Optional human-readable name for the template to help with identification.

Example response

{
  "templateId": "00000000-0000-0000-0000-000000000000",
  "version": "1",
  "sender": "CompanyName",
  "createdAt": 1677628800000,
  "category": "TRANSACTIONAL",
  "status": "APPROVED",
  "lastModified": 1677628800000,
  "params": [
    {
      "type": "TEXT",
      "name": "orderId",
      "example": "ORD-12345"
    }
  ],
  "body": [
    {
      "language": "en",
      "template": "Your order {{orderId}} has been confirmed."
    }
  ],
  "name": "Account Balance Notification"
}

Changes

No recorded changes to this operation across all 1 revision of this API.