Delete a subuser
For more information about Subusers, visit the longform Subusers documentation. You can also manage Subusers in the SendGrid console.
DELETE/v3/subusers/{subuser_name}
Base url: https://api.sendgrid.com (for global users and subusers)
Base url: https://api.eu.sendgrid.com (for EU regional subusers)
This endpoint allows you to delete a subuser.
This is a permanent action. Once deleted, a subuser cannot be retrieved.
Property nameTypeRequiredDescription
Authorizationstring
required
Default:
Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
subuser_namestring
required
The username of the Subuser.
204401
No response body.
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const subuser_name = "subuser_name";56const request = {7url: `/v3/subusers/${subuser_name}`,8method: "DELETE",9};1011client12.request(request)13.then(([response, body]) => {14console.log(response.statusCode);15console.log(response.body);16})17.catch((error) => {18console.error(error);19});