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 operations allow you to create, retrieve, and authenticate customer accounts.
Delete a specific account under your organization by account ID. Note that this is an irreversible action that does the following:
Bearer <<YOUR_API_KEY_HERE>>
Twilio SendGrid account ID
Account successfully deleted.
1const client = require('@sendgrid/client');2client.setApiKey(process.env.SENDGRID_API_KEY);34const accountID = "ZGkrHSypTsudrGkmdpJJ";56const request = {7url: `/v3/partners/accounts/${accountID}`,8method: 'DELETE',910}1112client.request(request)13.then(([response, body]) => {14console.log(response.statusCode);15console.log(response.body);16})17.catch(error => {18console.error(error);19});