توثيق API
Send WhatsApp messages from your app using the OraxSender REST API.
Base URL
https://www.oraxsender.com/api
Authentication
Every request needs your account Auth Key and (for sending) an App Key.
- authkey — From your panel: Settings → Authentication Key
- appkey — From your panel: My Apps → copy the app key linked to a connected device
- device_id — Device UUID (for QR / session endpoints)
POST /create/message
Send a text message, a media message (public file URL), or a saved template.
https://www.oraxsender.com/api/create/message
| Field | مطلوب | الوصف |
|---|---|---|
| appkey | نعم | App Key of a device that is connected |
| authkey | نعم | Your account Auth Key |
| to | نعم | Recipient number in international format, digits only (example: 9665XXXXXXXX) |
| message | * | Message text (required if template_id is empty) |
| template_id | * | Template UUID (required if message is empty) |
| file | لا | Public URL of an image or document (jpg, png, webp, pdf, docx, xlsx, csv, txt) |
| variables | لا | Template variables object, e.g. variables[name]=John |
* Provide either message or template_id.
Success response example
{
"message_status": "Success",
"connected": true,
"message": "Success was send",
"data": {
"from": "9665XXXXXXXX",
"to": "9665YYYYYYYY",
"status_code": 200
}
}
POST /device/create
Create a new device and app pair. Then scan QR with /qr to connect WhatsApp.
https://www.oraxsender.com/api/device/create
| Field | مطلوب | الوصف |
|---|---|---|
| authkey | نعم | Your account Auth Key |
| device_name | لا | Display name for the device |
| app_title | لا | Display name for the app |
{
"success": true,
"device_id": "uuid-here",
"appkey": "app-key-here",
"authkey": "your-authkey",
"connected": false
}
POST /qr
Request a QR code for a device so you can link WhatsApp.
https://www.oraxsender.com/api/qr
| Field | مطلوب | الوصف |
|---|---|---|
| authkey | نعم | Your account Auth Key |
| device_id | نعم | Device UUID from /device/create or My Devices |
POST /checkSession
Check whether the device WhatsApp session is connected.
https://www.oraxsender.com/api/checkSession
| Field | مطلوب | الوصف |
|---|---|---|
| authkey | نعم | Your account Auth Key |
| device_id | نعم | Device UUID |
POST /uploadmedia
Upload a media file and get a public URL you can pass as file when sending.
https://www.oraxsender.com/api/uploadmedia
| Field | مطلوب | الوصف |
|---|---|---|
| authkey | نعم | Your account Auth Key |
| appkey | نعم | App Key (or legacy deviceid) |
| docs | نعم | Multipart file field |
Code examples
Replace YOUR_APP_KEY, YOUR_AUTH_KEY and the phone number with your values.
curl --location --request POST 'https://www.oraxsender.com/api/create/message' \
--form 'appkey="YOUR_APP_KEY"' \
--form 'authkey="YOUR_AUTH_KEY"' \
--form 'to="9665XXXXXXXX"' \
--form 'message="Hello from OraxSender"'
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.oraxsender.com/api/create/message',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => [
'appkey' => 'YOUR_APP_KEY',
'authkey' => 'YOUR_AUTH_KEY',
'to' => '9665XXXXXXXX',
'message' => 'Hello from OraxSender',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
const FormData = require('form-data');
const axios = require('axios');
const form = new FormData();
form.append('appkey', 'YOUR_APP_KEY');
form.append('authkey', 'YOUR_AUTH_KEY');
form.append('to', '9665XXXXXXXX');
form.append('message', 'Hello from OraxSender');
const res = await axios.post('https://www.oraxsender.com/api/create/message', form, {
headers: form.getHeaders(),
});
console.log(res.data);
import requests
r = requests.post('https://www.oraxsender.com/api/create/message', data={
'appkey': 'YOUR_APP_KEY',
'authkey': 'YOUR_AUTH_KEY',
'to': '9665XXXXXXXX',
'message': 'Hello from OraxSender',
})
print(r.json())
Common errors
| رسالة | What to do |
|---|---|
| Invalid Auth and AppKey | Check appkey and authkey. Device must be connected. |
| Maximum Monthly Messages Limit Exceeded | Upgrade your plan or wait for the next billing cycle. |
| Template Not Found | Use a valid template UUID from your account. |
| Validation errors | Required fields missing or phone format invalid. |
After login you can also open My Apps → Integration for examples filled with your keys. تسجيل الدخول