# Send message

## Send Viber Message

> Send a Viber message. Supports Text, Image, Video, and File types, with optional buttons.\
> \
> \### Message Types & Pricing\
> \* \*\*Transactional\*\*: Only text messages without any buttons, images, or videos.\
> \* \*\*Promotional\*\*: Any message containing buttons, images, videos, or files. These are charged at promotional rates.\
> \
> \### Supported Combinations\
> \* \*\*Text Only\*\*: A simple text message.\
> \* \*\*Text + Button\*\*: A text message with a CTA button.\
> \* \*\*Image Only\*\*: An image without any caption.\
> \* \*\*Image + Text\*\*: An image with a text caption.\
> \* \*\*Image + Button\*\*: An image with a CTA button.\
> \* \*\*Image + Text + Button\*\*: A rich card with image, caption, and button.\
> \* \*\*Video Only\*\*: A video without any caption.\
> \* \*\*Video + Text\*\*: A video with a text caption.\
> \* \*\*Video + Button\*\*: A video with a CTA button.\
> \* \*\*Video + Text + Button\*\*: A rich card with video, caption, and button.\
> \* \*\*File Only\*\*: A document file.\
> \
> \### Callbacks\
> The API sends webhook events to the configured \`callback\_url\`.\
> \
> \#### Payload Example\
> \`\`\`json\
> {\
> &#x20; "error": "000",\
> &#x20; "message\_id": "8bd71f49-6f42-4729-bf5e-ecf857747633",\
> &#x20; "status": "DELIVERED",\
> &#x20; "to": "16197012345",\
> &#x20; "type": "DLR"\
> }\
> \`\`\`\
> \
> \#### Field Details\
> \* \*\*type\*\*:\
> &#x20; \* \`DLR\`: Delivery Report (e.g., status is \`DELIVERED\` or \`SEEN\`).\
> &#x20; \* \`MO\`: Incoming Message (status is \`RECEIVED\`).\
> \* \*\*text\*\*: The content of the incoming message (only present when \`type\` is \`MO\`).\
> \
> \> \*\*Note\*\*: Read receipts (\`SEEN\` status) are only sent if the user has enabled them in their Viber settings.<br>

````json
{"openapi":"3.0.0","info":{"title":"Bind Viber API (v1.0) - official","version":"1.0.0"},"servers":[{"url":"https://messaging-api.bind.hr"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"ViberTextMessage":{"allOf":[{"$ref":"#/components/schemas/ViberBaseMessage"},{"type":"object","properties":{"text":{"type":"string"},"button":{"$ref":"#/components/schemas/ButtonObject"}},"required":["text"]}]},"ViberBaseMessage":{"type":"object","properties":{"destination":{"type":"string","description":"Destination phone number"},"ttl":{"type":"integer","description":"Time in seconds after which the message will be considered undelivered. Minimum 60 seconds.","default":60},"callback_url":{"type":"string","format":"uri","description":"Webhook URL for status updates"}},"required":["destination"]},"ButtonObject":{"type":"object","properties":{"caption":{"type":"string"},"action":{"type":"string"}}},"ViberImageMessage":{"allOf":[{"$ref":"#/components/schemas/ViberBaseMessage"},{"type":"object","properties":{"text":{"type":"string"},"mediaUrl":{"type":"string","format":"uri"},"button":{"$ref":"#/components/schemas/ButtonObject"}},"required":["mediaUrl"]}]},"ViberVideoMessage":{"allOf":[{"$ref":"#/components/schemas/ViberBaseMessage"},{"type":"object","properties":{"video":{"$ref":"#/components/schemas/VideoObject"},"text":{"type":"string"},"button":{"$ref":"#/components/schemas/ButtonObject"}},"required":["video"]}]},"VideoObject":{"type":"object","properties":{"mediaUrl":{"type":"string","format":"uri"},"thumbnail":{"type":"string","format":"uri"}}},"ViberFileMessage":{"allOf":[{"$ref":"#/components/schemas/ViberBaseMessage"},{"type":"object","properties":{"file":{"$ref":"#/components/schemas/FileObject"}},"required":["file"]}]},"FileObject":{"type":"object","properties":{"mediaUrl":{"type":"string","format":"uri"},"fileName":{"type":"string"}}}},"responses":{"SuccessResponse":{"description":"200","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string"},"request_id":{"type":"string"},"error_message":{"type":"string"}}},{"title":"Rejected","type":"object","properties":{"status":{"type":"string"},"request_id":{"type":"string"},"error_message":{"type":"string"}}}]}}}},"BadRequest":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"property":{"type":"string"},"error":{"type":"string"}}}}}}}}},"Unauthorized":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"error_message":{"type":"string"}}}}}},"TooManyRequests":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error_message":{"type":"string"}}}}}},"InternalServerError":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"error_message":{"type":"string"}}}}}}}},"paths":{"/v1.0/viber/send":{"post":{"summary":"Send Viber Message","description":"Send a Viber message. Supports Text, Image, Video, and File types, with optional buttons.\n\n### Message Types & Pricing\n* **Transactional**: Only text messages without any buttons, images, or videos.\n* **Promotional**: Any message containing buttons, images, videos, or files. These are charged at promotional rates.\n\n### Supported Combinations\n* **Text Only**: A simple text message.\n* **Text + Button**: A text message with a CTA button.\n* **Image Only**: An image without any caption.\n* **Image + Text**: An image with a text caption.\n* **Image + Button**: An image with a CTA button.\n* **Image + Text + Button**: A rich card with image, caption, and button.\n* **Video Only**: A video without any caption.\n* **Video + Text**: A video with a text caption.\n* **Video + Button**: A video with a CTA button.\n* **Video + Text + Button**: A rich card with video, caption, and button.\n* **File Only**: A document file.\n\n### Callbacks\nThe API sends webhook events to the configured `callback_url`.\n\n#### Payload Example\n```json\n{\n  \"error\": \"000\",\n  \"message_id\": \"8bd71f49-6f42-4729-bf5e-ecf857747633\",\n  \"status\": \"DELIVERED\",\n  \"to\": \"16197012345\",\n  \"type\": \"DLR\"\n}\n```\n\n#### Field Details\n* **type**:\n  * `DLR`: Delivery Report (e.g., status is `DELIVERED` or `SEEN`).\n  * `MO`: Incoming Message (status is `RECEIVED`).\n* **text**: The content of the incoming message (only present when `type` is `MO`).\n\n> **Note**: Read receipts (`SEEN` status) are only sent if the user has enabled them in their Viber settings.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ViberTextMessage"},{"$ref":"#/components/schemas/ViberImageMessage"},{"$ref":"#/components/schemas/ViberVideoMessage"},{"$ref":"#/components/schemas/ViberFileMessage"}]}}}},"responses":{"200":{"$ref":"#/components/responses/SuccessResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"callbacks":{"viberCallback":{"{$request.body#/callback_url}":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message_id":{"type":"string"},"status":{"type":"string"},"to":{"type":"string"},"type":{"type":"string","enum":["DLR","MO"]},"text":{"type":"string","description":"Content of the message (only for MO)"}}}}}}}}}},"tags":["Send message"]}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.bind.hr/viber-api/send-message.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
