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.
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.
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.
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.