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:

Account Changes

Upgrade, downgrade, or close a customer's account.

Immediate Upgrade

Upgrading a user generates an invoice. If the user is upgrading from a free to a paid account, the invoice is for the full price of the account. If the upgrade happens between billing periods, the user receives a prorated discount.

URI Parameter Required Requirements Description
task Yes Must be set to immediate_upgrade The upgrade task.
user Yes Must be a user under your account. The customer's username.
package Yes The name of the package you will be upgrading the user to.
ip[] No If the package you are upgrading your user to requires an authenticated domain and/or a unique IP, you must assign a free IP to this user.
ip_group[] No If the package you are upgrading your user to does not require an IP or authenticated domain, you must place them in an IP group.

These are Reseller only APIs. For more information, see Reseller Overview.

Call

POST https://api.sendgrid.com/apiv2/reseller.account.json
POST Data api_user=apikey&api_key=your_sendgrid_api_key&task=immediate_upgrade&package=Basic Package&user=eexampexample@example.com&ip_group[]=Reseller Group

Response

{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/reseller.account.xml
POST Data api_user=apikey&api_key=your_sendgrid_api_key&task=immediate_upgrade&package=Basic Package&user=eexampexample@example.com&ip_group[]=Reseller Group

Response

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

Immediate Downgrade

Once a downgrade happens, an invoice is generated for the downgraded user. Free customers are not allowed to downgrade.

URI Parameter Required Requirements Description
task Yes Must be set to immediate_downgrade The downgrade task
user Yes Must be a user under your account. The customer's username.
package Yes The name of the package you will be downgrading the user to.
ip[] No If the package you are downgrading your user to requires an authenticated domain and/or a unique IP, you may assign a free IP to this customer using your assigned IPs in supplement from SendGrid.
ip_group[] No If the package you are downgrading your user to does not require an IP or authenticated domain, you may place them in an IP group.

Call

POST https://api.sendgrid.com/apiv2/reseller.account.json
POST Data api_user=apikey&api_key=your_sendgrid_api_key&task=immediate_downgrade&package=Basic Package&user=eexampexample@example.com&ip_group[]=Reseller Group

Response

{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/reseller.account.xml
POST Data api_user=apikey&api_key=your_sendgrid_api_key&task=immediate_downgrade&package=Basic Package&user=eexampexample@example.com&ip_group[]=Reseller Group

Response

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

Immediate Close

Close or revert an account to a free user immediately. An invoice is generated for that user with the new package price (if no overages are incurred, an invoice with zero amount due is generated).

URI Parameter Required Requirements Description
task Yes Must be set to immediate_close .
user Yes Must be a customer under your account.
ip_group[] No Define an IP Group to place the user into once the customer's account is closed.

Call

POST https://api.sendgrid.com/apiv2/reseller.account.json
POST Data api_user=apikey&api_key=your_sendgrid_api_key_password&task=immediate_close&user=eexampexample@example.com&ip_group[]=Reseller Group

Response

{
  "message": "success"
}

Call

POST https://api.sendgrid.com/apiv2/reseller.account.xml
POST Data api_user=apikey&api_key=your_sendgrid_api_key&task=immediate_close&user=eexampexample@example.com&ip_group[]=Reseller Group

Response

<result>
   <message>success</message>
</result>
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