ここから開始
4 つのステップで最初のリクエストを実行します
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.
認証
認証情報をサーバー上に保持します
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
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.
パラメータ
| 名前 | タイプ | 要件 | 説明 |
|---|---|---|---|
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.
接続キー ↑- Prefer POST because email bodies can be long.
- Base64 attachments can make requests large; apply sensible size limits in your application.
得る
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.
パラメータ
| 名前 | タイプ | 要件 | 説明 |
|---|---|---|---|
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.
接続キー ↑- Responses include available subject, sender, recipient, body, timestamp and attachment details.
得る
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.
パラメータ
| 名前 | タイプ | 要件 | 説明 |
|---|---|---|---|
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.
接続キー ↑- Keep your own recipient database synchronized with unsubscribe results.
- You remain responsible for applicable anti-spam and privacy rules.
トラブルシューティング
エラーと安全な再試行
再試行する前に、HTTP ステータスと JSON エラー フィールドを読み取ります。最初にリクエストを修正せずに、検証または認証の失敗を再試行しないでください。
| HTTP | コード | 対処方法 |
|---|---|---|
| 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. |
ヘルプが必要ですか?
シークレットではなくリクエスト コンテキストを提供します。
エンドポイント、タイムスタンプ、HTTP ステータス、サニタイズされたレスポンスを共有します。 API キー、トークン、プライベート メッセージ コンテンツは決して含めないでください。
