---
updatedAt: 2026-04-21T09:18:29.000Z
agentTools:
  projectIndex: https://docs.esputnik.com/llms.txt
---

# Search for Viber messages

The method is used to search for Viber messages using a part of name or a tag.
 By default, a rate limit of 500 requests per hour applies. <br/>The method returns a maximum of 500 messages per request.<br/>The <b>TotalCount</b> header contains the number of messages returned by the query

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "esputnik.com",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://esputnik.com"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "tags": [
    {
      "name": "Messages"
    }
  ],
  "paths": {
    "/api/v1/messages/viber": {
      "get": {
        "tags": [
          "Messages"
        ],
        "summary": "Search for Viber messages",
        "description": "The method is used to search for Viber messages using a part of name or a tag.\n By default, a rate limit of 500 requests per hour applies. <br/>The method returns a maximum of 500 messages per request.<br/>The <b>TotalCount</b> header contains the number of messages returned by the query",
        "operationId": "searchViberMessages",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search condition (part of the message name or a tag)",
            "schema": {
              "type": "string"
            },
            "example": "You added items to your cart"
          },
          {
            "name": "startindex",
            "in": "query",
            "description": "Index of the first returned message from the search results. Numbering starts at 1",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "maxrows",
            "in": "query",
            "description": "Maximum number of messages to return (not more than 500)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json; charset=UTF-8": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BaseViberMessage"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests:<br><ul><li>More than 500 requests per 1 hour.</li></ul>"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BaseViberMessage": {
        "required": [
          "from",
          "name",
          "text"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Message ID.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Message name."
          },
          "languageCode": {
            "type": "string",
            "description": "Language code."
          },
          "tags": {
            "type": "array",
            "description": "List of tags.",
            "items": {
              "type": "string",
              "description": "List of tags."
            }
          },
          "subscriptionsKeys": {
            "type": "array",
            "description": "Subscription categories keys, assigned to a message.",
            "items": {
              "type": "string",
              "description": "Subscription categories keys, assigned to a message."
            }
          },
          "languages": {
            "type": "array",
            "description": "An array with the language codes for multilingual messages. Available for the GET method only.",
            "items": {
              "type": "string",
              "description": "An array with the language codes for multilingual messages. Available for the GET method only."
            }
          },
          "from": {
            "type": "string",
            "description": "Sender name. Must exist in your account."
          },
          "transactional": {
            "type": "boolean",
            "description": "Transactional messages have lower cost, but can contain only text. Content must be agreed with provider for successful sending. Default - false."
          },
          "templateId": {
            "type": "string",
            "description": "Provider template ID for a transactional Viber message."
          },
          "text": {
            "type": "string",
            "description": "Message text."
          },
          "img": {
            "type": "string",
            "description": "Image URL for message. If set, caption and action must be set too."
          },
          "caption": {
            "type": "string",
            "description": "Button text. If set, img and action must be set too."
          },
          "action": {
            "type": "string",
            "description": "Link assigned to button. If set, img and caption must be set too."
          },
          "ttlSec": {
            "type": "integer",
            "description": "Time to live for message in seconds. Default - 86400 (1 day).",
            "format": "int32"
          },
          "smsFallback": {
            "type": "boolean",
            "description": "Enables smsFallback feature: send SMS message instead of Viber, if contact does not have Viber app installed. Default - false."
          },
          "smsSender": {
            "type": "string",
            "description": "SMS sender name for smsFallback feature."
          },
          "smsContent": {
            "type": "string",
            "description": "SMS text for smsFallback feature."
          },
          "carouselItems": {
            "type": "array",
            "description": "Carousel items (2-5 items). When provided, img/action/caption are ignored.",
            "items": {
              "$ref": "#/components/schemas/ViberCarouselItem"
            }
          },
          "translations": {
            "type": "array",
            "description": "An array with translations to other languages. Available for the GET method only.",
            "items": {
              "$ref": "#/components/schemas/ViberMessage"
            }
          }
        }
      },
      "ViberCarouselItem": {
        "required": [
          "img",
          "primaryAction",
          "primaryCaption",
          "title"
        ],
        "type": "object",
        "properties": {
          "img": {
            "type": "string",
            "description": "Image URL (png, jpeg). HTTPS recommended."
          },
          "title": {
            "type": "string",
            "description": "Short card title"
          },
          "primaryCaption": {
            "type": "string",
            "description": "Primary button name"
          },
          "primaryAction": {
            "type": "string",
            "description": "Primary button link"
          },
          "secondaryCaption": {
            "type": "string",
            "description": "Secondary button name"
          },
          "secondaryAction": {
            "type": "string",
            "description": "Secondary button link"
          }
        },
        "description": "Viber carousel card item"
      },
      "ViberMessage": {
        "required": [
          "from",
          "name",
          "text"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Message ID.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Message name."
          },
          "languageCode": {
            "type": "string",
            "description": "Language code."
          },
          "tags": {
            "type": "array",
            "description": "List of tags.",
            "items": {
              "type": "string",
              "description": "List of tags."
            }
          },
          "subscriptionsKeys": {
            "type": "array",
            "description": "Subscription categories keys, assigned to a message.",
            "items": {
              "type": "string",
              "description": "Subscription categories keys, assigned to a message."
            }
          },
          "languages": {
            "type": "array",
            "description": "An array with the language codes for multilingual messages. Available for the GET method only.",
            "items": {
              "type": "string",
              "description": "An array with the language codes for multilingual messages. Available for the GET method only."
            }
          },
          "from": {
            "type": "string",
            "description": "Sender name. Must exist in your account."
          },
          "transactional": {
            "type": "boolean",
            "description": "Transactional messages have lower cost, but can contain only text. Content must be agreed with provider for successful sending. Default - false."
          },
          "templateId": {
            "type": "string",
            "description": "Provider template ID for a transactional Viber message."
          },
          "text": {
            "type": "string",
            "description": "Message text."
          },
          "img": {
            "type": "string",
            "description": "Image URL for message. If set, caption and action must be set too."
          },
          "caption": {
            "type": "string",
            "description": "Button text. If set, img and action must be set too."
          },
          "action": {
            "type": "string",
            "description": "Link assigned to button. If set, img and caption must be set too."
          },
          "ttlSec": {
            "type": "integer",
            "description": "Time to live for message in seconds. Default - 86400 (1 day).",
            "format": "int32"
          },
          "smsFallback": {
            "type": "boolean",
            "description": "Enables smsFallback feature: send SMS message instead of Viber, if contact does not have Viber app installed. Default - false."
          },
          "smsSender": {
            "type": "string",
            "description": "SMS sender name for smsFallback feature."
          },
          "smsContent": {
            "type": "string",
            "description": "SMS text for smsFallback feature."
          },
          "carouselItems": {
            "type": "array",
            "description": "Carousel items (2-5 items). When provided, img/action/caption are ignored.",
            "items": {
              "$ref": "#/components/schemas/ViberCarouselItem"
            }
          }
        },
        "description": "An array with translations to other languages. Available for the GET method only."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  }
}
```