What Can A User Use The API For?
A user can use the API to operate their own Chatly workspace from another system. The API is scoped by user API key and JWT user token, so user data is separated by the logged-in user/client staff account.
Base URL
Use this base URL for user API requests:
https://vueping.com/auth/api
If your app is configured with language prefixes, this may also work:
https://vueping.com/auth/en/api
API Endpoint shows the domain and API Key shows the user key. For route calls, append /api/... to the domain.User Authentication
Step 1: Copy User API Key
Go to Client Panel -> API and copy the API Key. Send it in every API request as:
apikey: YOUR_USER_API_KEY
Step 2: Login To Get JWT Token
Use user/client-staff email and password. The login response contains the JWT token used for protected user APIs.
curl -X POST "https://vueping.com/auth/api/login" \ -H "Accept: application/json" \ -H "apikey: YOUR_USER_API_KEY" \ -F "email=user@example.com" \ -F "password=your-password"
Step 3: Use Bearer Token
Authorization: Bearer YOUR_JWT_TOKEN
How To Use These Examples
Words You Must Replace
| Word in example | Replace with |
|---|---|
YOUR_USER_API_KEY | The API key shown in Client Panel -> API. |
YOUR_JWT_TOKEN | The token received after successful /api/login. |
CONTACT_ID | The contact ID from contact list API. |
TEMPLATE_ID | The template ID from template list API. |
COUNTRY_ID | For India use 101. You can also get countries from /api/country/list. |
Recommended Testing Tool
- Open Postman or any API testing tool.
- Paste the URL, for example
https://vueping.com/auth/api/login. - Add header
apikeywith your API key. - Add form fields shown in the example.
- Click Send.
First API Test
After login, test the user profile endpoint:
curl -X GET "https://vueping.com/auth/api/profile" \ -H "Accept: application/json" \ -H "apikey: YOUR_USER_API_KEY" \ -H "Authorization: Bearer YOUR_JWT_TOKEN"
If it returns user account data, authentication is working.
User Contacts
List Contacts
Use this to check whether your contact already exists or to find a CONTACT_ID.
curl -X GET "https://vueping.com/auth/api/whatsapp-contact" \ -H "Accept: application/json" \ -H "apikey: YOUR_USER_API_KEY" \ -H "Authorization: Bearer YOUR_JWT_TOKEN"
Create Contact
Required fields from this installation: phone, country_id. Phone must be numeric and at least 11 digits.
- Replace
John Customerwith the customer's name. - Replace
919999999999with the customer's WhatsApp number including country code. - Use
country_id=101for India.
curl -X POST "https://vueping.com/auth/api/whatsapp-contact-store" \ -H "Accept: application/json" \ -H "apikey: YOUR_USER_API_KEY" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -F "name=John Customer" \ -F "phone=919999999999" \ -F "country_id=101"
Contact Lists
Use contact lists to group customers, for example Hot Leads, Paid Customers, or May Campaign.
| Method | Endpoint | Required |
|---|---|---|
| GET | /whatsapp-contact-list | None |
| POST | /whatsapp-contact-list-store | name |
| POST | /whatsapp-contact-list-update/{id} | name |
User Messaging
Send Text Message
Required: receiver_id and one of message, image, or document.
- First call
/api/whatsapp-contactand copy the contactid. - Put that ID in
receiver_id. - Type your message in the
messagefield.
curl -X POST "https://vueping.com/auth/api/send-message" \ -H "Accept: application/json" \ -H "apikey: YOUR_USER_API_KEY" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -F "receiver_id=CONTACT_ID" \ -F "message=Hello from user API"
Send Image Or Document
Use this for sending a bill, brochure, product image, report, or other file.
curl -X POST "https://vueping.com/auth/api/send-message" \ -H "Accept: application/json" \ -H "apikey: YOUR_USER_API_KEY" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -F "receiver_id=CONTACT_ID" \ -F "image=@/local/path/image.jpg"
Send Approved WhatsApp Template
Required: template_id, contact_id. Optional arrays: body_values, button_values. Optional media: image, document, video, audio.
Use this when WhatsApp requires an approved template, like marketing, utility, or authentication messages.
curl -X POST "https://vueping.com/auth/api/whatsapp/send-template" \ -H "Accept: application/json" \ -H "apikey: YOUR_USER_API_KEY" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -F "template_id=TEMPLATE_ID" \ -F "contact_id=CONTACT_ID"
User Campaigns
WhatsApp Campaign
| Method | Endpoint | Use |
|---|---|---|
| GET | /whatsapp-campaign | List user WhatsApp campaigns. |
| POST | /whatsapp-campaign-store | Create campaign. |
| POST | /whatsapp-campaign-update/{id} | Update campaign. |
Required fields for create: campaign_name, template_id, contact_list_id, segment_id. If send_scheduled=1, also send schedule_time.
- Create or choose a contact list in Chatly.
- Create or choose a segment.
- Choose an approved WhatsApp template.
- Use their IDs in the API request.
curl -X POST "https://vueping.com/auth/api/whatsapp-campaign-store" \ -H "Accept: application/json" \ -H "apikey: YOUR_USER_API_KEY" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -F "campaign_name=May Offer" \ -F "template_id=1" \ -F "contact_list_id=1" \ -F "segment_id=1"
Telegram Campaign
Use this if the user has connected Telegram and wants to manage Telegram campaigns through API.
| Method | Endpoint | Use |
|---|---|---|
| GET | /telegram-group | List user Telegram groups. |
| GET | /telegram-contact | List Telegram contacts. |
| GET | /telegram-campaign | List Telegram campaigns. |
| POST | /telegram-campaign-store | Create Telegram campaign. |
User Inbox And Chat
| Method | Endpoint | Use |
|---|---|---|
| GET | /chat-rooms | List user chat rooms. |
| GET | /message/{chat_room_id} | Get messages from one chat room. |
| GET | /contact-messages/{contactId} | Get messages for a contact. |
| GET | /contacts-by-client | List user contacts for chat UI. |
| POST | /assign-staff | Assign chat/contact to user staff. |
| DELETE | /chat/delete/{message_id} | Delete one message. |
| GET | /chat/clear/{contact_id} | Clear chat with contact. |
Tickets, Team, Notes, Tags
Tickets
Create user support tickets from an external client portal.
| Method | Endpoint | Required |
|---|---|---|
| GET | /ticket | None |
| POST | /ticket-store | department_id, subject, priority |
| POST | /ticket-reply | reply |
Team
Use team APIs to create staff accounts for the user's workspace.
| Method | Endpoint | Required |
|---|---|---|
| GET | /team | None |
| POST | /team-store | first_name, last_name, email, password, password_confirmation |
| POST | /team-update/{id} | first_name, last_name, email |
Notes And Tags
Use notes and tags to mark contacts, like Interested, Follow Up, VIP, or Issue Open.
| Method | Endpoint | Use |
|---|---|---|
| GET | /notes | List contact notes. |
| POST | /notes | Create contact note. |
| GET | /tags | List user tags. |
| POST | /tags | Create tag. |
| GET | /tags/contact-tags | Get contact tags. |
| POST | /tags/store/contact-tag | Attach tag to contact. |
Webhook Automation
Where To Set It
Go to Client Dashboard -> Webhook, or open https://vueping.com/auth/client/webhook after login. Enter your webhook URL, choose events, enable webhook, and save.
Available Events
| Event | Meaning |
|---|---|
webhook.test | Manual test from dashboard. |
contact.created | A contact is created through API. |
message.sent | A message is sent through API. |
whatsapp.incoming | A WhatsApp incoming message is received. |
whatsapp.status | WhatsApp sent/delivered/read/failed status update. |
telegram.incoming | A Telegram webhook update is received. |
ticket.created | A ticket is created through API. |
How To Test Without Coding
- Open Client Dashboard -> Webhook.
- Paste a webhook URL from Zapier, Make, Pabbly, webhook.site, your CRM, or your own website.
- Select Test webhook and any other events you want.
- Switch on Enable Webhook and save.
- Click Send Test Webhook. If the other app receives data, your webhook is working.
Payload Example
{
"event": "contact.created",
"client_id": 1,
"created_at": "2026-05-14T10:00:00+05:30",
"data": {
"name": "John Customer",
"phone": "919999999999",
"source": "api"
}
}
If you add a secret, Chatly sends X-Chatly-Signature so your app can verify the webhook came from Chatly. Keep this secret private, like a password.
Good Automation Examples
| When This Happens | What You Can Automate |
|---|---|
| New contact created | Add the contact to CRM, Google Sheet, email list, or sales pipeline. |
| Incoming WhatsApp message | Create a lead, notify staff, send data to another support tool. |
| Message status changes | Track delivered/read/failed messages in your reporting system. |
| Ticket created | Send ticket details to support software or alert a manager. |
| Telegram update received | Forward Telegram leads or conversations to your own automation flow. |
Response Format And Errors
Most successful user API responses:
{
"success": true,
"message": "data_retrieved_successfully",
"data": {}
}
Most error responses:
{
"success": false,
"message": "validation_failed",
"data": {
"field": ["Error message"]
}
}
| Status | Meaning | Fix |
|---|---|---|
| 401 | Missing API key or Bearer token. | Add apikey and Authorization headers. |
| 403 | Invalid API key or user limit issue. | Check user API key and active subscription. |
| 422 | Validation failed. | Check required fields listed in this guide. |
| 500 | Server-side error. | Check user module settings, WhatsApp connection, or server logs. |