Ваші SMS надсилаються з вашого телефону.Дізнайтеся, як це працює
ПЛАТФОРМАAPI-перша архітектураБезпечний пристрій для парівидимість доставкиБагатопристосувальні елементиВиконується документація
Розробник hub/Електронна пошта API

MAIL · 4 документовані операції

Email API documentation

Send email without sharing mailbox passwords, retrieve mailbox content and check unsubscribe status.

Connected email and messaging channels synchronized through the cloud
REST base URLhttps://api.smsmobileapi.com

JSON responses · HTTPS required · UTF-8

Connect your API key

Connect once, then test endpoints across SMS, calls, notifications, WhatsApp and email.

Почати

Your first request in four steps

1

Configure a mailbox in the dashboard.

2

Copy both apikey and the mailbox apikeybox.

3

Send a simple text email first.

4

Add attachments or embedded images only after the basic request works.

WEBHOOK V2 ДЛЯ ЦЬОГО API

Підписуйтесь лише на ті мобільні події, які потрібні вашому робочому процесу.

2 типів подій

Один пункт призначення може отримувати все, або ви можете розділити виробничі системи, аналітику та операційні сповіщення. Кожна подія має точну назву, щоб ваш додаток міг обробляти її передбачувано.

email.sent

Електронний лист надіслано

Запит на надсилання електронного листа створено SMSMobileAPI.

email.received

Електронний лист отримано

Підключена поштова скринька отримала електронний лист.

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.

Історія управління

Очистити історію безпечно: попередній перегляд, видалення, слідувати прогрес

Ці кінцеві точки очистити історію виділеного сервера для ключа API, не повідомлення на телефонах або зовнішніх сервісах. Не надайте скидання рахунку. Після видалення може з'явитися нова активність.

Читати посібник з дерматизації request_id
Захист інтеграцій

За замовчуванням, пов'язані або переробка записів залишаються видимими. Тільки використовувати include_linked=1, якщо ви приймаєте цю інтеграцію або безперервну обробку може припинити роботу.

Як працює request_id

  1. Перегляд кількості з action=preview. Немає request_id, що потрібно і не видаляється записів.
  2. Сприяє відновленню унікальної request_id для нового видалення, наприклад, UUID. Заощаджуйте його перед відправленням action=delete.
  3. Для рети, часових виходів або HTTP 202, повторно використовуйте той же ключ API, кінцева точка історії, request_id і include_linked значення. Не генеруйте новий ідентифікатор автоматично після помилки.
  4. Коли ЗСКАЧАКСЗ завершується операція. Відновити свій ідентифікатор повертає той же результат замість видалення новоприбулих записів. Використовуйте новий ідентифікатор тільки для свідомо нового очищення.

request_id визначає вашу операцію видалення, не індивідуальну SMS. Додано формат: 16–128 ASCII літери, цифри, гіфени або низи. Для цього потрібен броньований броньований біржовий .randomUID()

Видалення виконується пакетами. За HTTP 202 і continue_required=true повторіть action=delete через 3 секунди. Фоновий cron не запускається. action=status лише читає перебіг і не продовжує видалення, навіть за HTTP 200.

Видалення та приклади стану

Замініть зразок request_id з власним унікальним значенням перед початком. Видаліть наступні запити, змінюйте історію реального облікового запису, вони не є попередніми переглядами.

POST · API ключ
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"
GET · статус
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 також приймає action=preview або action=delete. POST рекомендується: параметри URL можуть витікати в історію браузера і журнали сервера. Не розміщуйте URL-адресу видалення в публічному посилання, зображення або префікс.

Для POST надішлемо всі параметри у вигляді тіла або об'єкта JSON, ніколи не в рядку запиту. Невідомі параметри відхилені; дата або мобільні фільтри не підтримуються.

Ауттентика для ендто точок історії

Використовуйте apikey або Authorization: Bearer з'явився з SMSMobileAPI OAuth2. Не надсилайте освіження або ключ API як токен Bearer. Відхилено відхилені відтоки.

За допомогою history:read можна переглянути/стату та history:delete також дозволяє відхиляти. Обмеження на використання токени та OAuth. Ногати без очок зберігають наявний доступ до облікового запису.

OAuth2 вибирає унікальний ключ API. Якщо існують декілька основних ключів, також забезпечують apikey для вибору одного з речей до облікового запису. По-друге, ключі не надають доступу до початкової історії ключів.

Читати відповідь перед продовження

count_delete є кумулятивним числом, видаленим цією роботою. selected_at_start є початковим вибором; protected_at_start кількість виключених записів. Використовуйте preview.linked_or_processing для підрахунку пов'язаних записів навіть коли include_linked=1.

