Skip to main content

List Viber Templates

Retrieve the accepted Viber Business Messages templates registered on the Viber channel connection your API key belongs to.

Written by Tarek Khalil

Endpoint

GET https://app.octopods.io/api/v1/vbm/templates

Returns every accepted template on the channel, without pagination. A detail endpoint is also available for a single template:

GET https://app.octopods.io/api/v1/vbm/templates/:template_id

Only templates in Accepted state are returned.

Authentication

Include your Channel API Key in the request header:

X-Octopods-Auth: YOUR_CHANNEL_API_KEY

Query parameters

All filters are optional. If multiple are supplied, they’re combined with AND.

  • activetrue or false. Filters to templates that are currently active or inactive inside Octopods.

  • lang — filter by language code. Accepts either a broad code (en, zh, pt, es) or a specific regional code (en_US, en_GB, zh_CN, pt_BR, and so on). Broad codes expand to match every regional variant: en matches en, en_GB, and en_US; zh matches zh_CN, zh_HK, and zh_TW; pt matches pt_BR and pt_PT; es matches es, es_AR, es_ES, and es_MX.

Example request

GET https://app.octopods.io/api/v1/vbm/templates?active=true&lang=en
X-Octopods-Auth: YOUR_CHANNEL_API_KEY

Success response (list)

On success the API returns HTTP 200 OK with a JSON array:

[
  {
    "created_at": "2026-02-10T15:42:00Z",
    "template_id": 60214,
    "template_name": "shipping_confirmation",
    "template_body": "Hi {{1}}, your order {{2}} has shipped and should arrive by {{3}}.",
    "template_components": [
      { "type": "BODY", "text": "Hi {{1}}, your order {{2}} has shipped and should arrive by {{3}}." }
    ],
    "account_phone_number": "+15551234567"
  },
  {
    "created_at": "2026-01-05T09:12:00Z",
    "template_id": 60198,
    "template_name": "appointment_reminder",
    "template_body": "Hi {{1}}, reminder: your appointment is on {{2}} at {{3}}.",
    "template_components": [
      { "type": "BODY", "text": "Hi {{1}}, reminder: your appointment is on {{2}} at {{3}}." }
    ],
    "account_phone_number": "+15551234567"
  }
]

Response fields

  • template_id — the value to use as :template_id when sending.

  • template_name — human-readable identifier for the template.

  • template_body — the body text with {{N}} placeholders.

  • template_components — the template’s full component list. Use this to determine how many placeholders each section needs and whether the header is text or media.

  • account_phone_number — the Viber sender number associated with this template.

Success response (single template)

The detail endpoint returns a single object with the same fields:

GET https://app.octopods.io/api/v1/vbm/templates/60214

{
  "created_at": "2026-02-10T15:42:00Z",
  "template_id": 60214,
  "template_name": "shipping_confirmation",
  "template_body": "Hi {{1}}, your order {{2}} has shipped and should arrive by {{3}}.",
  "template_components": [...],
  "account_phone_number": "+15551234567"
}

Requesting a template that does not exist for this channel returns error code 3 (TEMPLATE_NOT_EXIST).

Error codes

Code

Name

When it happens

1

ARGUMENT_MISSING

:template_id was omitted from the detail endpoint URL.

3

TEMPLATE_NOT_EXIST

No accepted template matches :template_id on the detail endpoint.

6

DEPRECATED_API_KEY

The API key has been rotated or revoked.

When to call the list endpoint

  • At startup. Cache the list of accepted templates and their component shapes so your integration knows which IDs are safe to send.

  • After template changes. Re-fetch whenever you register, edit, or delete a template so your cache reflects the latest state.


What’s next

Did this answer your question?