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 gets a prorated discount.

URI Parameter Required Requirements Description
task Yes Must be set to immediate_upgrade .
user Yes Must be an User under your account. The customers 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 requires a whitelabel and/or an 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 whitelabel, you must place them in an IP group.
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/reseller.account.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=immediate_upgrade&package=Basic

Response

1
2
3
4
5
6
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/reseller.account.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=immediate_upgrade&package=Basic

Response

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

Immediate Downgrade

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

URI Parameter Required Requirements Description
task Yes Must be set to immediate_downgrade .
user Yes Must be an User under your account. The customers 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 requires a whitelabel and/or an unique IP, you may assign a free IP to this customer using your assigned IPs in suppliment from SendGrid.
ip_group[] No If the package you are downgrading your user to does not require an IP or whitelabel, you may place them in an IP group.
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/reseller.account.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=immediate_downgrade&package=Basic

Response

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

Call

POST https://api.sendgrid.com/apiv2/reseller.account.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=immediate_downgrade&package=Basic

Response

1
2
3
<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, a invoice with zero amount due is generated.

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

Call

POST https://api.sendgrid.com/apiv2/reseller.account.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=immediate_close&user=customer@example.com&ip_group[]=Reseller

Response

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

Call

POST https://api.sendgrid.com/apiv2/reseller.account.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=immediate_close&user=customer@example.com&ip_group[]=Reseller

Response

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