یک پیام پوش نوتیفیکیشن را به همهٔ کاربران عضوشدهٔ سرویس (website_id) ارسال میکند — یک ارسال
انبوه که یک کمپین (campaign_id) میسازد، بر خلاف ارسال به توکن خاص که هیچ کمپینی نمیسازد.
درخواست باید multipart/form-data باشد.
احراز هویت
pushApiKeyAuthکلید API را در هدر apiKey بفرستید (نه Authorization: Bearer سرویسهای پیامک). طبق راهنمای
دریافت کلید API، این همان کلید «api key پیامک و پوشنوتیفیکیشن» در تب «api key»
پنل توسعهدهندگان است — پیامک و پوش یک کلید مشترک دارند.
apiKey: YOUR_API_KEYکلید خود را کجا پیدا کنم؟
کلید API را از پنل کاربری خود دریافت کنید، آن را در یک متغیر محیطی روی سرور نگه دارید و هرگز در کد سمت کاربر (مرورگر یا اپلیکیشن موبایل) قرار ندهید.
بدنهٔ درخواست
multipart/form-dataالزامیفرم چندبخشی، مشابه ارسال به توکن خاص ولی بدون `tokens[]`.
| نام | نوع | الزامی | توضیح |
|---|---|---|---|
website_id* | string | الزامی | نمونه 45100 |
ttl | string | اختیاری | نمونه 24 |
datetime | string· date-time | اختیاری | زمان ارسال. نام این فیلد در صفحهٔ منبع نمونه 2025-07-21T21:04:45+03:30قالبdate-time |
message.title* | string | الزامی | نمونه transactional sample |
message.body* | string | الزامی | نمونه this is the body of transactional sample |
message.icon | string· binary | اختیاری | قالب binary |
message.image | string· binary | اختیاری | قالب binary |
message.notification_click.click_url | string· uri | اختیاری | نمونه https://google.comقالبuri |
message.button_1.title | string | اختیاری | نمونه Button One |
message.button_1.click_url | string· uri | اختیاری | نمونه https://najva.comقالبuri |
نمونهٔ درخواست
{ "website_id": "45100", "ttl": "24", "datetime": "2025-07-21T21:04:45+03:30", "message.title": "transactional sample", "message.body": "this is the body of transactional sample", "message.icon": "string", "message.image": "string", "message.notification_click.click_url": "https://google.com", "message.button_1.title": "Button One", "message.button_1.click_url": "https://najva.com"}پاسخها
ساختار پاسخ
| نام | نوع | الزامی | توضیح |
|---|---|---|---|
Message | string | اختیاری | نمونه Request approved. |
Entries | object | اختیاری | |
campaign_id | integer | اختیاری | نمونه 17834 |
execution_id | integer | اختیاری | نمونه 19937 |
execution_status | string | اختیاری | نمونه Scheduled |
نمونهٔ پاسخ
{ "Message": "Request approved.", "Entries": { "campaign_id": 17834, "execution_id": 19937, "execution_status": "Scheduled" }}