ارسال پیام متنی
ارسال پیام متنی به مخاطب، گروه یا کانال. سازگار با POST /messages/text در whapi.cloud.
quoted: پاسخ به یک پیامedit: ویرایش پیامی که قبلاً فرستادهاید (تا ۱۵ دقیقه)typing_time: نمایش «در حال نوشتن…» تا ۶۰ ثانیه قبل از ارسالno_link_preview / wide_link_preview: کنترل پیشنمایش لینکmentions: منشن کاربران یا گروههااحراز هویت
بدنه درخواست application/json، multipart/form-data
پاسخها
200پیام ارسال شد
sentbooleanالزامیپیام ارسال شد
messageMessageفیلدهای Message
idstringالزامیشناسه پیام
typestringالزامینوع پیام
پیشفرض: "text"مقادیر:textimagevideogifshortaudiovoicedocumentlink_previewlocationlive_locationcontactcontact_liststickerpollgroup_inviteactionsystemunknownsubtypestringزیرنوع پیام
chat_idstringالزامیشناسه چت
chat_namestringنام چت
fromstringشناسه واتساپ فرستنده
from_mebooleanالزامیپیام از طرف همین حساب است
from_namestringنام نمایشی فرستنده
sourcestringمنبع پیام
مقادیر:webmobileapisystembusiness_apiunknowntimestampnumberالزامیزمان پیام (unix timestamp ثانیه)
statusstringوضعیت پیام
مقادیر:failedpendingsentdeliveredreadplayeddeletedtextTextContentفیلدهای TextContent
bodystringالزامیمتن پیام
view_onceboolean
imageMediaContentفیلدهای MediaContent
idstringالزامیشناسه رسانه (برای دانلود: GET /media/{id})
mime_typestringالزامیfile_sizenumberالزامیحجم فایل (بایت)
file_namestringsha256stringSHA256 فایل (base64)
captionstringpreviewstringتصویر کوچک (base64)
widthnumberheightnumbersecondsnumberمدت (ثانیه) برای صوت و ویدیو
page_countnumberتعداد صفحهها (سند)
animatedbooleanاستیکر متحرک
view_onceboolean
videoMediaContentفیلدهای MediaContent
idstringالزامیشناسه رسانه (برای دانلود: GET /media/{id})
mime_typestringالزامیfile_sizenumberالزامیحجم فایل (بایت)
file_namestringsha256stringSHA256 فایل (base64)
captionstringpreviewstringتصویر کوچک (base64)
widthnumberheightnumbersecondsnumberمدت (ثانیه) برای صوت و ویدیو
page_countnumberتعداد صفحهها (سند)
animatedbooleanاستیکر متحرک
view_onceboolean
gifMediaContentفیلدهای MediaContent
idstringالزامیشناسه رسانه (برای دانلود: GET /media/{id})
mime_typestringالزامیfile_sizenumberالزامیحجم فایل (بایت)
file_namestringsha256stringSHA256 فایل (base64)
captionstringpreviewstringتصویر کوچک (base64)
widthnumberheightnumbersecondsnumberمدت (ثانیه) برای صوت و ویدیو
page_countnumberتعداد صفحهها (سند)
animatedbooleanاستیکر متحرک
view_onceboolean
shortMediaContentفیلدهای MediaContent
idstringالزامیشناسه رسانه (برای دانلود: GET /media/{id})
mime_typestringالزامیfile_sizenumberالزامیحجم فایل (بایت)
file_namestringsha256stringSHA256 فایل (base64)
captionstringpreviewstringتصویر کوچک (base64)
widthnumberheightnumbersecondsnumberمدت (ثانیه) برای صوت و ویدیو
page_countnumberتعداد صفحهها (سند)
animatedbooleanاستیکر متحرک
view_onceboolean
audioMediaContentفیلدهای MediaContent
idstringالزامیشناسه رسانه (برای دانلود: GET /media/{id})
mime_typestringالزامیfile_sizenumberالزامیحجم فایل (بایت)
file_namestringsha256stringSHA256 فایل (base64)
captionstringpreviewstringتصویر کوچک (base64)
widthnumberheightnumbersecondsnumberمدت (ثانیه) برای صوت و ویدیو
page_countnumberتعداد صفحهها (سند)
animatedbooleanاستیکر متحرک
view_onceboolean
voiceMediaContentفیلدهای MediaContent
idstringالزامیشناسه رسانه (برای دانلود: GET /media/{id})
mime_typestringالزامیfile_sizenumberالزامیحجم فایل (بایت)
file_namestringsha256stringSHA256 فایل (base64)
captionstringpreviewstringتصویر کوچک (base64)
widthnumberheightnumbersecondsnumberمدت (ثانیه) برای صوت و ویدیو
page_countnumberتعداد صفحهها (سند)
animatedbooleanاستیکر متحرک
view_onceboolean
documentMediaContentفیلدهای MediaContent
idstringالزامیشناسه رسانه (برای دانلود: GET /media/{id})
mime_typestringالزامیfile_sizenumberالزامیحجم فایل (بایت)
file_namestringsha256stringSHA256 فایل (base64)
captionstringpreviewstringتصویر کوچک (base64)
widthnumberheightnumbersecondsnumberمدت (ثانیه) برای صوت و ویدیو
page_countnumberتعداد صفحهها (سند)
animatedbooleanاستیکر متحرک
view_onceboolean
stickerMediaContentفیلدهای MediaContent
idstringالزامیشناسه رسانه (برای دانلود: GET /media/{id})
mime_typestringالزامیfile_sizenumberالزامیحجم فایل (بایت)
file_namestringsha256stringSHA256 فایل (base64)
captionstringpreviewstringتصویر کوچک (base64)
widthnumberheightnumbersecondsnumberمدت (ثانیه) برای صوت و ویدیو
page_countnumberتعداد صفحهها (سند)
animatedbooleanاستیکر متحرک
view_onceboolean
link_previewLinkPreviewفیلدهای LinkPreview
bodystringالزامیمتن کامل پیام
urlstringtitlestringdescriptionstringcanonicalstringpreviewstringتصویر پیشنمایش (base64)
locationLocationفیلدهای Location
latitudenumberالزامیlongitudenumberالزامیnamestringaddressstringurlstring
contactContactCardفیلدهای ContactCard
namestringالزامیvcardstringالزامی
pollPollفیلدهای Poll
titlestringالزامیoptionsarray of stringالزامیvote_limitnumberحداکثر گزینه قابل انتخاب
actionMessageActionفیلدهای MessageAction
- مقادیر:
typestringالزامیeditededitdeletereactionephemeralvote targetstringشناسه پیام هدف
emojistringephemeralnumber- مقادیر:
edited_typestringtextimagevideogifshortaudiovoicedocumentlink_previewlocationlive_locationcontactcontact_liststickerpollgroup_inviteactionsystemunknown edited_contentobject
contextMessageContextفیلدهای MessageContext
forwardedbooleanپیام فوروارد شده است
forwarding_scorenumberتعداد دفعات فوروارد
mentionsarray of stringکاربران منشنشده
quoted_idstringشناسه پیام نقلقولشده
quoted_typestringنوع پیام نقلقولشده
مقادیر:textimagevideogifshortaudiovoicedocumentlink_previewlocationlive_locationcontactcontact_liststickerpollgroup_inviteactionsystemunknownquoted_contentobjectمحتوای پیام نقلقولشده
quoted_authorstringنویسنده پیام نقلقولشده
ephemeralnumberمدت پیامهای ناپدیدشونده (ثانیه)
400پارامترهای درخواست نادرست است
errorErrorالزامیفیلدهای Error
codenumberالزامیکد خطا (همان کد وضعیت HTTP)
messagestringالزامیپیام خطا
detailsstringجزئیات خطا
401توکن نامعتبر است یا کانال به واتساپ متصل نیست
errorErrorالزامیفیلدهای Error
codenumberالزامیکد خطا (همان کد وضعیت HTTP)
messagestringالزامیپیام خطا
detailsstringجزئیات خطا
403ارسال به این گروه/گیرنده مجاز نیست
errorErrorالزامیفیلدهای Error
codenumberالزامیکد خطا (همان کد وضعیت HTTP)
messagestringالزامیپیام خطا
detailsstringجزئیات خطا
404پیام quoted یا edit پیدا نشد
errorErrorالزامیفیلدهای Error
codenumberالزامیکد خطا (همان کد وضعیت HTTP)
messagestringالزامیپیام خطا
detailsstringجزئیات خطا
413حجم درخواست بیش از حد مجاز است
errorErrorالزامیفیلدهای Error
codenumberالزامیکد خطا (همان کد وضعیت HTTP)
messagestringالزامیپیام خطا
detailsstringجزئیات خطا
429تعداد درخواستها بیش از حد مجاز است
errorErrorالزامیفیلدهای Error
codenumberالزامیکد خطا (همان کد وضعیت HTTP)
messagestringالزامیپیام خطا
detailsstringجزئیات خطا
500خطای داخلی
errorErrorالزامیفیلدهای Error
codenumberالزامیکد خطا (همان کد وضعیت HTTP)
messagestringالزامیپیام خطا
detailsstringجزئیات خطا