WhatsApp Gateway API Documentation

Simple API to send WhatsApp messages programmatically.

Authentication

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)

Send Message

GET / POST /api/send-message

Sends a text message to a specified WhatsApp number. You can use query parameters or JSON body.

Parameters

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.

Example Request (Query Params)

curl "https://evo.kedanapps.my.id/api/send-message?token=your_device_token&number=628123456789&message=Hello"

Example Request (JSON Body)

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 Response

{
    "success": true,
    "message": "Message sent successfully",
    "data": {
        "success": true,
        "queued": true
    }
}

Error Response

{
    "success": false,
    "message": "Validation error",
    "errors": {
        "number": [
            "The number field is required."
        ]
    }
}

Send Image

POST /api/send-image

Sends an image message to a specified WhatsApp number.

Parameters

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.

Example Request

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"
    }'

Send Document

POST /api/send-document

Sends a document (PDF, Docx, etc.) to a specified WhatsApp number.

Parameters

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").

Example Request

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"
    }'

Send Group Message

POST /api/send-group-message

Sends a text message to a WhatsApp group using its JID.

Parameters

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.

Example Request

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!"
    }'

Check Number

POST /api/check-number

Checks whether a WhatsApp number is registered.

Parameters

Parameter Type Required Description
token string Yes Your Device Token.
number string Yes The WhatsApp number (e.g., "628123456789"). Alias: phone.

Number Normalization

Server akan otomatis menghapus karakter non-digit dan mengkonversi nomor: 08xxxx628xxxx. Jika nomor belum diawali 62, akan dipaksa menjadi format 62xxxxxxxxxxx.

Example Request

curl -X POST "https://evo.kedanapps.my.id/api/check-number" \
    -H "Content-Type: application/json" \
    -d '{
        "token": "your_device_token",
        "number": "08123456789"
    }'

Example Response

{
    "success": true,
    "registered": true,
    "number": "628123456789",
    "data": {
        "exists": true
    }
}

Get Groups

GET /api/groups

Returns the list of WhatsApp groups from the connected device.

Parameters

Parameter Type Required Description
token string Yes Your Device Token (can be sent as query or JSON body).

Example Request

curl "https://evo.kedanapps.my.id/api/groups?token=your_device_token"

Example Response

{
    "success": true,
    "data": [
        {
            "jid": "1234567890-123456@g.us",
            "subject": "My Group",
            "participants": 42
        }
    ]
}

Send Broadcast

POST /api/send-broadcast

Sends the same text message to multiple WhatsApp numbers at once.

Parameters

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: 08xxxx628xxxx, and non-digit characters are removed.

Example Request

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"
        ]
    }'

Example Response

{
    "success": true,
    "message": "Broadcast processed",
    "results": [
        {
            "number": "628123456789",
            "status": "sent",
            "error": null,
            "code": 200
        }
    ]
}

Save Contact

POST /api/contacts

Saves a contact (name and normalized number) for the authenticated device owner.

Parameters

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).

Example Request

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"
    }'

Example Response

{
    "success": true,
    "message": "Contact saved",
    "data": {
        "id": 1,
        "name": "Customer A",
        "number": "628123456789"
    }
}
© 2026 Evo. All rights reserved.