---
title: "Update base viber message"
method: PUT
path: "/api/v1/messages/viber/{id}"
tags: ["Messages"]
---

# Update base viber message

`PUT /api/v1/messages/viber/{id}`

## 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/messages/viber/{id}`
- Auth: HTTP basic

Method is used for updating base viber message. Supports carousel messages with 2-5 items containing images and buttons.

## Path parameters

- `id` integer, required

## Request body

- BaseViberMessage
  - `id` integer: Message ID.
  - `name` string, required: Message name.
  - `languageCode` string: Language code.
  - `tags` string[]: List of tags.
  - `subscriptionsKeys` string[]: Subscription categories keys, assigned to a message.
  - `languages` string[]: An array with the language codes for multilingual messages. Available for the GET method only.
  - `from` string, required: Sender name. Must exist in your account.
  - `transactional` boolean: Transactional messages have lower cost, but can contain only text. Content must be agreed with provider for successful sending. Default - false.
  - `text` string, required: Message text.
  - `img` string: Image URL for message. If set, caption and action must be set too.
  - `caption` string: Button text. If set, img and action must be set too.
  - `action` string: Link assigned to button. If set, img and caption must be set too.
  - `ttlSec` integer: Time to live for message in seconds. Default - 86400 (1 day).
  - `smsFallback` boolean: Enables smsFallback feature: send SMS message instead of Viber, if contact does not have Viber app installed. Default - false.
  - `smsSender` string: SMS sender name for smsFallback feature.
  - `smsContent` string: SMS text for smsFallback feature.
  - `carouselItems` ViberCarouselItem[]: Carousel items (2-5 items). When provided, img/action/caption are ignored.
    - `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
  - `translations` ViberMessage[]: An array with translations to other languages. Available for the GET method only.
    - `id` integer: Message ID.
    - `name` string, required: Message name.
    - `languageCode` string: Language code.
    - `tags` string[]: List of tags.
    - `subscriptionsKeys` string[]: Subscription categories keys, assigned to a message.
    - `languages` string[]: An array with the language codes for multilingual messages. Available for the GET method only.
    - `from` string, required: Sender name. Must exist in your account.
    - `transactional` boolean: Transactional messages have lower cost, but can contain only text. Content must be agreed with provider for successful sending. Default - false.
    - `text` string, required: Message text.
    - `img` string: Image URL for message. If set, caption and action must be set too.
    - `caption` string: Button text. If set, img and action must be set too.
    - `action` string: Link assigned to button. If set, img and caption must be set too.
    - `ttlSec` integer: Time to live for message in seconds. Default - 86400 (1 day).
    - `smsFallback` boolean: Enables smsFallback feature: send SMS message instead of Viber, if contact does not have Viber app installed. Default - false.
    - `smsSender` string: SMS sender name for smsFallback feature.
    - `smsContent` string: SMS text for smsFallback feature.
    - `carouselItems` ViberCarouselItem[]: Carousel items (2-5 items). When provided, img/action/caption are ignored.
      - `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

## Response `200`

## Other responses

- `400`: Bad request:<br><ul><li>Request body is empty.</li></ul><ul><li>Required field is absent: name, from, text.</li></ul><ul><li>Non-existing sender name used in message.</li></ul><ul><li>Used sender does not support specified transactional mode.</li></ul><ul><li>Not applicable field in transactional message: img, caption or action.</li></ul><ul><li>One or two of fields specified: img, caption or action; but not all three.</li></ul>

---

[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)
