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:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the SendGrid tag on Stack Overflow.

        
        
        

        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more