--- title: "Cloud Outbound Mailerの概要" slug: "ai-application-service-cloudoutboundmailer" tags: ["Cloud Outbound Mailer", "overview"] updated: 2026-10-08T07:15:04Z published: 2026-10-08T07:15:04Z canonical: "api.ncloud-docs.com/ai-application-service-cloudoutboundmailer" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Cloud Outbound Mailerの概要 ## 概要 Cloud Outbound Mailer APIは RESTfulの形式で提供されます。HTTP方式の GET/POST/DELETEメソッドの呼び出しを介して行われます。 APIを使用してアドレス帳を構成/管理してメールの送信をリクエストし、リクエスト結果を確認して送信履歴を照会することができます。 ## 共通設定 ### Cloud Outbound Mailer API Endpoint | リージョン | Endpoint | | --- | --- | | 韓国(KR) | https://mail.apigw.ntruss.com/api/v1 | | シンガポール(SGN) | https://mail.apigw.ntruss.com/api/v1-sgn/ | | 日本(JPN) | https://mail.apigw.ntruss.com/api/v1-jpn/ | ### リクエストヘッダ | ヘッダ名 | 説明 | | --- | --- | | x-ncp-apigw-timestamp | 1970年1月1日 00:00:00協定世界時(UTC)からの経過時間をミリ秒(Millisecond)で表し、API Gatewayサーバとの時間差が5分以上の場合は無効なリクエストとみなす `x-ncp-apigw-timestamp:{Timestamp}` | | x-ncp-iam-access-key | NAVERクラウドプラットフォームポータルから発行された Access Key ID `x-ncp-iam-access-key:{Account Access Key}` | | x-ncp-apigw-signature-v2 | Access Key ID値と Secret Keyで暗号化した署名 `x-ncp-apigw-signature-v2:{API Gateway Signature}` | | x-ncp-lang | APIレスポンスの多言語処理のための値。(入力値の例: ko-KR、en-US、zh-CN、デフォルト: en-US)。 `x-ncp-lang:{language code}` | #### 認証ヘッダ Cloud Outbound Mailer APIは NAVERクラウドプラットフォーム API Gatewayを介して提供されます。API Gatewayに登録されている APIを使用するには、2つの認証キー(Access Key ID、Secret Key)の発行が必要です。 詳細は、[NAVERクラウドプラットフォーム APIガイド](/docs/ja/common-ncpapi)をご参照ください。 - 認証キーを作成 - [Ncloud API](https://api.ncloud-docs.com/docs/ja/common-ncpapi)を参照して Access Key ID、Secret Keyを作成します。 - Access Key ID、Secret Keyがある場合はそのキーを使用します。 #### リクエスト例 ``` curl -i -s -X POST \ -H "Content-Type:application/json" \ -H "x-ncp-apigw-timestamp:1521787414578" \ -H "x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy" \ -H "x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=" \ "https://mail.apigw.ntruss.com/api/v1/mails"\ -d '{"senderAddress":"no_reply@company.com","title":"${customer_name}様、こんにちは。","body":"お客様のランクが${BEFORE_GRADE}から${AFTER_GRADE}に変更されました。","recipients":[{"address":"hongildong@naver_.com","name":"ホンギルドン","type":"R","parameters":{"customer_name":"ホンギルドン","BEFORE_GRADE":"SILVER","AFTER_GRADE":"GOLD"}},{"address":"chulsoo@daum_.net","name":null,"type":"R","parameters":{"customer_name":"チョルス","BEFORE_GRADE":"BRONZE","AFTER_GRADE":"SILVER"}}],"individual":true,"advertising":false}' ``` - Signatureの作成(改行文字は`\n`を使用) - リクエストに合わせて StringToSignを作成し、SecretKeyを HmacSHA256アルゴリズムで暗号化した後、Base64にエンコードします。 - この値を`x-ncp-apigw-signature-v2`として使用します。 - **サンプルコード** ``` public String makeSignature() { String space = " "; // スペース String newLine = "\n"; // 改行 String method = "POST"; // HTTPメソッド String url = "/api/v1/mails"; // ドメインを除く「/」以降の全 url(クエリストリングを含む) String timestamp = "{timestamp}"; // 現在のタイムスタンプ(epoch、millisecond) String accessKey = "{accessKey}"; // access key id (from portal or sub account) String secretKey = "{secretKey}"; // secret key (from portal or sub account) String message = new StringBuilder() .append(method) .append(space) .append(url) .append(newLine) .append(timestamp) .append(newLine) .append(accessKey) .toString(); SecretKeySpec signingKey = new SecretKeySpec(secretKey.getBytes("UTF-8"), "HmacSHA256"); Mac mac = Mac.getInstance("HmacSHA256"); mac.init(signingKey); byte[] rawHmac = mac.doFinal(message.getBytes("UTF-8")); String encodeBase64String = Base64.getEncoder().encodeToString(rawHmac); return encodeBase64String; } ``` ``` function makeSignature() { $space = " "; // スペース $newLine = "\n"; // 改行 $method = "POST"; // HTTPメソッド $uri= "/api/v1/mails"; // ドメインを除く「/」以降の全 url(クエリストリングを含む) $timestamp = "{timestamp}"; // 現在のタイムスタンプ(epoch、millisecond) $accessKey = "{accessKey}"; // access key id (from portal or sub account) $secretKey = "{secretKey}"; // secret key (from portal or sub account) $hmac = $method.$space.$uri.$newLine.$timestamp.$newLine.$accessKey; $signautue = base64_encode(hash_hmac('sha256', $hmac, $secretKey,true)); return $signautue; } ``` ### レスポンス 共通レスポンス形式を説明します。 #### レスポンスステータスコード レスポンスステータスコードの説明は次の通りです。 | HTTP Status Code | リターンコード | 説明 | | --- | --- | --- | | 200 | - | 一般的なリクエスト成功 | | 201 | - | リソース作成成功に対するレスポンスコード | | 400 | - | 認証失敗、無効なリクエスト | | 400 | 77101 | ログイン情報エラー | | 400 | 77102 | BAD_REQUEST | | 400 | 77103 | リソースが存在しない | | 403 | 77201 | 権限なし | | 403 | 77202 | Email商品の利用を申し込んでいない | | 405 | 77001 | METHOD_NOT_ALLOWED | | 415 | 77002 | UNSUPPORTED_MEDIA_TYPE | | 500 | - | サーバエラー | | 500 | 77301 | 基本プロジェクトが存在しない | | 500 | 77302 | 外部システム API連携エラー | | 500 | 77303 | その他の INTERNAL_SERVER_ERROR | 参考 NAVERクラウドプラットフォームで共通して使用されるレスポンスステータスコードの詳細は、[Ncloud APIのレスポンスステータスコード](/docs/ja/common-ncpapi#3%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)をご参照ください。 ## オペレーション ### メールの送信 - [createMailRequest](/docs/ja/ai-application-service-cloudoutboundmailer-createmailrequest) - [getMail](/docs/ja/ai-application-service-cloudoutboundmailer-getmail) - [getMailList](/docs/ja/ai-application-service-cloudoutboundmailer-getmaillist) - [getMailRequestList](/docs/ja/ai-application-service-cloudoutboundmailer-getmailrequestlist) - [getMailRequestStatus](/docs/ja/ai-application-service-cloudoutboundmailer-getmailrequeststatus) - [createFile](/docs/ja/ai-application-service-cloudoutboundmailer-createfile) - [getFile](/docs/ja/ai-application-service-cloudoutboundmailer-getfile) - [deleteFile](/docs/ja/ai-application-service-cloudoutboundmailer-deletefile) ### テンプレートの管理 - [createTemplate](/docs/ja/ai-application-service-cloudoutboundmailer-createtemplate) - [getTemplate](/docs/ja/ai-application-service-cloudoutboundmailer-gettemplate) - [getTemplateStructure](/docs/ja/ai-application-service-cloudoutboundmailer-gettemplatestructure) - [updateTemplate](/docs/ja/ai-application-service-cloudoutboundmailer-updatetemplate) - [deleteTemplate](/docs/ja/ai-application-service-cloudoutboundmailer-deletetemplate) - [restoreTemplate](/docs/ja/ai-application-service-cloudoutboundmailer-restoretemplate) - [createCategory](/docs/ja/ai-application-service-cloudoutboundmailer-createcategory) - [deleteCategory](/docs/ja/ai-application-service-cloudoutboundmailer-deletecategory) ### 受信者グループの管理 - [createAddressBook](/docs/ja/ai-application-service-cloudoutboundmailer-createaddressbook) - [getAddressBook](/docs/ja/ai-application-service-cloudoutboundmailer-getaddressbook) - [deleteAddressBook](/docs/ja/ai-application-service-cloudoutboundmailer-deleteaddressbook) - [deleteAddress](/docs/ja/ai-application-service-cloudoutboundmailer-deleteaddress) - [deleteRecipientGroup](/docs/ja/ai-application-service-cloudoutboundmailer-deleterecipientgroup) ### 送信遮断および受信拒否の管理 - [getSendBlockList](/docs/ja/ai-application-service-cloudoutboundmailer-getsendblocklist) - [registerUnsubscribers](/docs/ja/ai-application-service-cloudoutboundmailer-registerunsubscribers) - [deleteUnsubscribers](/docs/ja/ai-application-service-cloudoutboundmailer-deleteunsubscribers)