Build flexible workflows with our API
Add Viber messaging to your apps, CRM, or marketing tools with the MSG PLS API. Keep full control while making integration straightforward.

Benefits of Using Our API
Authentication & Security

JWT Tokens
Expire in 15 minutes, can be refreshed with a valid refresh token.

API Tokens
Never expire (until revoked), perfect for automation.

IP Whitelisting
For security, only authorized IP addresses can send requests.

Immediate Revocation
Compromised tokens can be revoked instantly.
KEY FEATURES
Deliver text, images, or text+image messages to your customers via their phone numbers.
Include dynamic variables like {{first_name}} or {{last_name}} to personalize each message.
If you send a message to a new phone number, the system automatically creates a recipient record.
Retrieve detailed delivery reports - see if your messages were sent, delivered, or read.
• JWT Tokens for short-term access with refresh capabilities.
• API Tokens for long-term server-to-server integrations.





API Endpoints Overview
POST /auth/login, POST /auth/refresh
# Login to obtain an access token
curl -X POST https://api.msgpls.com/api/auth/login/ \
-F "email=you@example.com" \
-F "password=your_password"
# Refresh your token
curl -X POST https://api.msgpls.com/api/auth/refresh/ \
-H "Authorization: Bearer <your_refresh_token>"
Response example:
{
"message": "Login successful",
"is_admin": false,
"access_token": "eyJhbGciOiJIUzI1...",
"refresh_token": "eyJ0eXAiOiJK..."
}POST /api-tokens, GET /api-tokens, DELETE /api-tokens/:id
# Create a new API token
curl -X POST https://api.msgpls.com/api/tokens/ \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"name": "my-integration"}'
# List all tokens
curl https://api.msgpls.com/api/tokens/ \
-H "Authorization: Bearer <access_token>"
Response example:
{
"tokens": [
{"id": 1, "name": "my-integration", "created": "2025-01-15"}
]
}POST /messages/send, GET /messages/:id
# Send a Viber message
curl -X POST https://api.msgpls.com/api/messages/send/ \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"to": "41793026727",
"from": "MSGPLS",
"text": "Hello from our API!"
}'
Response example:
{
"message_id": "abc123",
"status": "sent",
"timestamp": "2025-01-15T12:00:00Z"
}Error codes and responses
# Common error responses
# 401 Unauthorized
{
"error": "Invalid or expired token",
"code": 401
}
# 429 Too Many Requests
{
"error": "Rate limit exceeded",
"code": 429,
"retry_after": 60
}
# 400 Bad Request
{
"error": "Missing required field: 'to'",
"code": 400
}Interactive API Documentation
Explore and test every endpoint in real time using our integrated Swagger interface. Get instant responses and see how the MSG PLS API works under the hood.
Go to SwaggerDEVELOPER TOOLS
IN ACTION
CRM Integration
Trigger personalized Viber notifications based on customer actions.
Automated Alerts
Send instant delivery updates or payment confirmations.
Marketing Campaigns
Schedule and send bulk promotional messages.
How to get started?
Sign Agreement
with us to activate your account.
Log In (No Install)
From your browser, no install needed.
Send Your First Campaign
Create your first message, and send.
Track performance
and optimize for your next campaign.






