مرجع API
پیشنویسها و پیوستها
جریانهای نوشتن ایمیل را با ذخیرهسازی خصوصی پیوستها بسازید.
هیچ عملیاتی با این فیلتر مطابقت ندارد.
POST
کلید API/draftsایجاد پیشنویس ایمیل
ایجاد پیشنویس ایمیل
curl https://sendhq.cc/api/v1/drafts \
-X POST \
-H "Authorization: Bearer $SENDHQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"hello@example.com","to":["customer@example.net"],"subject":"Hello"}'{
"id": "dr_…",
"attachments": []
}GET
کلید API/draftsفهرست پیشنویسهای ایمیل
فهرست پیشنویسهای ایمیل
curl https://sendhq.cc/api/v1/drafts \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"data": [],
"count": 0
}GET
کلید API/drafts/:idبازیابی یک پیشنویس و پیوستهای آن
بازیابی یک پیشنویس و پیوستهای آن
curl https://sendhq.cc/api/v1/drafts/id_value \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"id": "dr_…",
"attachments": []
}PUT
کلید API/drafts/:idجایگزینی محتوای پیشنویس
جایگزینی محتوای پیشنویس
curl https://sendhq.cc/api/v1/drafts/id_value \
-X PUT \
-H "Authorization: Bearer $SENDHQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"hello@example.com","to":["customer@example.net"],"subject":"Updated subject","text":"Updated body"}'{
"id": "dr_…"
}DELETE
کلید API/drafts/:idحذف پیشنویس
حذف پیشنویس
curl https://sendhq.cc/api/v1/drafts/id_value \
-X DELETE \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"ok": true
}POST
کلید API/drafts/:id/attachmentsبارگذاری پیوست روی پیشنویس
بایتهای خام فایل را بارگذاری کنید. Content-Type و X-Filename را تنظیم کنید. هر پیام حداکثر میتواند 10 فایل و در مجموع 10 MB داشته باشد.
curl https://sendhq.cc/api/v1/drafts/id_value/attachments \
-X POST \
-H "Authorization: Bearer $SENDHQ_API_KEY" \
-H "Content-Type: application/pdf" \
-H "X-Filename: invoice.pdf" \
--data-binary @invoice.pdf{
"id": "att_…",
"filename": "invoice.pdf",
"sizeBytes": 48231,
"available": true
}GET
کلید API/attachments/:idدانلود پیوست خصوصی
دانلود پیوست خصوصی
curl https://sendhq.cc/api/v1/attachments/id_value \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"DELETE
کلید API/attachments/:idحذف پیوست خصوصی
حذف پیوست خصوصی
curl https://sendhq.cc/api/v1/attachments/id_value \
-X DELETE \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"ok": true
}GET
کلید API/sending-identitiesفهرست هویتهای فرستنده تأییدشده
فهرست هویتهای فرستنده تأییدشده
curl https://sendhq.cc/api/v1/sending-identities \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"domains": [],
"addresses": [],
"localParts": []
}