ConoHa API Documantation

迷惑メールフィルタ許可リスト更新 - Mail API v1.0

Description
迷惑メールフィルタ(ホワイトリスト)の更新を
行います。

Request URL

Mail API v1.0

PUT /v1/emails/(uuid:email_id)/whitelist

Request Paramters

Parameter Value Style Type Description
X-Auth-Token - header string Userトークン
email_id - URI UUID メールID
targets - - list -
target - plain MAIL 許可メールアドレス

Response Paramters

Parameter Value Style Type Description
targets - - list -
target - plain MAIL 許可メールアドレス

Request Json

{
    "targets": [
        {"target": "exmple01@example.com"},
        {"target": "exmple01@example.com"},
        {"target": "exmple01@example.com"}
    ]
}

Normal response codes

200 - Success

Error response codes

401 - Access Denied
404 - Not Found
409 - Duplicate

Repeatable

No

Example
※エンドポイントURLにつきましては、お客様環境によって異なりますので、コントロールパネルにてご確認の上ご利用ください。

  • REQ
curl -i -X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: 39be9f8d53044388b7f2e867eba8b140" \
-d
'{
    "targets": [
        {"target": "exmple01@example.com"},
        {"target": "exmple02@example.com"},
        {"target": "exmple03@example.com"}
    ]
}' \
https://mail-hosting.tyo1.conoha.io/v1/emails/00658145-9ed8-4468-847d-06ed0237966d/whitelist
  • RES
HTTP/1.1 200 Success
Date: Tue, 09 Dec 2014 01:46:58 GMT
Server: Apache
Content-Length: 1003
Content-Type: application/json
{
    "targets": [
        {"target": "exmple01@example.com"},
        {"target": "exmple01@example.com"},
        {"target": "exmple01@example.com"}
    ]
}

Example2 all crear

  • REQ
curl -i -X PUT \
-H "Accept: application/json" \
-H "X-Auth-Token: 39be9f8d53044388b7f2e867eba8b140" \
-d
'{
    "targets": []
}' \
https://mail-hosting.tyo1.conoha.io/v1/emails/00658145-9ed8-4468-847d-06ed0237966d/whitelist
  • RES
HTTP/1.1 200 Success
Date: Tue, 09 Dec 2014 01:46:58 GMT
Server: Apache
Content-Length: 1003
Content-Type: application/json
{
    "targets": []
}