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 Get Account State operation allows you to retrieve the state of a specific customer account. A customer account can be in one of five states: activated
, deactivated
, suspended
, banned
, or indeterminate
*.
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.
Retrieve the state of the specified account.
Bearer <<YOUR_API_KEY_HERE>>
Twilio SendGrid account ID
OK
The state of the account (e.g., activated
, deactivated
, suspended
, banned
, or indeterminate
)
activated
deactivated
suspended
banned
indeterminate
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const accountID = "ZGkrHSypTsudrGkmdpJJ";56const request = {7url: `/v3/partners/accounts/${accountID}/state`,8method: "GET",9};1011client12.request(request)13.then(([response, body]) => {14console.log(response.statusCode);15console.log(response.body);16})17.catch((error) => {18console.error(error);19});