User API Guide

Use Chatly API From A User Account

This guide is for users/clients using their own API key from Client Panel -> API. It explains how a user can connect external tools to Chatly for contacts, WhatsApp messages, templates, campaigns, chat inbox, tickets, team members, notes, and tags.

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.

CRM integrationCreate contacts, contact lists, segments, tags, and notes.
MessagingSend WhatsApp text, image, document, and approved templates.
Support workflowRead chats, create tickets, reply to tickets, and assign staff.

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
On the user API page, API Endpoint shows the domain and API Key shows the user key. For route calls, append /api/... to the domain.

User Authentication

Simple meaning API key is like your shop key. Login token is like your temporary entry pass. First send the API key, then login, then use the login token for all private actions like creating contacts or sending messages.

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

For non-technical users You do not need to understand code deeply. Copy the example, replace the capital words, and send it from your developer tool, Postman, CRM, website, or automation platform.

Words You Must Replace

Word in exampleReplace with
YOUR_USER_API_KEYThe API key shown in Client Panel -> API.
YOUR_JWT_TOKENThe token received after successful /api/login.
CONTACT_IDThe contact ID from contact list API.
TEMPLATE_IDThe template ID from template list API.
COUNTRY_IDFor India use 101. You can also get countries from /api/country/list.

Recommended Testing Tool

  1. Open Postman or any API testing tool.
  2. Paste the URL, for example https://vueping.com/auth/api/login.
  3. Add header apikey with your API key.
  4. Add form fields shown in the example.
  5. Click Send.

First API Test

Easy check If this profile test works, your API key and login token are correct. If it fails, check the API key and Bearer token first.

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

What this feature does Use this when you want to add customers/leads from your website, CRM, Google Sheet automation, or landing page into Chatly automatically.

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.

  1. Replace John Customer with the customer's name.
  2. Replace 919999999999 with the customer's WhatsApp number including country code.
  3. Use country_id=101 for 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.

MethodEndpointRequired
GET/whatsapp-contact-listNone
POST/whatsapp-contact-list-storename
POST/whatsapp-contact-list-update/{id}name

User Messaging

What this feature does Use this when your external system needs to send a WhatsApp message to an existing Chatly contact. Example: after a form submission, order update, appointment reminder, or payment confirmation.

Send Text Message

Required: receiver_id and one of message, image, or document.

  1. First call /api/whatsapp-contact and copy the contact id.
  2. Put that ID in receiver_id.
  3. Type your message in the message field.
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

What this feature does Use campaigns when you want to send one approved template to many contacts from a contact list or segment.

WhatsApp Campaign

MethodEndpointUse
GET/whatsapp-campaignList user WhatsApp campaigns.
POST/whatsapp-campaign-storeCreate 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.

  1. Create or choose a contact list in Chatly.
  2. Create or choose a segment.
  3. Choose an approved WhatsApp template.
  4. 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.

MethodEndpointUse
GET/telegram-groupList user Telegram groups.
GET/telegram-contactList Telegram contacts.
GET/telegram-campaignList Telegram campaigns.
POST/telegram-campaign-storeCreate Telegram campaign.

User Inbox And Chat

What this feature does Use this to build your own inbox screen, sync messages into another CRM, or assign conversations to staff from another system.
MethodEndpointUse
GET/chat-roomsList 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-clientList user contacts for chat UI.
POST/assign-staffAssign 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

What this feature does These APIs help users connect customer support and internal team workflows with Chatly.

Tickets

Create user support tickets from an external client portal.

MethodEndpointRequired
GET/ticketNone
POST/ticket-storedepartment_id, subject, priority
POST/ticket-replyreply

Team

Use team APIs to create staff accounts for the user's workspace.

MethodEndpointRequired
GET/teamNone
POST/team-storefirst_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.

MethodEndpointUse
GET/notesList contact notes.
POST/notesCreate contact note.
GET/tagsList user tags.
POST/tagsCreate tag.
GET/tags/contact-tagsGet contact tags.
POST/tags/store/contact-tagAttach tag to contact.

Webhook Automation

What this feature does Webhook sends automatic updates from Chatly to another app when something happens. Example: when a new contact is created, a message is sent, or a WhatsApp reply comes in.

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.

Simple setup idea If you are using Zapier, Make, Pabbly, your own CRM, or your website, create a "Catch Webhook" URL there first. Paste that URL inside Chatly, click Send Test Webhook, then map the received fields in that app.

Available Events

EventMeaning
webhook.testManual test from dashboard.
contact.createdA contact is created through API.
message.sentA message is sent through API.
whatsapp.incomingA WhatsApp incoming message is received.
whatsapp.statusWhatsApp sent/delivered/read/failed status update.
telegram.incomingA Telegram webhook update is received.
ticket.createdA ticket is created through API.

How To Test Without Coding

  1. Open Client Dashboard -> Webhook.
  2. Paste a webhook URL from Zapier, Make, Pabbly, webhook.site, your CRM, or your own website.
  3. Select Test webhook and any other events you want.
  4. Switch on Enable Webhook and save.
  5. 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 HappensWhat You Can Automate
New contact createdAdd the contact to CRM, Google Sheet, email list, or sales pipeline.
Incoming WhatsApp messageCreate a lead, notify staff, send data to another support tool.
Message status changesTrack delivered/read/failed messages in your reporting system.
Ticket createdSend ticket details to support software or alert a manager.
Telegram update receivedForward 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"]
  }
}
StatusMeaningFix
401Missing API key or Bearer token.Add apikey and Authorization headers.
403Invalid API key or user limit issue.Check user API key and active subscription.
422Validation failed.Check required fields listed in this guide.
500Server-side error.Check user module settings, WhatsApp connection, or server logs.