v1

latestOpenAPI 3.1.02026-07-2414238909.1 KB

Send a Viber Verification Message (OTP)

After authentication, you can make a request to the Viber OTP endpoint to send an OTP.

post/viber/otp

Headers

Authorizationstring required

Bearer {access_token}

Content-Typestring required

application/json

Request body

senderInfoTrackingIdstring required

Unique identifier of the Viber sender (from your sender configuration). Used for routing and tracking

tostring[]

Recipient phone number in E.164 format (e.g. +306912345678). Must include + and country code

ttlinteger

Time-to-live in seconds for the OTP delivery attempt

seqstring

Your own sequence or correlation ID for this request (e.g. for linking request and response or callbacks)

labelstring

Message label. Allowed values: transactional, promotional

typestring

OTP message type. Allowed values: PRIMARY_ONLY, ALL_DEVICE

templateIdstring

ID of the OTP template to use. See Templates inventory

templateLangstring

Language of the template (ISO 639-1, e.g. en, el). See Localization

templateParamsobject

Key-value map of template variables. Keys in camelCase (e.g. pin, businessPlatformName, codeValidityTime). See Template variables validation

Response

200

trackingIdstring
tostring
fromstring
countrystring
applicationNamestring
directionstring
ttlinteger
seqinteger
labelstring
typestring
templateIdstring
templateLangstring

Example response

{
  "trackingId": "b5sdfeae10-ccc3-4ef1-88f7-1f1asdfea6c9",
  "to": "+923248495005",
  "from": "Routee Test 2 way",
  "country": "PK",
  "status": {
    "status": "QUEUED",
    "date": "2025-01-23T13:41:16.254+02:00"
  },
  "applicationName": "default",
  "direction": "Outbound",
  "ttl": 60,
  "seq": 1234,
  "label": "transactional",
  "type": "PRIMARY_ONLY",
  "templateId": "0aac888f-2ee2-4112-9659-1755a951966a",
  "templateParams": {
    "pin": "4523"
  },
  "templateLang": "en"
}