Skip to contentSkip to navigationSkip to topbar
On this page

Delete a subuser



API Overview

api-overview page anchor

For more information about Subusers, visit the longform Subusers documentation. You can also manage Subusers in the SendGrid console(link takes you to an external page).


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.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
subuser_namestringrequired

The username of the Subuser.

204401
Schema
Property nameTypeRequiredDescriptionChild properties

No properties defined

Delete a subuserLink to code sample: Delete a subuser
1
const client = require("@sendgrid/client");
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const subuser_name = "Miss Christine Morgan";
5
6
const request = {
7
url: `/v3/subusers/${subuser_name}`,
8
method: "DELETE",
9
};
10
11
client
12
.request(request)
13
.then(([response, body]) => {
14
console.log(response.statusCode);
15
console.log(response.body);
16
})
17
.catch((error) => {
18
console.error(error);
19
});

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.