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.
WEBHOOK V2 CHO API NÀY
Chỉ đăng ký những sự kiện di động mà quy trình làm việc của bạn cần.
Một điểm đến có thể nhận mọi thứ, hoặc bạn có thể tách biệt hệ thống sản xuất, phân tích và cảnh báo vận hành. Mỗi sự kiện có một tên rõ ràng để ứng dụng của bạn xử lý một cách có thể dự đoán.
email.sentEmail đã được gửi
Một yêu cầu gửi email đã được tạo bởi SMSMobileAPI.
email.receivedEmail đã được nhận
Một hộp thư được kết nối đã nhận một email.
Authentication
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.
Quản lý lịch sử
Xoá lịch sử một cách an toàn: xem thử, xoá, theo tiến trình
Những điểm kết thúc này xóa lịch sử máy phục vụ đã chọn cho bạn API không phải tin nhắn trên điện thoại hay dịch vụ bên ngoài. Họ không cung cấp bảo đảm tài khoản. Hoạt động mới có thể xuất hiện sau khi bị xóa.
Đọc hướng dẫn thử lại và request_id
Theo mặc định, vẫn còn thấy các hồ sơ liên kết hay xử lý. Chỉ dùng include_linked=1 Nếu bạn chấp nhận sự tích hợp đó hoặc xử lý đang diễn ra, có thể sẽ không còn hiệu quả nữa.
request_id hoạt động như thế nào
- Xem thử các đếm có action=previewKhông. request_id là cần thiết và không có hồ sơ nào bị xóa.
- Tạo ra một độc nhất request_id Cho một xóa mới, ví dụ như UUIDHãy để dành nó trước khi gửi action=delete.
- Để tái lưu trữ, hay thời hạn HTTP 202, tái sử dụng API Chìa khóa, điểm kết thúc lịch sử, request_id và include_linked giá trị. Không bao giờ tạo ra một ID mới tự động sau khi gặp lỗi.
- Khi completed=true, chiến dịch đã kết thúc. Sử dụng lại thẻ căn cước của nó đã trả lại cùng kết quả thay vì xóa các hồ sơ mới đến. Dùng ID mới chỉ cho việc dọn dẹp mới có chủ đích.
request_id Xác định thao tác xoá của bạn, không phải cá nhân SMS. Cho phép định dạng: 16–128 ASCII chữ, chữ số, dấu gạch nối hay dấu gạch nối. A UUID tạo ra với mã hóa.randoUUID là thích hợp.
Việc xóa được thực hiện theo từng lô. Nếu nhận HTTP 202 với continue_required=true, hãy gửi lại action=delete sau 3 giây. Không có cron chạy nền. action=status chỉ đọc tiến độ, không tiếp tục xóa, ngay cả khi trả về HTTP 200.
Ví dụ xóa và kiểm tra trạng thái
Thay thế mẫu request_id với giá trị độc đáo của riêng mình trước khi bắt đầu. Những yêu cầu xoá theo đây thay đổi lịch sử tài khoản thật; không phải là xem thử.
curl -X POST "https://api.smsmobileapi.com/delete-history-email/" \
--data-urlencode "apikey=YOUR_API_KEY" \
-d "action=delete" -d "include_linked=0" \
-d "request_id=6d54ac58-41f1-4fbc-9a39-6e6c86089451"curl -X POST "https://api.smsmobileapi.com/delete-history-email/" \
-H "Authorization: Bearer YOUR_OAUTH_ACCESS_TOKEN" \
-d "action=delete" -d "include_linked=0" \
-d "request_id=6d54ac58-41f1-4fbc-9a39-6e6c86089451"curl -G "https://api.smsmobileapi.com/delete-history-email/" \
--data-urlencode "apikey=YOUR_API_KEY" \
-d "action=status" \
-d "request_id=6d54ac58-41f1-4fbc-9a39-6e6c86089451"GET cũng chấp nhận action=preview hay action=delete. POST khuyến khích: tham số URL có thể rò rỉ vào lịch sử trình duyệt và bản ghi máy phục vụ. Không bao giờ đặt địa chỉ URL xoá trong liên kết công cộng, ảnh hoặc tiềnfetch.
Vì POSTGửi tất cả các tham số vào cơ thể mẫu hoặc a JSON đối tượng, không bao giờ trong chuỗi truy vấn. Tham số không rõ bị từ chối; không hỗ trợ ngày tháng hay bộ lọc di động.
Xác thực cho điểm kết thúc lịch sử
Dùng apikey hay một Authorization: Bearer Comment SMSMobileAPI OAuth2Đừng gửi tín hiệu mới hay một thẻ API Chìa khóa là... Bearer - Tôi không biết. Vật trang trí bị bỏ hoang bị từ chối.
Khi phạm vi được đặt, history:read Cho phép xem thử/tatus và history:delete cũng cho phép xóa. Giới hạn cả vật tượng trưng lẫn vật kỷ niệm OAuth Khách áp dụng. Vật lưu giữ di sản mà không có phạm vi, giữ lại quyền truy cập tài khoản đã có của họ.
OAuth2 chọn điều cần thiết API Chìa khóa. Nếu có nhiều phím chính, cũng cung cấp apikey để chọn một phần của tài khoản. Chìa khóa thứ hai không bao giờ cho phép truy cập vào lịch sử chính.
Đọc câu trả lời trước khi tiếp tục
count_delete là số gia tăng được gỡ bỏ bởi chiến dịch này. selected_at_start là sự lựa chọn ban đầu; protected_at_start tính trừ các hồ sơ. Dùng preview.linked_or_processing để đếm hồ sơ liên kết ngay cả khi include_linked=1.
{
"result": {
"error": 0,
"history": "email",
"action": "delete",
"request_id": "6d54ac58-41f1-4fbc-9a39-6e6c86089451",
"status": "processing",
"completed": false,
"count_delete": 100,
"total_before": 250,
"selected_at_start": 200,
"protected_at_start": 50,
"include_linked": 0,
"continue_required": true,
"message": "Repeat GET or POST with the same request_id and include_linked to continue. Status requests do not run deletion."
}
}- 200 có completed=true: xong. Chỉ xem trước 200 hoặc chỉ trả lời trạng thái thôi thì không chứng tỏ là hoàn tất.
- 400 INVALID_REQUEST_ID: kiểm tra định dạng . 404 REQUEST_NOT_FOUNDKhông có thao tác nào cho ID này, API Chìa khóa và lịch sử.
- 401: không hợp lệ hoặc hết hạn. 403: không đủ OAuth Phạm vi hoặc tài khoản trái phép.
- 409 HISTORY_BUSY: một việc dọn dẹp khác đang chạy; tiếp tục nó từ trình khách gốc. 409 INCLUDE_LINKED_CONFLICT: khôi phục lại bản gốc include_linked giá trị.
- 409 OAUTH_ACCOUNT_AMBIGUOUSCung cấp một API Chìa khóa của lời tường thuật này.
- 503 hoặc ngắt quãng mạng: một số mẻ có thể đã hoàn tất. Kiểm tra cấu hình, rồi thử lại với bản gốc request_idKhông tạo một thao tác thay thế tự động.
POST
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.
Parameters
| Tên | Type | Requirement | Description |
|---|---|---|---|
apikey |
string | Required | Your account API key. |
apikeybox |
string | Required | API key of the configured mailbox. |
sender_name |
string | Required | Display name of the sender. |
sender_email |
Required | Sender email address. | |
recipient_email |
Required | Recipient address. | |
mail_subject |
string | Required | Email subject. |
mail_body |
string | Required | Plain text or HTML body. |
allow_self_signed |
yes | no | Required | Set to yes only when the configured mail server uses a trusted internal self-signed certificate. |
unsubscribe |
1 | Tùy chọn | Adds unsubscribe terms and a link. |
email_cc1 |
Tùy chọn | First optional CC recipient. | |
email_cc2 |
Tùy chọn | Second optional CC recipient. | |
email_cc3 |
Tùy chọn | Third optional CC recipient. | |
attachmentBase64 |
base64 | Tùy chọn | Base64-encoded attachment content. |
attachmentBase64_name_1 |
filename | Tùy chọn | Original attachment file name with extension, for example invoice.pdf. Required when attachmentBase64 has a value. |
charset |
string | Tùy chọn | Character set; default UTF-8. |
embeddedImage |
HTTPS URL | Tùy chọn | Image to embed in the email. |
embeddedImage_cid |
string | Tùy chọn | Content-ID referenced from the HTML body. |
format |
string | Tùy chọn | Requested response format. |
reply_name |
string | Tùy chọn | Reply-to display name. |
reply_email |
Tùy chọn | 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." \
--data-urlencode "attachmentBase64=BASE64_FILE_CONTENT" \
-d "attachmentBase64_name_1=invoice.pdf" \
-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.
- If attachmentBase64 is provided, attachmentBase64_name_1 is required and must include the file extension.
- Base64 attachments can make requests large; apply sensible size limits in your application.
GET
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.
Parameters
| Tên | Type | Requirement | Description |
|---|---|---|---|
apikey |
string | Required | Your account API key. |
apikeybox |
string | Required | Mailbox API key. |
mbox |
string | Required | Mailbox folder, for example INBOX. |
start |
integer | Required | 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.
GET
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.
Parameters
| Tên | Type | Requirement | Description |
|---|---|---|---|
apikey |
string | Required | Your account API key. |
apikeybox |
string | Required | Mailbox API key. |
email |
Tùy chọn | 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.
POST · GET
Xóa lịch sử email đã gửi
https://api.smsmobileapi.com/delete-history-email/Clears đã gửi bản ghi email cho việc này API Chìa khóa ở hộp thư. Nó không xóa tin nhắn trong hộp thư. Không apikeybox là yêu cầu.
Dùng ô xem thử trước, kiểm tra lại các số, rồi yêu cầu xóa bỏ rõ ràng. Điều này xóa toàn bộ lịch sử đã chọn cho API Chìa khóa, không hẹn hò, không điện thoại hay bộ lọc tin nhắn.
Parameters
| Tên | Type | Requirement | Description |
|---|---|---|---|
apikey |
string | Tùy chọn | Yêu cầu không OAuth2Với OAuth2, tùy chọn chọn API Chìa khóa của cùng một tài khoản. |
action |
preview | delete | status | Tùy chọn | preview đếm mà không xóa; delete bắt đầu hoặc tiếp tục xóa; status chỉ xem tiến độ. API mặc định dùng delete; công cụ thử này mặc định dùng preview. |
include_linked |
0 | 1 | Tùy chọn | Mặc định 0: giữ hồ sơ liên kết hay xử lý. Đặt 1 để bao gồm cả chúng, với nguy cơ phá vỡ sự liên kết. Giữ giá trị này không thay đổi khi tiếp tục xoá. |
request_id |
string | Tùy chọn | Bắt buộc với delete và status, không bắt buộc với preview. Dùng 16–128 chữ cái ASCII, chữ số, dấu gạch ngang (-) hoặc gạch dưới (_). Tạo một ID duy nhất cho mỗi lần xóa mới và giữ nguyên ID đó khi thử lại. Đây không phải ID tin nhắn hay khóa API. |
Request example
curl -X POST "https://api.smsmobileapi.com/delete-history-email/" \
--data-urlencode "apikey=YOUR_API_KEY" \
-d "action=preview" -d "include_linked=0"
Ví dụ xóa và kiểm tra trạng thái
Thay thế mẫu request_id với giá trị độc đáo của riêng mình trước khi bắt đầu. Những yêu cầu xoá theo đây thay đổi lịch sử tài khoản thật; không phải là xem thử.
curl -X POST "https://api.smsmobileapi.com/delete-history-email/" \
--data-urlencode "apikey=YOUR_API_KEY" \
-d "action=delete" -d "include_linked=0" \
-d "request_id=6d54ac58-41f1-4fbc-9a39-6e6c86089451"curl -X POST "https://api.smsmobileapi.com/delete-history-email/" \
-H "Authorization: Bearer YOUR_OAUTH_ACCESS_TOKEN" \
-d "action=delete" -d "include_linked=0" \
-d "request_id=6d54ac58-41f1-4fbc-9a39-6e6c86089451"curl -G "https://api.smsmobileapi.com/delete-history-email/" \
--data-urlencode "apikey=YOUR_API_KEY" \
-d "action=status" \
-d "request_id=6d54ac58-41f1-4fbc-9a39-6e6c86089451"Example response
{
"result": {
"error": 0,
"history": "email",
"action": "preview",
"total": 120,
"simple": 100,
"linked_or_processing": 20,
"selected": 100,
"include_linked": 0,
"operation_in_progress": false,
"active_include_linked": null
}
}
Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.
Connect key ↑- Ví dụ trên là xem trước, không phải xoá. Số lượng được mô tả; lựa chọn dứt khoát được cố định khi việc xoá bắt đầu.
- include_linked=1 có thể phá vỡ GHL. ZapierXác định liên kết hoặc theo dõi giao hàng. Nó không bao giờ vượt qua quyền sở hữu tài khoản hay kiểm tra tính toàn vẹn của tài khoản.
Troubleshooting
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 | Code | 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. |
Need help?
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.
Official mobile application
The secure bridge between your phone, dashboard and API.
SMS and call operations pass through the official SMSMobileAPI app installed on your connected phone. The app securely pairs the device with your account, synchronizes authorized events and links the mobile network to the dashboard and REST API.
- Signed releases distributed through the official Google Play and Apple App Store listings
- Google and Apple platform review, signing and distribution controls
- Secure device pairing, HTTPS transport and authenticated API access
- Only the permissions required for the mobile features you enable


