Docs الوثائق Overview / نظرة عامة

Watsal Developer API واجهة وتسال للمطورين

Build powerful WhatsApp messaging experiences. Programmatically clear checks, send verifications, and manage customer conversations with a developer-friendly REST API. أنشئ تجارب مراسلة واتساب قوية. قم بتأكيد المعاملات، وإرسال أكواد التحقق، وإدارة محادثات العملاء بواجهة REST سهلة للمطورين.

Getting Started البدء

1. Get your API Key 1. احصل على مفتاح الـ API الخاص بك

Generate a secure API key from your dashboard settings to authenticate your requests. أنشئ مفتاح API آمنًا من إعدادات لوحة التحكم لمصادقة طلباتك.

2. Choose an Endpoint 2. اختر نقطة النهاية

Select the right endpoint for your needs, whether it's OTP verification or transactional alerts. اختر نقطة النهاية المناسبة لاحتياجاتك سواء للتحقق بالرمز أو للتنبيهات.

3. Make a Request 3. أرسل طلبًا

Send a request using cURL or your favorite language. JSON is supported everywhere. أرسل الطلب باستخدام cURL أو لغتك المفضلة. يتم دعم JSON في كل مكان.

Environments & Base URLs البيئات وروابط الأساس

Production البيئة الإنتاجية

Live Data بيانات حقيقية

Use for live customers and transactions. للمعاملات الحقيقية مع العملاء.

https://api.watsal.com

Sandbox بيئة الاختبار

Test Data بيانات تجريبية

Use for development and testing. للتطوير والاختبارات.

https://api.sandbox.watsal.com

Rate Limits حدود المعدل

We apply rate limits to keep the platform stable. نطبق حدودًا للطلبات للحفاظ على استقرار المنصة.

  • Default Limit: الحد الافتراضي: 100 requests per minute per key. 100 طلب في الدقيقة لكل مفتاح.
  • Use headers استخدم الترويسات X-RateLimit-Limit and و X-RateLimit-Remaining to monitor usage. لمتابعة الاستهلاك.
  • On عند الحصول على 429 Too Many Requests , implement exponential backoff. ، استخدم تأخيرًا تدريجيًا (Exponential Backoff).

Standard Response Format تنسيق الاستجابة القياسي

Success Response استجابة ناجحة
{
  "success": true,
  "data": {
    "id": "msg_123456",
    "status": "sent"
  },
  "meta": {
    "request_id": "req_abc789"
  }
}
                
Error Response استجابة خطأ
{
  "success": false,
  "error": {
    "code": "validation_error",
    "message": "The phone number is invalid."
  }
}