Filter Commands

これらのAPIリクエストはアカウント単位での設定です。SMTP APIのようにメール単位での設定変更ではありません。

Get Available

利用可能な全てのAppを取得します。

注:名称は他の全てのAPIコールでAppを特定するために使用されます。 使用できる全てのAppとパラメータのリストについてはFilter Settingsの章を参照してください。

Parameter Value Requirements Description
1
2203026072

Call

GET https://api.sendgrid.com/api/filter.getavailable.json?api_user=apikey&api_key=your_sendgrid_api_key

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[
  {
    "...": "..."
  },
  {
    "name": "bcc",
    "title": "BCC",
    "description": "Automatically BCC an address for every e-mail sent from this account.",
    "activated": false
  },
  {
    "...": "..."
  }
]

Call

GET https://api.sendgrid.com/api/filter.getavailable.xml?api_user=apikey&api_key=your_sendgrid_api_key

Response

1
2
3
4
5
6
7
8
9
<filters>
   ...
   <filter>
      <name>bcc</name>
      <description>Automatically BCC an address for every e-mail sent.</description>
      <activated>0</activated>
   </filter>
   ...
</filters>

Activate App

アカウント単位でAppを有効化します。

URI引数 必須 条件 説明
name true 有効化するAppの名前
Parameter Value Requirements Description
1
1288616151

Call

POST https://api.sendgrid.com/api/filter.activate.json
POST Data api_user=apikey&api_key=your_sendgrid_api_key&name=bcc

Response

1
2
3
{
  "message": "success"
}

Call

POST https://api.sendgrid.com/api/filter.activate.xml
POST Data api_user=apikey&api_key=your_sendgrid_api_key&name=bcc

Response

1
2
3
<result>
   <message>success</message>
</result>

Deactivate App

アカウント単位でAppを無効化します。

URI引数 必須 条件 説明
name true 無効化するAppの名前
Parameter Value Requirements Description
1
6338335601

Call

POST https://api.sendgrid.com/api/filter.deactivate.json
POST Data api_user=apikey&api_key=your_sendgrid_api_key&name=bcc

Response

1
2
3
{
  "message": "success"
}

Call

POST https://api.sendgrid.com/api/filter.deactivate.xml
POST Data api_user=apikey&api_key=your_sendgrid_api_key&name=bcc

Response

1
2
3
<result>
   <message>success</message>
</result>

Setup App

アカウント単位でアプリケーションの設定を変更します。アプリケーションとその設定については、Filter Settingsの章を参照してください。

Call

POST https://api.sendgrid.com/api/filter.setup.json
POST Data api_user=apikey&api_key=your_sendgrid_api_key&name=bcc&email=example@example.com

Response

1
2
3
{
  "message": "success"
}

Call

POST https://api.sendgrid.com/api/filter.setup.xml
POST Data api_user=apikey&api_key=your_sendgrid_api_key&name=bcc&email=example@example.com

Response

1
2
3
<result>
   <message>success</message>
</result>

Get App Settings

Appの設定を取得します。

URI引数 必須 条件 説明
name true 設定を取得するAppの名前
Parameter Value Requirements Description
1
1109827113

Call

GET https://api.sendgrid.com/api/filter.getsettings.json?api_user=apikey&api_key=your_sendgrid_api_key&name=bcc

Response

1
2
3
4
5
6
7
{
  "settings": [
    {
      "email": "example@example.com"
    }
  ]
}

Call

GET https://api.sendgrid.com/api/filter.getsettings.xml?api_user=apikey&api_key=your_sendgrid_api_key&name=bcc

Response

1
2
3
<filter>
   <email>nick@sendgrid.com</email>
</filter>