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

# Send Viber image message

`POST /viber/1/message/image`

## 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/image`
- 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 an image message to a single recipient.

## Request body

- 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488ViberImageMessage
  - `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` 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488ImageContent, required: The content object to build a message that will be sent.
    - `text` string: Text to be displayed alongside the image. It is required when sending a message with a button and an image.
    - `mediaUrl` string, required: URL of the image being sent. Must be a valid URL starting with https:// or http://. Supported image types are .jpg, .jpeg, .png.Recommended resolution: 800 px x 800 px.
    - `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.
  - `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).

## Response `200`

Message accepted for delivery.

- 9389c24e0e9ed01ee6b8f8356a2a69457800d0649274de6f0e7a1954857d6488SingleMessageInfo
  - `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.

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