Menu

Expand
Rate this page:

Teammates

Give and adjust account access.

Get Teammate Subuser Access

GET /v3/teammates/{teammate_name}/subuser_access

Base url: https://api.sendgrid.com

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.

Path Parameters

teammate_name
string

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

default: None
required

Query String

after_subuser_id
integer

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

default: None
limit
integer

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

default: 100
username
integer

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

default: None

Responses

object
has_restricted_subuser_access
boolean

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_access
array[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.

id
integer

The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the Subusers API.

username
string

The username of a Subuser to which the Teammate has access.

email
string

The email address of a Subuser to which the Teammate has access.

disabled
boolean

Indicates if the Subuser is active for the SendGrid account.

permission_type
string

The level of access the Teammate has to the specified Subuser. This property value may be either admin or restricted. When is property is set to restricted, the Teammate has only the permissions assigned in the scopes property.

Allowed Values: admin, restricted
scopes
array[string]

The permissions or scopes that the Teammate can access on behalf of the Subuser. See Teammate Permissions for a complete list of available scopes.

_metadata
object

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.

next_params
object
limit
integer

The limit specified in the limit query parameter to constrain the number of Subusers returned.

after_subuser_id
integer

The after_subuser_id property represents the last processed Subuser. If the after_subuser_id property is null, there are no more entries available.

username
string

The username of a Subuser passed in the name query parameter to filter results by username.

{
  "has_restricted_subuser_access": true,
  "subuser_access": [
    {
      "id": 1234,
      "username": "examplesubuser",
      "email": "subuser@example.com",
      "disabled": true,
      "permission_type": "admin",
      "scopes": [
        "billing.read"
      ]
    }
  ],
  "_metadata": {
    "next_params": {
      "limit": 0,
      "after_subuser_id": 0,
      "username": "string"
    }
  }
}
object

An object containing an array of errors objects.

errors
array[object]
message
string

The message representing the error from the API.

field
string

The field associated with the error.

object

An object containing an array of errors objects.

errors
array[object]
message
string

The message representing the error from the API.

field
string

The field associated with the error.

object

An object containing an array of errors objects.

errors
array[object]
message
string

The message representing the error from the API.

field
string

The field associated with the error.

object

An object containing an array of errors objects.

errors
array[object]
message
string

The message representing the error from the API.

field
string

The field associated with the error.

Loading Code Sample...
        
        

        Get Teammate Subuser Access

        Rate this page:

        Need some help?

        We all do sometimes. Get help now from the Twilio SendGrid Support Team.

        Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.

        Loading Code Sample...
              
              
              

              Thank you for your feedback!

              Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

              Sending your feedback...
              🎉 Thank you for your feedback!
              Something went wrong. Please try again.

              Thanks for your feedback!

              thanks-feedback-gif