Simple API to send WhatsApp messages programmatically.
Semua request mengirimkan token di body. Token adalah hash HMAC-SHA256 dari nomor WhatsApp client menggunakan secret server.
token = HMAC_SHA256(client_number, SERVER_SECRET)
/api/send-message
Sends a text message to a specified WhatsApp number. You can use query parameters or JSON body.
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Your Device Token (Ordinary Token). |
| number | string | Yes | The WhatsApp number (e.g., "628123456789"). Alias: to. |
| message | string | Yes | The text message content. Alias: messages. |
curl "https://evo.kedanapps.my.id/api/send-message?token=your_device_token&number=628123456789&message=Hello"
curl -X POST "https://evo.kedanapps.my.id/api/send-message" \
-H "Content-Type: application/json" \
-d '{
"token": "your_device_token",
"number": "628123456789",
"message": "Hello from API!"
}'
{
"success": true,
"message": "Message sent successfully",
"data": {
"success": true,
"queued": true
}
}
{
"success": false,
"message": "Validation error",
"errors": {
"number": [
"The number field is required."
]
}
}
/api/send-image
Sends an image message to a specified WhatsApp number.
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Your Device Token. |
| number | string | Yes | The WhatsApp number (e.g., "628123456789"). Alias: to. |
| imageUrl | string | Yes | The URL of the image. Alias: image_url, url. |
| caption | string | No | The caption for the image. |
curl -X POST "https://evo.kedanapps.my.id/api/send-image" \
-H "Content-Type: application/json" \
-d '{
"token": "your_device_token",
"number": "628123456789",
"imageUrl": "https://example.com/image.jpg",
"caption": "Here is the image"
}'
/api/send-document
Sends a document (PDF, Docx, etc.) to a specified WhatsApp number.
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Your Device Token. |
| number | string | Yes | The WhatsApp number (e.g., "628123456789"). Alias: to. |
| fileUrl | string | Yes | The URL of the file. Alias: file_url, url. |
| fileName | string | No | The name of the file (e.g., "invoice.pdf"). |
curl -X POST "https://evo.kedanapps.my.id/api/send-document" \
-H "Content-Type: application/json" \
-d '{
"token": "your_device_token",
"number": "628123456789",
"fileUrl": "https://example.com/invoice.pdf",
"fileName": "invoice.pdf"
}'
/api/send-group-message
Sends a text message to a WhatsApp group using its JID.
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Your Device Token. |
| jid | string | Yes | Group JID (e.g. 1234567890-123456@g.us). Alias: to. |
| message | string | Yes | Text message content. |
curl -X POST "https://evo.kedanapps.my.id/api/send-group-message" \
-H "Content-Type: application/json" \
-d '{
"token": "your_device_token",
"jid": "1234567890-123456@g.us",
"message": "Hello group from API!"
}'
/api/check-number
Checks whether a WhatsApp number is registered.
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Your Device Token. |
| number | string | Yes | The WhatsApp number (e.g., "628123456789"). Alias: phone. |
Server akan otomatis menghapus karakter non-digit dan mengkonversi nomor:
08xxxx → 628xxxx. Jika nomor belum diawali 62, akan dipaksa menjadi format 62xxxxxxxxxxx.
curl -X POST "https://evo.kedanapps.my.id/api/check-number" \
-H "Content-Type: application/json" \
-d '{
"token": "your_device_token",
"number": "08123456789"
}'
{
"success": true,
"registered": true,
"number": "628123456789",
"data": {
"exists": true
}
}
/api/groups
Returns the list of WhatsApp groups from the connected device.
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Your Device Token (can be sent as query or JSON body). |
curl "https://evo.kedanapps.my.id/api/groups?token=your_device_token"
{
"success": true,
"data": [
{
"jid": "1234567890-123456@g.us",
"subject": "My Group",
"participants": 42
}
]
}
/api/send-broadcast
Sends the same text message to multiple WhatsApp numbers at once.
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Your Device Token. |
| message | string | Yes | Text message content to broadcast. |
| numbers | array<string> | Yes* | List of phone numbers. Alias: contacts. Required if contacts is not provided. |
Numbers will be normalized using the same rule as Check Number:
08xxxx → 628xxxx, and non-digit characters are removed.
curl -X POST "https://evo.kedanapps.my.id/api/send-broadcast" \
-H "Content-Type: application/json" \
-d '{
"token": "your_device_token",
"message": "Promo terbaru dari kami",
"numbers": [
"08123456789",
"628987654321"
]
}'
{
"success": true,
"message": "Broadcast processed",
"results": [
{
"number": "628123456789",
"status": "sent",
"error": null,
"code": 200
}
]
}
/api/contacts
Saves a contact (name and normalized number) for the authenticated device owner.
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Your Device Token. |
| number | string | Yes | Phone number (alias: phone). Will be normalized to 62 format. |
| name | string | No | Contact name (optional). |
curl -X POST "https://evo.kedanapps.my.id/api/contacts" \
-H "Content-Type: application/json" \
-d '{
"token": "your_device_token",
"number": "08123456789",
"name": "Customer A"
}'
{
"success": true,
"message": "Contact saved",
"data": {
"id": 1,
"name": "Customer A",
"number": "628123456789"
}
}