The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customers. This API is for companies that have a formal reseller partnership with Twilio SendGrid.
You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio SendGrid Subusers feature, which is available with Pro and Premier plans.
The Account Provisioning API account state operations allow you to update and retrieve the state of your customer accounts. Accounts can be in one of five states: activated
, deactivated
, suspended
, banned
, and indeterminate
.
The Update Account State operation allows you to update the state of a specific customer account. A customer account can be updated to either of the following states: activated
, deactivated
.
The following table shows the actions available to an account based on its state.
ACCOUNT STATE | LOGIN | SEND MAIL | SUBUSERS REMOVED | DEDICATED IPS REMOVED | API KEYS DEACTIVATED |
---|---|---|---|---|---|
Activated | yes | yes | no | no | no |
Suspended | yes | no | no | no | no |
Deactivated | no | no | no | no | yes |
Banned | no | no | yes | yes | yes |
*If you find an account in the indeterminate
state, please contact Twilio SendGrid support for help troubleshooting.
Update the state of the specified account.
Bearer <<YOUR_API_KEY_HERE>>
Twilio SendGrid account ID
application/json
The state of the account (e.g., activated
, deactivated
)
activated
deactivated
State successfully updated
1const client = require('@sendgrid/client');2client.setApiKey(process.env.SENDGRID_API_KEY);34const accountID = "ZGkrHSypTsudrGkmdpJJ";5const data = {6"state": "activated"7};89const request = {10url: `/v3/partners/accounts/${accountID}/state`,11method: 'PUT',12body: data13}1415client.request(request)16.then(([response, body]) => {17console.log(response.statusCode);18console.log(response.body);19})20.catch(error => {21console.error(error);22});