Viber Business Messaging service in Nepal
Last Updated - 16th February, 2023 Version 1.0.3
API Endpoints
Available APIs
Message types
All business accounts will be able to send any of the following message types based on their needs. Our message type selection contains text-based messages and richer content options, which includes images, action button and file sharing.
- Transactional : message contains rich text only
- Promotional : message contains any of the following
- Image
- Download file
- Action Button
Full Data Payload
{
"data" : {
"text": "",
"image": ""
},
"action" : {
"url" : "",
"caption" : "",
"filename": ""
},
"session" : {
"sender_name": "",
"tag": ["tag1", "tag2"],
"recipients": [ … … … ]
}
}
Description
Coming soon
- ttl = Not defined Defaults to 48 hrs
- ttl = Value in seconds - Keep the max value in seconds equivalent to 48 hours
SMS Fallback (Coming soon)
sms_fallback
Fallback SMS Content shall be forwarded if message wasn’t delivered within the TTL specified
Response
The following is a list of status responses that you will receive after sending a message
Success Response
{
"data": {
"message": "Queued successfully",
"batch_id": "5c32728e-340f-43b6-898d-d2b24e8e1426",
"credits_required": 2,
"valid_recipients": 2,
"invalid_recipients": []
},
"result": "00",
"status": "OK"
}
Error Response
{
"data": {
"errors": "Billing Error"
},
"result": "11",
"status": "DATA_ERROR"
}
Campaign Reports
Aggregated Summary /campaign/report/:uuid
{
"data": {
"uuid": "b8d2516c-f78d-42d9-bdf4-6b5ec421402d",
"sender_name": "Sparrow Test One Way",
"campaign_name": "My Campaign",
"msg_type": "p",
"text": "Hello World",
"image": "https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg",
"created_at": "2022-08-21T18:00:55.400174+05:45",
"tags": [
"tag1",
"tag2"
],
"rejected": 1,
"accepted": 0,
"status": "dispatched",
"total": 1,
"accepted_percentage": 0,
"rejected_percentage": 100,
"performed_by": {
"uuid": "a2773d0f-99d7-4aac-9937-7629e99bee8e",
"name": "A Natural Person",
"email": "someone@example.com"
}
},
"meta": {},
"result": "00",
"status": "OK"
}
Aggregated Summary /campaign/report/:uuid/delivered
{
"data": {
"uuid": "b8d2516c-f78d-42d9-bdf4-6b5ec421402d",
"sender_name": "Sparrow Test One Way",
"campaign_name": "My Campaign",
"created_at": "2022-08-21T18:00:55.400174+05:45",
"records": {
"delivered": [],
"seen": []
}
},
"meta": {},
"result": "00",
"status": "OK"
}
Aggregated Summary /campaign/report/:uuid/failed
{
"data": {
"uuid": "b8d2516c-f78d-42d9-bdf4-6b5ec421402d",
"sender_name": "Sparrow Test One Way",
"campaign_name": "My Campaign",
"created_at": "2022-08-21T18:00:55.400174+05:45",
"records": {
"rejected": [],
"expired": []
}
},
"meta": {},
"result": "00",
"status": "OK"
}