ЗСКАЧАКСЗ · ЗСКАБКАКСЗ 202
{
    "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 з completed=true: завершено. Відповідність 200 або статус не доведе завершення.
  • 400 INVALID_REQUEST_ID: перевірити формат. 404 REQUEST_NOT_FOUND: немає операції для цього ID, ключа API і історії.
  • 401: недійсні або невилічені повноваження. 403: недостатня сфера OAuth або несанкціонований рахунок.
  • 409 HISTORY_BUSY: інший чистий процес працює; продовжуйте його з оригінального клієнта. 409 INCLUDE_LINKED_CONFLICT: відновлення оригінального значення include_linked.
  • 409 OAUTH_ACCOUNT_AMBIGUOUS: забезпечити ключ API до цього облікового запису.
  • 503 або мережевий перерву: вже завершені деякі партії. Перевірити налаштування, потім птиця з оригінальним request_id. Не створювати автоматично заміну.
POST

Send an email

#
ENDPOINThttps://api.smsmobileapi.com/sendemail/

Sends plain-text or HTML email through a configured mailbox.

When to use it

Use it for transactional or operational email from your application.

Parameters

Ім’яTypeRequirementDescription
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 email Required Sender email address.
recipient_email 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 Додатковий Adds unsubscribe terms and a link.
email_cc1 email Додатковий First optional CC recipient.
email_cc2 email Додатковий Second optional CC recipient.
email_cc3 email Додатковий Third optional CC recipient.
attachmentBase64 base64 Додатковий Base64-encoded attachment content.
attachmentBase64_name_1 filename Додатковий Original attachment file name with extension, for example invoice.pdf. Required when attachmentBase64 has a value.
charset string Додатковий Character set; default UTF-8.
embeddedImage HTTPS URL Додатковий Image to embed in the email.
embeddedImage_cid string Додатковий Content-ID referenced from the HTML body.
format string Додатковий Requested response format.
reply_name string Додатковий Reply-to display name.
reply_email email Додатковий Reply-to address.

Request example

cURL
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 ↑
Good to know
  • 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

#
ENDPOINThttps://api.smsmobileapi.com/getemail/

Retrieves messages from a configured mailbox folder.

When to use it

Use it to synchronize inbound email into a help desk or application workflow.

Parameters

Ім’яTypeRequirementDescription
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
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 ↑
Good to know
  • Responses include available subject, sender, recipient, body, timestamp and attachment details.
GET

Check unsubscribed contacts

#
ENDPOINThttps://api.smsmobileapi.com/email/unsubscribed/

Checks unsubscribe records generated by emails sent through the platform.

When to use it

Use it before sending campaigns and when synchronizing suppression lists.

Parameters

Ім’яTypeRequirementDescription
apikey string Required Your account API key.
apikeybox string Required Mailbox API key.
email email Додатковий Filter one contact. An empty result means no unsubscribe record was found.

Request example

cURL
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 ↑
Good to know
  • Keep your own recipient database synchronized with unsubscribe results.
  • You remain responsible for applicable anti-spam and privacy rules.
POST · GET

Очистити історію надісланих листів

#
ENDPOINThttps://api.smsmobileapi.com/delete-history-email/

Очистити надіслані електронні журнали для цього ключа API через поштові скриньки. Не видаляти повідомлення в поштовій скриньці. Немає необхідності apikeybox.

When to use it

Використовуйте попередній перегляд, перевірте кількість, потім явно запитайте видалення. Цей ви зрозумілий всю вибрану історію для ключа API, без дати, телефону або фільтрів повідомлень.

Parameters

Ім’яTypeRequirementDescription
apikey string Додатковий Не потрібно без OAuth2. З OAuth2, додатково виберіть ключ API, що належить до одного облікового запису.
action preview | delete | status Додатковий preview рахує записи без видалення; delete починає або продовжує видалення; status лише показує перебіг. Типове значення API — delete, а цього тестера — preview.
include_linked 0 | 1 Додатковий За замовчуванням 0: зберігати пов'язані або обробляти записи. Встановити 1, щоб включити їх, з ризиком розбиття інтеграцій. Зберігати цю вартість, не втрачаючи при тривалні знезараження.
request_id string Додатковий Обов’язково для delete і status, необов’язково для preview. Використовуйте 16–128 літер ASCII, цифр, дефісів (-) або підкреслень (_). Створюйте унікальний ID для кожного нового видалення та зберігайте його для всіх повторних спроб. Це не ID повідомлення і не ключ API.

Request example

cURL
curl -X POST "https://api.smsmobileapi.com/delete-history-email/" \
  --data-urlencode "apikey=YOUR_API_KEY" \
  -d "action=preview" -d "include_linked=0"
Видалення та приклади стану

Замініть зразок request_id з власним унікальним значенням перед початком. Видаліть наступні запити, змінюйте історію реального облікового запису, вони не є попередніми переглядами.

POST · API ключ
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"
GET · статус
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

JSON
{
    "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 ↑
Good to know
  • Приклад вище - попередній перегляд, не видалення. Підбір характеризується при старті видалення.
  • include_linked=1 може порушити GHL, Zapier, автоматики, відписані посилання або відстеження доставки. Не обходити облік володіння або перевірки цілісності зберігання.

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.

HTTPCodeWhat to do
400missing_parameterA required parameter is empty or absent. Check the parameter table for the endpoint.
403invalid_apikeyThe API key is unknown, expired or not authorized for the requested feature.
429too_many_requestsRequests are arriving too quickly. Wait, then retry with exponential backoff.
500server_errorThe service could not complete the request. Keep the response and contact support if it persists.
Retry ruleRetry only transient 429 and 5xx responses. Start after 1 second, then back off to 2, 4 and 8 seconds.

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.

Contact API support →
The secure SMSMobileAPI mobile app connecting a phone to the web dashboard and REST API for SMS and call operations
Encrypted mobile-to-platform connection

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.

1Mobile appPairs the phone and its SIM 2Encrypted linkAuthenticates and protects data in transit 3Dashboard & APIControls workflows and activity
  • 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
Get the official SMSMobileAPI app on Google Play Download the official SMSMobileAPI app on the Apple App Store
Capabilities depend on the permissions and background access allowed by Android or iOS.