Campaigns

POST /v1/campaigns/preview

Render a template with example values.

جميع نقاط نهاية Campaigns

المصادقة

أرسل مفتاح واجهة برمجة التطبيقات (API) كرمز حامل (bearer token). لا يحدد نقطة النهاية هذه إذنًا محددًا في المواصفات، لذا امنح مفتاحك الحد الأدنى الذي محتاجه وتحقق من الاستجابة بدلاً من الافتراض.

حيث يتم إدخال معرف مؤسستك

تقبل هذه نقطة النهاية org_id حقلًا في نص JSON.

معرف مؤسستك موجود على شاشة مفاتيح واجهة برمجة التطبيقات (API) في لوحة تحكمك، بجوار المفتاح نفسه. وهو نفس المعرف في كل طلب تجريه.

جربه الآن

استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.

curl -X POST https://api.zinndigital.com/v1/campaigns/preview \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string>, "subject": <string>, "body": <string> }'

هل سجلت الدخول؟ تقوم وحدة تحكم واجهة برمجة التطبيقات في لوحة التحكم الخاصة بك بربط معرف مؤسستك الحقيقي ومفتاحك الخاص، وتنفذ الطلب مقابل واجهة برمجة التطبيقات المباشرة لتتمكن من رؤية الاستجابة الفعلية. افتح هذه النهاية الطرفية في وحدة تحكم API

التفاصيل

Rendered by the engine, through the same renderer the send uses. A preview computed in the client is a second implementation of the substitution rules, and the first time it disagrees an author ships copy they never actually saw.

جسم الطلب

الاسمالنوعمطلوبما هو هذا
fallbacksbooleanلاPreview only. Render with NO merge values, so every tag falls back and the author reads what a customer we know nothing about reads. It exists because a normal preview substitut…
namestringنعم
subjectstringنعم
bodystringنعم
purposestring<marketing, transactional>لا
channelsstring<email, in_app, slack, telegram>[]لا
org_idstringلا

الاستجابة

الاسمالنوعمطلوبما هو هذا
fallbacksbooleanلاWhether this was rendered with fallbacks only, echoed so the composer can label the panel honestly.
subjectstringنعم
body_textstringنعم
body_htmlstringنعم
headersobjectنعمRFC 8058 one-click unsubscribe headers on a marketing message; empty otherwise.

الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه

401 · 403 · 422