Skip to main content

🚀 Quick Start Guide

Welcome to the Wagy API! This guide will help you send your first WhatsApp message using the Wagy API in less than 5 minutes.

1. Preparation​

Before starting, ensure you have:

  1. An account on the Wagy Panel.
  2. Created a Device and ensured its status is Connected (scanned the QR code).
  3. Obtained your Device ID and API Key (Token) from your device settings page.

2. Authentication​

All requests to the Wagy API use the Bearer Token method. You must include the following headers in every request:

Authorization: Bearer YOUR_DEVICE_API_KEY
Content-Type: application/json

3. Send Your First Message​

Use the /send endpoint to send a simple text message. Replace DEVICE_ID with your device ID and YOUR_DEVICE_API_KEY with your token.

curl -X POST https://api.wagy.web.id/api/v1/DEVICE_ID_ANDA/send \
-H "Authorization: Bearer YOUR_DEVICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "628123456789",
"message": "Hello! This is my first message via the Wagy API 🚀"
}'

Response Result (Success):

{
"status": "success",
"data": {
"message_id": 1024,
"status": "PENDING",
"quota_type": "pro",
"remaining": 499
},
"message": "Message queued"
}

4. Receiving Messages (Webhook)​

Wagy uses an Event-Based Payload architecture. Every time an incoming message is received, Wagy will send a POST request to your Webhook URL with the following structure:

{
"event": "message.received",
"source": "whatsapp",
"data": {
"id": 1001,
"device_id": "DVC-123",
"owner_jid": "62812345678@s.whatsapp.net",
"content": {
"pn_jid": "6281299887766@s.whatsapp.net",
"lid_jid": "203998263034091@lid",
"content": "Hello admin, I would like to ask...",
"message_id": "ABC123XYZ",
"timestamp": "2026-05-10T08:30:00Z",
"is_edit": false
},
"created_at": "2026-05-10T08:30:05Z"
}
}

Webhook Security (Signature)​

Every request from Wagy includes an X-Wagy-Signature header. This header is an HMAC-SHA256 hash of the entire request body using your Webhook Secret.

Signature Verification

It is highly recommended to always validate this signature to ensure the request genuinely originated from Wagy's servers and not from an unauthorized third party.

5. What's Next?​

After successfully sending a message, you can explore other features: