ابدأ من هنا
البدء السريع
أنشئ مفتاحًا، ووثّق نطاقًا، وأرسل رسالة تجريبية مضبوطة بطلب آمن لإعادة المحاولة.
قبل أن تبدأ
Create a SendHQ workspace and keep the dashboard open. You can verify a domain and create an API key before paying. Sending requires an active subscription: there is no free allowance, including to your own address. Choose a plan at pricing.
1. أنشئ مفتاح API
افتح API keys في لوحة التحكم، واختر اسمًا وصفيًا مثل Production، وانسخ المفتاح عند عرضه. خزّنه في مدير أسرار على الخادم. لا تعرض SendHQ القيمة الكاملة مرة أخرى أبدًا.
SENDHQ_API_KEY=re_your_key_here2. أضف نطاق إرسال
Open Domains, add a domain you control, and publish the returned DKIM, SPF, DMARC, and domain verification records. Copy the records into your DNS host and click Verify. On Cloudflare, add them as DNS only (grey cloud). Add the records, then click Verify.
include:amazonses.com) into the existing v=spf1 value.3. انتظر التوثيق
Use the dashboard or POST /domains/:id/verify. DNS can move through pending, checking, and propagating before the sending identity is verified.
4. أرسل رسالة تجريبية مضبوطة
curl https://sendhq.cc/api/v1/emails \
-H "Authorization: Bearer $SENDHQ_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: onboarding-user-42" \
-d '{"from":"Acme <hello@example.com>","to":["owner@example.com"],"subject":"SendHQ is connected","html":"<h1>It works</h1><p>Your first controlled message was accepted.</p>","text":"It works. Your first controlled message was accepted."}'يُعيد الطلب الناجح معرّف رسالة SendHQ، ومعرّف الرسالة لدى المزوّد، ومعرّف سلسلة المحادثة. احفظ معرّف SendHQ مع حدث التطبيق الذي تسبب في إرسال الرسالة.
5. تعامل مع النتائج
قبول طلب API ليس مثل تسليم الرسالة إلى المستلِم. استرجع /emails/:id/events أو استخدم لوحة التحكم لفحص أحداث التسليم والارتداد والشكوى والرفض والفتح والنقر.