Menu

Expand

This documentation is for the SendGrid Web API v2

To access all the latest features and upcoming developments, please see our v3 API.

Rate this page:

Filter Commands

These API requests apply account-wide, unlike the SMTP API which will change the status at the individual email message level.

Get Available

List all of the available apps.

Note: The name entry is used in all the other API calls to identify an app. For a list of all the apps and parameters accessible with the Web API you can check the Filter Settings page.

Call

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

Response

[
  {
    "...": "..."
  },
  {
    "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
GET Data api_user=apikey&api_key=your_sendgrid_api_key

Response

<filters>
   ...
   <filter>
      <name>bcc</name>
      <description>Automatically BCC an address for every e-mail sent.</description>
      <activated>0</activated>
   </filter>
   ...
</filters>

Activate App

Activate an app for the entire Account.

URI Parameter Required Requirements Description
name true The name of the app to activate.

Call

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

Response

{
  "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

<result>
   <message>success</message>
</result>

Deactivate App

Deactivate an app for the entire Account.

URI Parameter Required Requirements Description
name true The name of the app to deactivate.

Call

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

Response

{
  "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

<result>
   <message>success</message>
</result>

Setup App

Change application settings across the entire Account. Applications and their settings can be found in the Filter Settings documentation.

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

{
  "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

<result>
   <message>success</message>
</result>

Get App Settings

Get the Settings Of An App

URI Parameter Required Requirements Description
name true The name of the app for which to retrieve settings.

Call

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

Response

{
  "settings": [
    {
      "email": "example@example.com"
    }
  ]
}

Call

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

Response

<filter>
   <email>nick@sendgrid.com</email>
</filter>
Rate this page:
Loading Code Sample...
        
        
        

        Thank you for your feedback!

        Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        thanks-feedback-gif