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:

Apps

Please see the Filter Settings page for a list of the required parameters for each app setting.

List

List all of the available apps available for the subuser.

URI Parameter Required Requirements Description
task Yes Must be set to getAvailable Task to retrieve available apps for the subuser
user Yes Subuser must be under your account The subuser being queried

Call

POST https://api.sendgrid.com/apiv2/customer.apps.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=getAvailable&user=subuser_username

Response

[
  {
    "name": "clicktrack",
    "title": "Click Tracking",
    "description": "Overwrites every link to track every click in emails.",
    "activated": true
  },
  {
    "name": "subscriptiontrack",
    "title": "Subscription Tracking",
    "description": "Adds unsubscribe links to the bottom of the text and HTML emails. Future emails won't be delivered to unsubscribed users.",
    "activated": false
  },
  {
    "name": "opentrack",
    "title": "Open Tracking",
    "description": "Appends an invisible image to HTML emails to track emails that have been opened.",
    "activated": true
  }
]

Note: The name entry is used in all the other API calls to identify an app.

Call

POST https://api.sendgrid.com/apiv2/customer.apps.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=getAvailable&user=subuser_username

Response

<apps>
  <app>
    <name>clicktrack</name>
    <title>Click Tracking</title>
    <description>Overwrites every link to track every click in emails.</description>
    <activated>1</activated>
  </app>
  <app>
    <name>subscriptiontrack</name>
    <title>Subscription Tracking</title>
    <description>Adds unsubscribe links to the bottom of the text and HTML emails. Future emails won't be delivered to unsubscribed users.</description>
    <activated>0</activated>
  </app>
  <app>
    <name>opentrack</name>
    <title>Open Tracking</title>
    <description>Appends an invisible image to HTML emails to track emails that have been opened.</description>
    <activated>1</activated>
  </app>
</apps>

Note: The name entry is used in all the other API calls to identify an app.


Activate App

Activate an app on a subuser.

URI Parameter Required Requirements Description
task Yes Must be set to activate Task to activate an app
user Yes Subuser must be under your account The subuser to activate the app on
name Yes Must be a supported app The app to activate

Call

POST https://api.sendgrid.com/apiv2/customer.apps.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&name=clicktrack&task=activate&user=subuser_username

Response

{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/customer.apps.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&name=clicktrack&task=activate&user=subuser_username

Response

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

Deactivate App

Deactivate an app on a subuser.

URI Parameter Required Requirements Description
task Yes Must be set to deactivate Deactivate an app
user Yes Subuser must be under your account The subuser to deactivate the app on
name Yes Must be a supported app The app to deactivate

Call

POST https://api.sendgrid.com/apiv2/customer.apps.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&name=clicktrack&task=deactivate&user=subuser_username

Response

{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/customer.apps.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&name=clicktrack&task=deactivate&user=subuser_username

Response

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

Setup App

These API calls require that settings are passed using POST.

Refer to Filter Settings for the required arguments for each app.

URI Parameter Required Requirements Description
task Yes Must be set to setup Task to setup an app
user Yes Subuser must be under your account The subuser to setup the app on
name Yes Must be a supported app The app to setup

Call

POST https://api.sendgrid.com/apiv2/customer.apps.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&name=bcc&task=setup&email=test@example.com

Response

{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/customer.apps.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&name=bcc&task=setup&email=test@example.com

Response

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

Get Current Settings

Get the settings for a subuser's app.

URI Parameter Required Requirements Description
task Yes Must be set to getsettings Task to retrieve the settings for the app
user Yes Subuser must be under your account The subuser get the app settings for
name Yes Must be a supported app The app to retrieve settings of

Call

POST https://api.sendgrid.com/apiv2/customer.apps.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&name=clicktrack&task=getsettings&user=subuser_username

Response

{"settings":
  {
    "enable_text":"0"
  }
}

Call

POST https://api.sendgrid.com/apiv2/customer.apps.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&name=clicktrack&task=getsettings&user=subuser_username

Response

<app>
  <enable_text>1</enable_text>
</app>
Rate this page:

Need some help?

We all do sometimes. Get help now from the Twilio SendGrid Support Team.

Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.

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