Virtual WhatsApp Business API

Message at the
speed of code

A developer-first API to send and manage WhatsApp messages programmatically — no official Business account, no queue, no friction.

Explore the API Live Status Base URL: https://youmsg.in/api
0
Messages Sent
0
Active Sessions
<200ms
Avg Response
99.9%
Uptime SLA
Everything you need,
nothing you don't

A focused API surface built for speed and simplicity. All core messaging operations in one place.

Send Messages
Deliver text, image, or document messages to any number via a single POST request. Messages are queued and tracked instantly.
Session Management
Register business phone sessions, list active sessions, and remove them cleanly. Multi-session architecture for teams.
Message Log
Fetch full message history, filter by recipient number, and delete individual records. Full audit trail for compliance.
API Key Auth
All protected endpoints require an X-Api-Key header. Simple token-based security that works everywhere.
Health Check
A public /api/status endpoint returns uptime, version, and server time. Monitor with any HTTP checker.
REST + JSON
Standard HTTP verbs, JSON in and out. Works with curl, Postman, every HTTP library in every language. Zero SDK required.
Up and running
in four steps
Get your API key
Configure your secret key in the server config file. Keep it safe — it protects all write operations.
01
Create a session
Register a phone number session via POST /api/session. You can run multiple sessions simultaneously.
02
Send messages
POST to /api/send with the recipient number and content. Supports text, images, and document types.
03
Track & manage
Query your message log, filter by recipient, and delete records as needed via the /api/messages endpoints.
04
API Endpoints

All endpoints return JSON. Protected endpoints require the X-Api-Key header.

🔑 All endpoints except /api/status require X-Api-Key: your_api_key in the request header. Requests without a valid key return 401 Unauthorized.
GET /api/status Health check — no auth required
Description

Returns the current status of the API server including version, server time, and PHP version. This endpoint is public and requires no authentication — ideal for uptime monitoring.

Auth required No
Rate limited No
Example
curl
curl https://youmsg.in/api/status

200 OK
json
{
  "status":  "success",
  "app":     "YouMsg",
  "domain":  "youmsg.in",
  "version": "2.0.0",
  "time":    "2025-01-01T00:00:00+05:30",
  "php":     "8.3.0"
}
POST /api/send Send a WhatsApp message
Request body
to string required Recipient phone number with country code. E.g. 919876543210
message string required Message content — plain text or a URL for image/document types.
type string optional Message type. One of text, image, document. Defaults to text.
Example
curl
curl -X POST https://youmsg.in/api/send \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your_api_key" \
  -d '{
    "to": "919876543210",
    "message": "Hello from YouMsg!",
    "type": "text"
  }'

200 OK
json
{
  "status":  "success",
  "message": "Message queued successfully.",
  "data": {
    "id":        "msg_abc123",
    "to":        "919876543210",
    "message":   "Hello from YouMsg!",
    "type":      "text",
    "status":    "sent",
    "timestamp": "2025-01-01T00:00:00+05:30"
  }
}
GET /api/messages List all sent messages
Query parameters
to string optional Filter messages by recipient phone number. Returns only messages sent to that number.
Example
curl
curl https://youmsg.in/api/messages \
  -H "X-Api-Key: your_api_key"

# Filter by recipient
curl "https://youmsg.in/api/messages?to=919876543210" \
  -H "X-Api-Key: your_api_key"

200 OK
json
{
  "status": "success",
  "total":  42,
  "data":   [ /* array of message objects */ ]
}
DELETE /api/messages/{id} Delete a message by ID
Path parameters
id string required The unique message ID returned when the message was sent. E.g. msg_abc123
Example
curl
curl -X DELETE \
  https://youmsg.in/api/messages/msg_abc123 \
  -H "X-Api-Key: your_api_key"

200 OK
json
{
  "status":  "success",
  "message": "Message deleted."
}

404 Not Found
json
{
  "status":  "error",
  "message": "Message not found."
}
POST /api/session Register a WhatsApp session
Request body
phone string required Phone number with country code to register as a session.
name string optional A human-readable label for this session. Defaults to Unnamed.
Example
curl
curl -X POST https://youmsg.in/api/session \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your_api_key" \
  -d '{
    "phone": "919876543210",
    "name":  "My Business"
  }'

201 Created
json
{
  "status":  "success",
  "message": "Session created.",
  "data": {
    "id":         "sess_abc123",
    "phone":      "919876543210",
    "name":       "My Business",
    "status":     "active",
    "created_at": "2025-01-01T00:00:00+05:30"
  }
}
GET /api/sessions List all active sessions
Description

Returns all registered sessions with their IDs, names, phone numbers, and statuses. Useful for verifying which sessions are active before sending.

Example
curl
curl https://youmsg.in/api/sessions \
  -H "X-Api-Key: your_api_key"

200 OK
json
{
  "status": "success",
  "total":  3,
  "data":   [ /* array of session objects */ ]
}
DELETE /api/session/{id} Remove a session
Path parameters
id string required The session ID returned when the session was created. E.g. sess_abc123
Example
curl
curl -X DELETE \
  https://youmsg.in/api/session/sess_abc123 \
  -H "X-Api-Key: your_api_key"

200 OK
json
{
  "status":  "success",
  "message": "Session deleted."
}
Simple, transparent
plans for every team

All plans include core API access. Upgrade anytime as your messaging volume grows.

Monthly Annual Save 20%
399 * / mon
Standard
Essential for growing businesses
MessagesUnlimited
Setup Fee₹0
Sessions3
Max File Size5 MB
Text Messages
Image Messages
Document Send
API Access
Get Started
999 * / mon
Premium
Advanced tools for maximum impact
MessagesUnlimited
Setup Fee₹0
Sessions25
Max File Size20 MB
Text Messages
Image Messages
Document Send
API Access
Get Started

* Prices are exclusive of taxes. All plans auto-renew monthly. Cancel anytime.

Ready to integrate?
Start sending in
minutes, not days

Deploy the single PHP file, set your API key, and make your first call. No signup, no dashboard, no waiting.

View full API docs Check live status PHP 8.1+ · JSON storage · Zero dependencies