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

# Send Viber message

`POST /api/v1/message/viber`

## Request

- Base URL: `https://yespo.io` (the document declares no server; this is the origin it was published from)
- URL: `https://yespo.io/api/v1/message/viber`
- Auth: HTTP basic

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.
  - `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.dev/yespo/apis/yespo-api.md) · [All operations](https://skmtc.dev/yespo/apis/yespo-api/llms.txt) · [OpenAPI document](https://skmtc.dev/yespo/apis/yespo-api/revisions/b662f92b6c40?raw)
