Skip to contentSkip to navigationSkip to topbar
On this page

Get Teammate Subuser Access



API Overview

api-overview page anchor

Twilio SendGrid's Teammates feature allows multiple users, or "Teammates," to work from a single SendGrid account.

Teammates enables groups of users with different roles and responsibilities to share one account, where each of these users has access to varying SendGrid features depending on their needs. By only giving your individual team members access to the features that they need to do their jobs, you can limit access to sensitive areas of your account. Teammates allows you to add, remove, and manage different users. See the Teammate Permissions documentation for more information about managing user permissions.

(information)

Info

Free and Essentials plans allow for adding one Teammate per account and do not offer Single Sign-On (SSO), while Pro and higher plans allow for up to 1,000 Teammates and include SSO and other features. Learn more about the different Email API Plans on our pricing page(link takes you to an external page).


You can think of Subusers like subaccounts. Each Subuser account is its own email ecosystem with isolated contacts, templates, suppressions, and data. Subusers feed off their parent account email credits, and all billing rolls up to the parent account. Teammates may have access to a parent account, a group of Subusers, or a single Subuser account only.


GET/v3/teammates/{teammate_name}/subuser_access

Base url: https://api.sendgrid.com (for global users and subusers)

Base url: https://api.eu.sendgrid.com (for EU regional subusers)

This operation allows you to retrieve the Subusers that can be accessed by a specified Teammate.

This operation will return the Subusers available to a Teammate, including the scopes available. If the Teammate is an administrator, all Subusers will be returned.


Authentication

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

The username of the Teammate for whom you want to retrieve Subuser access information.

Property nameTypeRequiredDescription
after_subuser_idintegerOptional

The Subuser ID from which the API request will begin retrieving Subusers. This query parameter can be used in successive API calls to retrieve additional Subusers.


limitintegerOptional

Limit the number of Subusers to be returned. The default limit is 100 per request.

Default: 100

usernamestringOptional

A Subuser's username that will be used to filter the returned result.

200400401403500

200 Success

SchemaExample
Property nameTypeRequiredDescriptionChild properties
has_restricted_subuser_accessboolean

When this property is set to true, the Teammate has permissions to operate only on behalf of a Subuser. This property value is true when the subuser_access property is not empty. The subuser_access property determines which Subusers the Teammate may act on behalf of.


subuser_accessarray[object]

Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the has_restricted_subuser_access property will be true.


_metadataobject

This object contains response metadata. The presence of the after_subuser_id property in the metadata indicates that some items are still outstanding and have not been retrieved. You can use the after_subuser_id value to retrieve additional items with another request.

Get Teammate Subuser AccessLink to code sample: Get Teammate Subuser Access
1
const client = require('@sendgrid/client');
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const teammate_name = "Miss Christine Morgan";
5
const queryParams = {
6
"limit": 100
7
};
8
9
const request = {
10
url: `/v3/teammates/${teammate_name}/subuser_access`,
11
method: 'GET',
12
qs: queryParams
13
}
14
15
client.request(request)
16
.then(([response, body]) => {
17
console.log(response.statusCode);
18
console.log(response.body);
19
})
20
.catch(error => {
21
console.error(error);
22
});

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.