生産準備のモバイルインフラHTTPS API・Android・iOS・ドキュメントエンドツーエンドプラットフォームを探索する
プラットフォームAPIファーストアーキテクチャセキュアなデバイスペアリング配信可視性多デバイス制御版文書
開発者ハブ/メールAPI

MAIL · 3 documented operations

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 ベース URLhttps://api.smsmobileapi.com

JSON 応答 · HTTPS が必要 · UTF-8

API キーを接続します

一度接続し、SMS、通話、通知、WhatsApp、電子メール全体でエンドポイントをテストします。

ここから開始

4 つのステップで最初のリクエストを実行します

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.

認証

認証情報をサーバー上に保持します

Email endpoints require the account apikey and the mailbox-specific apikeybox. Store both credentials server-side and mask them in application logs.

役職

Send an email

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

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

いつ使用するか

Use it for transactional or operational email from your application.

パラメータ

名前タイプ要件説明
apikey 必須 Your account API key.
apikeybox 必須 API key of the configured mailbox.
sender_name 必須 Display name of the sender.
sender_email メール 必須 Sender email address.
recipient_email メール 必須 Recipient address.
mail_subject 必須 Email subject.
mail_body 必須 Plain text or HTML body.
allow_self_signed yes | no 必須 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 メール オプション First optional CC recipient.
email_cc2 メール オプション Second optional CC recipient.
email_cc3 メール オプション Third optional CC recipient.
attachmentBase64 base64 オプション Base64 でエンコードされた添付ファイルのコンテンツ。
charset オプション Character set; default UTF-8.
embeddedImage HTTPS URL オプション Image to embed in the email.
embeddedImage_cid オプション Content-ID referenced from the HTML body.
format オプション Requested response format.
reply_name オプション Reply-to display name.
reply_email メール オプション Reply-to address.

リクエストの例

カール
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"

これを実行したいrequest? Connect your API key at the top of the page to unlock the interactive tester.

接続キー ↑
Good to know
  • Prefer POST because email bodies can be long.
  • Base64 attachments can make requests large; apply sensible size limits in your application.
得る

Retrieve emails

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

Retrieves messages from a configured mailbox folder.

いつ使用するか

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

パラメータ

名前タイプ要件説明
apikey 必須 Your account API key.
apikeybox 必須 Mailbox API key.
mbox 必須 Mailbox folder, for example INBOX.
start 整数 必須 Starting index; use 0 for the first page.

リクエストの例

カール
curl "https://api.smsmobileapi.com/getemail/?apikey=YOUR_API_KEY&apikeybox=YOUR_MAILBOX_KEY&mbox=INBOX&start=0"

これを実行したいrequest? Connect your API key at the top of the page to unlock the interactive tester.

接続キー ↑
Good to know
  • Responses include available subject, sender, recipient, body, timestamp and attachment details.
得る

Check unsubscribed contacts

#
ENDPOINThttps://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.

パラメータ

名前タイプ要件説明
apikey 必須 Your account API key.
apikeybox 必須 Mailbox API key.
email メール オプション Filter one contact. An empty result means no unsubscribe record was found.

リクエストの例

カール
curl "https://api.smsmobileapi.com/email/unsubscribed/?apikey=YOUR_API_KEY&apikeybox=YOUR_MAILBOX_KEY&email=customer@example.net"

これを実行したいrequest? Connect your API key at the top of the page to unlock the interactive tester.

接続キー ↑
Good to know
  • Keep your own recipient database synchronized with unsubscribe results.
  • You remain responsible for applicable anti-spam and privacy rules.

トラブルシューティング

エラーと安全な再試行

再試行する前に、HTTP ステータスと JSON エラー フィールドを読み取ります。最初にリクエストを修正せずに、検証または認証の失敗を再試行しないでください。

HTTPコード対処方法
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.
再試行ルール一時的な 429 応答と 5xx 応答のみを再試行します。 1 秒後に開始し、2 秒、4 秒、8 秒に戻ります。

ヘルプが必要ですか?

シークレットではなくリクエスト コンテキストを提供します。

エンドポイント、タイムスタンプ、HTTP ステータス、サニタイズされたレスポンスを共有します。 API キー、トークン、プライベート メッセージ コンテンツは決して含めないでください。

API サポートに問い合わせる →