Build Anything on WhatsApp — With Our Full API
REST API, Webhooks, and n8n integration — connect WhatsApp to your ERP, CRM, hospital system, school platform, or any custom application.
// Send WhatsApp message
POST /api/v1/messages/send
{
"to": "+966501234567",
"type": "text",
"message": "Hello {{name}}!",
"provider": "meta_cloud"
}
// Response
{
"status": "sent",
"message_id": "msg_abc123",
"timestamp": "2026-01-01T10:00:00Z"
}
A Complete Developer Platform
Full REST API
Fully documented API for sending messages, managing contacts, and retrieving campaign statistics.
Webhooks
Receive instant notifications when a message arrives, status changes, or any platform event occurs.
n8n Integration
Connect Rasayily to thousands of apps via n8n — without writing code.
Hospital Systems
Send appointment reminders and lab results via WhatsApp — integrates with any HIS system.
School Systems
Absence alerts, results, and fee notifications — automatic integration with school management systems.
Accounting Systems
Send invoices and payment reminders via WhatsApp directly from your accounting system.
Comprehensive API Documentation
Everything you need to integrate Rasayily with your systems smoothly and securely, with ready-made examples for all languages.
1. Authentication
To connect to our API, you need your Company ID and Security Token.
To obtain them or set your custom Security Token, navigate to:
Dashboard > Companies & Stores > View Company > Edit > Incoming API
Include these values in the Headers of every HTTP request as follows:
Authorization: Bearer {YOUR_TOKEN}X-Company-ID: {COMPANY_ID}
Ready-to-use Postman Collection
Test our API instantly. You can prepare your Postman collection and test sending messages without writing code.
2. Send Message Examples
<?php
$url = "https://rasayily.com/api/messages/send";
$data = [
"phone_number" => "+966500000000",
"message" => "Hello from Rasayily!",
"type" => "text",
"channel" => "whatsapp"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer {YOUR_TOKEN}",
"X-Company-ID: {COMPANY_ID}"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
import json
url = "https://rasayily.com/api/messages/send"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer {YOUR_TOKEN}",
"X-Company-ID": "{COMPANY_ID}"
}
data = {
"phone_number": "+966500000000",
"message": "Hello from Python!",
"type": "text",
"channel": "whatsapp"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
const axios = require('axios');
const url = 'https://rasayily.com/api/messages/send';
const headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN}',
'X-Company-ID': '{COMPANY_ID}'
};
const data = {
phone_number: '+966500000000',
message: 'Hello from Node.js!',
type: 'text',
channel: 'whatsapp'
};
axios.post(url, data, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error));
curl -X POST https://rasayily.com/api/messages/send \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {YOUR_TOKEN}" \
-H "X-Company-ID: {COMPANY_ID}" \
-d '{
"phone_number": "+966500000000",
"message": "Hello from Bash!",
"type": "text",
"channel": "whatsapp"
}'
3. Webhooks & Monitoring
Receive instant updates when a message is delivered or read, and listen for incoming messages directly on your webhook URL. No need to guess if a request succeeded or failed, track everything transparently via our dedicated monitoring screens:
Event Monitor
Track all incoming requests and events from your external systems to our platform. You can trace errors and retry failed requests here easily.
Browse Event MonitorWebhook Logs
Track outgoing requests from our system to service providers or your webhooks (status updates). Extremely useful to know exactly when a message was delivered or read.
Browse Webhook LogsWebhook Payload Example (Incoming Message)
{
"event": "incoming_message",
"timestamp": "2026-06-22T14:00:00+00:00",
"data": {
"sender_phone": "966501234567",
"message_body": "Hello support team!",
"message_type": "text"
}
}
Start Building on Our API Today
Free trial — full API access from day one.