Chat2Me API
Send WhatsApp messages from your own connected number using a simple REST API. Use it for order updates, OTPs, appointment reminders and CRM alerts.
GET /v1/instances.Authentication
Every request must include your secret API key in the x-api-key header. Find it in Dashboard → API. If it leaks, regenerate it there — the old key stops working immediately.
x-api-key: c2m_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Limits & safe sending
- Monthly limit — depends on your plan. Every successful message counts.
- Daily safe limit per number — 250 messages/day to protect your number from WhatsApp bans.
- Messages are sent with a short "typing…" delay so they look natural.
- Only message people who have saved your number or are your customers. Chat2Me is not responsible if WhatsApp restricts your number.
POSTSend a message
Sends a text message from one of your connected numbers.
| Field | Type | Description |
|---|---|---|
| instance required | string | Instance ID of your connected number |
| to required | string | Recipient with country code, digits only. e.g. 919876543210 |
| text required | string | Message body. Emojis and WhatsApp formatting (*bold*, _italic_) supported. |
Response 200
{ "ok": true, "id": "a1b2c3d4e5f6" }POSTSend an image or PDF
Send an image, video or document with a caption. First upload the file with POST /v1/media, then pass its mediaId.
| Field | Type | Description |
|---|---|---|
| instance required | string | Instance ID of your connected number |
| to required | string | Recipient with country code, digits only |
| mediaId required | string | ID returned by POST /v1/media |
| text | string | Caption shown under the image / document (optional) |
Images (JPG, PNG, WEBP) arrive as photos; PDF, Word, Excel, PowerPoint, TXT and CSV arrive as documents with their file name; MP4 as video.
POSTUpload media
Upload one file as multipart/form-data in the field file. Images and PDFs are compressed automatically.
| Type | Formats | Max size |
|---|---|---|
| Image | JPG, PNG, WEBP | 2 MB (after auto-compression; uploads up to 30 MB are shrunk) |
| PDF / document | PDF, Word, Excel, PowerPoint, TXT, CSV | 10 MB |
| Video | MP4 | 30 MB |
{
"id": "9f2c41ab77d0e513",
"name": "brochure.pdf",
"kind": "document",
"size": 482113,
"expiresAt": 1796540000000
}
GET /v1/media lists files, DELETE /v1/media/{id} removes one.GETList numbers
Returns all WhatsApp numbers on your account with their connection status and today's usage.
[{
"id": "AD85EC549B72",
"label": "Sales",
"number": "919994063275",
"status": "connected",
"sentToday": 42,
"dailyLimit": 250
}]status is one of connected, qr, connecting, reconnecting, logged_out.
GETMessage status
Look up a message by the id returned from /v1/send.
{
"id": "a1b2c3d4e5f6",
"ts": 1795932175028,
"type": "api",
"to": "919876543210",
"status": "sent"
}Errors
Errors return a non-2xx status and a JSON body: { "error": "message" }
| Code | Meaning | What to do |
|---|---|---|
| 400 | Bad request / number not on WhatsApp / number disconnected | Check the error text; re-scan QR if disconnected |
| 401 | Invalid or missing API key | Send a valid x-api-key |
| 404 | Instance not found on your account | Use an ID from /v1/instances |
| 429 | Plan, monthly or daily safe limit reached | Wait until tomorrow or upgrade your plan |
Use cases
🛒 Order updates
Trigger from WooCommerce/Shopify webhooks when an order ships.
🔐 OTP & login
Send one-time codes to customers who registered with their number.
📅 Reminders
Appointment, fee and EMI reminders from your CRM or Google Sheets.