Bắt đầu từ đây
Your first request in four steps
Configure a mailbox in the dashboard.
Copy both apikey and the mailbox apikeybox.
Send a simple text email first.
Add attachments or embedded images only after the basic request works.
Xác thực
Keep credentials on your server
Email endpoints require the account apikey and the mailbox-specific apikeybox. Store both credentials server-side and mask them in application logs.
BƯU KIỆN
Send an email
https://api.smsmobileapi.com/sendemail/Sends plain-text or HTML email through a configured mailbox.
Use it for transactional or operational email from your application.
Các tham số
| Tên | Kiểu | Requirement | Sự miêu tả |
|---|---|---|---|
apikey |
sợi dây | Yêu cầu | Your account API key. |
apikeybox |
sợi dây | Yêu cầu | API key of the configured mailbox. |
sender_name |
sợi dây | Yêu cầu | Display name of the sender. |
sender_email |
Yêu cầu | Sender email address. | |
recipient_email |
Yêu cầu | Recipient address. | |
mail_subject |
sợi dây | Yêu cầu | Email subject. |
mail_body |
sợi dây | Yêu cầu | Plain text or HTML body. |
allow_self_signed |
yes | no | Yêu cầu | Set to yes only when the configured mail server uses a trusted internal self-signed certificate. |
unsubscribe |
1 | Không bắt buộc | Adds unsubscribe terms and a link. |
email_cc1 |
Không bắt buộc | First optional CC recipient. | |
email_cc2 |
Không bắt buộc | Second optional CC recipient. | |
email_cc3 |
Không bắt buộc | Third optional CC recipient. | |
attachmentBase64 |
base64 | Không bắt buộc | Nội dung đính kèm được mã hóa theo chuẩn Base64. |
charset |
sợi dây | Không bắt buộc | Character set; default UTF-8. |
embeddedImage |
HTTPS URL | Không bắt buộc | Image to embed in the email. |
embeddedImage_cid |
sợi dây | Không bắt buộc | Content-ID referenced from the HTML body. |
format |
sợi dây | Không bắt buộc | Requested response format. |
reply_name |
sợi dây | Không bắt buộc | Reply-to display name. |
reply_email |
Không bắt buộc | Reply-to address. |
Request example
curl -X POST "https://api.smsmobileapi.com/sendemail/" \
-d "apikey=YOUR_API_KEY" \
-d "apikeybox=YOUR_MAILBOX_KEY" \
--data-urlencode "sender_name=Example Team" \
-d "sender_email=team@example.com" \
-d "recipient_email=customer@example.net" \
--data-urlencode "mail_subject=Order confirmation" \
--data-urlencode "mail_body=Your order has been confirmed." \
-d "allow_self_signed=no"
Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.
Connect key ↑- Prefer POST because email bodies can be long.
- Base64 attachments can make requests large; apply sensible size limits in your application.
LẤY
Retrieve emails
https://api.smsmobileapi.com/getemail/Retrieves messages from a configured mailbox folder.
Use it to synchronize inbound email into a help desk or application workflow.
Các tham số
| Tên | Kiểu | Requirement | Sự miêu tả |
|---|---|---|---|
apikey |
sợi dây | Yêu cầu | Your account API key. |
apikeybox |
sợi dây | Yêu cầu | Mailbox API key. |
mbox |
sợi dây | Yêu cầu | Mailbox folder, for example INBOX. |
start |
integer | Yêu cầu | Starting index; use 0 for the first page. |
Request example
curl "https://api.smsmobileapi.com/getemail/?apikey=YOUR_API_KEY&apikeybox=YOUR_MAILBOX_KEY&mbox=INBOX&start=0"
Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.
Connect key ↑- Responses include available subject, sender, recipient, body, timestamp and attachment details.
LẤY
Check unsubscribed contacts
https://api.smsmobileapi.com/email/unsubscribed/Checks unsubscribe records generated by emails sent through the platform.
Use it before sending campaigns and when synchronizing suppression lists.
Các tham số
| Tên | Kiểu | Requirement | Sự miêu tả |
|---|---|---|---|
apikey |
sợi dây | Yêu cầu | Your account API key. |
apikeybox |
sợi dây | Yêu cầu | Mailbox API key. |
email |
Không bắt buộc | Filter one contact. An empty result means no unsubscribe record was found. |
Request example
curl "https://api.smsmobileapi.com/email/unsubscribed/?apikey=YOUR_API_KEY&apikeybox=YOUR_MAILBOX_KEY&email=customer@example.net"
Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.
Connect key ↑- Keep your own recipient database synchronized with unsubscribe results.
- You remain responsible for applicable anti-spam and privacy rules.
Xử lý sự cố
Errors and safe retries
Read the HTTP status and the JSON error field before retrying. Do not retry validation or authentication failures without correcting the request first.
| HTTP | Bộ mã | What to do |
|---|---|---|
| 400 | missing_parameter | A required parameter is empty or absent. Check the parameter table for the endpoint. |
| 403 | invalid_apikey | The API key is unknown, expired or not authorized for the requested feature. |
| 429 | too_many_requests | Requests are arriving too quickly. Wait, then retry with exponential backoff. |
| 500 | server_error | The service could not complete the request. Keep the response and contact support if it persists. |
Bạn cần trợ giúp?
Bring the request context—not your secrets.
Share the endpoint, timestamp, HTTP status and sanitized response. Never include API keys, tokens or private message content.
