---
title: "Send Viber text message(s)"
method: POST
path: "/viber/1/message/text"
tags: ["channels", "viber", "viber-business-messages", "outbound-message"]
deprecated: true
---

# Send Viber text message(s)

`POST /viber/1/message/text`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/viber/1/message/text`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic

> **Deprecated.**

Send one or many text message(s) possibly to multiple recipients.

## Request body

- 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488BulkTextMessage
  - `messages` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488ViberTextMessage[], required: An array of messages being sent.
    - `from` string, required: Registered Viber Sender name.
    - `to` string, required: Message recipient number. Must be in international format and must be internationally reachable (Example: `385977666618`).
    - `messageId` string: The ID that uniquely identifies the message sent.
    - `content` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488TextContent, required: The content object to build a message that will be sent.
      - `text` string, required: Content of the message being sent.
      - `button` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488ButtonWithAction: Button with action.
        - `title` string, required: The text that will appear on the action button.
        - `action` string, required: The URL users are directed to or the action performed when pressing the action button.
    - `callbackData` string: Custom client's data that will be included in Delivery Report.
    - `trackingData` string: Custom client's data that will be passed back with user's reply.
    - `applySessionRate` boolean: Defines if the message should be charged using Viber's session rate if applicable. The session rate is not supported for text messages with buttons.
    - `toPrimaryDeviceOnly` boolean: Defines if the message should be sent only to the end user's [primary device](https://www.infobip.com/docs/viber/business-messages/api) (phone or tablet).
    - `label` 'PROMOTIONAL' | 'TRANSACTIONAL': Indicates character of the content.
    - `smsFailover` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488SmsFailover: SMS message to be sent if the Viber message could not be delivered.
      - `from` string, required: SMS sender number. Must be in international format.
      - `text` string, required: Content of the SMS that will be sent.
      - `validityPeriod` integer: Message failover validity period. Required, if 'validityPeriodTimeUnit' is set. Validity period must be between 30 seconds and 2 days.
      - `validityPeriodTimeUnit` 'SECONDS' | 'MINUTES' | 'HOURS': Message validity period time unit.
    - `notifyUrl` string: The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/viber/receive-viber-delivery-reports), [Seen report format](#channels/viber/receive-viber-seen-reports).
    - `urlOptions` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488UrlOptions: Sets up [URL shortening](https://www.infobip.com/docs/url-shortening) and tracking feature.
      - `shortenUrl` boolean: Enable shortening of the URLs within a message. Set this to `true`, if you want to set up other URL options.
      - `trackClicks` boolean: Enable tracking of short URL clicks within a message: which URL was clicked, how many times, and by whom.
      - `trackingUrl` string: The URL of your callback server on to which the Click report will be sent.
      - `removeProtocol` boolean: Remove a protocol, such as `https://`, from links to shorten a message. Note that some mobiles may not recognize such links as a URL.
      - `customDomain` string: Select a predefined custom domain to use when generating a short URL.
    - `entityId` string: Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
    - `applicationId` string: Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
  - `bulkId` string: The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address.

## Response `200`

Messages accepted for delivery.

- 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488BulkMessageInfo
  - `messages` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488SingleMessageInfo[]: Array of sent message objects, one object per every message.
    - `to` string: The destination address of the message.
    - `messageCount` integer: Number of messages required to deliver.
    - `messageId` string: The ID that uniquely identifies the message sent. If not passed, it will be automatically generated and returned in a response.
    - `status` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488SingleMessageStatus: Indicates the [status](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes) of the message and how to recover from an error should there be any.
      - `groupId` integer: Status group ID.
      - `groupName` string: Status group name.
      - `id` integer: Status ID.
      - `name` string: Status name.
      - `description` string: Human-readable description of the status.
      - `action` string: Action that should be taken to eliminate the error.
  - `bulkId` string: The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address.

## Other responses

- `400`: Bad request.
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
