---
title: "Send Viber message"
method: POST
path: "/api/v1/message/viber"
tags: ["Messages"]
---

# Send Viber message

`POST /api/v1/message/viber`

The method is used for sending a Viber message to a contact. A new contact is created if no contact with such phone number exists. Supports carousel messages with 2-5 items containing images and buttons.

## Request body

- OutgoingViber
  - `text` string, required — Message text
  - `ttlSeconds` integer — Message lifetime in seconds, the default value is day.
  - `img` string
  - `caption` string
  - `action` string — A clickable link embedded in a picture or in a button.
  - `iosExpirityText` string, required — The notification a Viber user receives when a message is delivered after its lifetime expiration.
  - `phoneNumbers` string[] — The list of the recipient phone numbers. <b>Required parameter</b><br>, if &quot;groupId&quot; is not specified.
  - `tags` string[] — The list of tags to be assigned to a message.
  - `groupId` integer — <b>Required parameter</b><br>. If &quot;phoneNumbers&quot; are not specified.
  - `externalRequestId` string — External request ID. It is the same for all the recipients.
  - `from` string — Sender's name. <b>Required parameter</b><br> if more than one sender is available.
  - `trackUrls` boolean — The parameter determines whether to track links in a message or not. The default value is ‘true’.
  - `carouselItems` ViberCarouselItem[] — Carousel items (2-5 items). When provided, img/action/caption are used only for SMS fallback.
    - `img` string, required — Image URL (png, jpeg). HTTPS recommended.
    - `title` string, required — Short card title
    - `primaryCaption` string, required — Primary button name
    - `primaryAction` string, required — Primary button link
    - `secondaryCaption` string — Secondary button name
    - `secondaryAction` string — Secondary button link
  - `subscriptionsKeys` string[]

## Response `200`

---

[API](https://skmtc.net/esputnik/apis/esputnik-com.md) · [All operations](https://skmtc.net/esputnik/apis/esputnik-com/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esputnik/esputnik-com/versions/1c4afd7ba72a/schema)
