How to Create a Subuser With the API

Creating a new subuser through SendGrid’s API is a multi-step process. This guide will walk you through the necessary steps in order to create a new subuser account using only API calls.

1. Establish the New Subuser (required)

With the subuser creation API call you will be able to establish the new subuser’s account and profile settings. This call will create the new subuser account, however it does not apply the sending IP for the account, nor does it establish a whitelabel entry or enable website/SMTP access for the subuser.

Now that you have created the new subuser account, you will need to add an IP so that it can send emails. We advise that you first find an available IP for this subuser. You can do so by using the following call:

When defining the parameter ‘list’ there are a few options you can choose:

All = Will list all of the IPs on your account, taken or available.

Free = Will list all the free IPs on your account. For instance, if an IP is in use by a subuser or parent account then that IP will not be listed.

Taken = Will list all of the IP addresses that are assigned to your parent and/or subuser accounts.

Available = Will list all of the unassigned IP addresses for the account. If a subuser is deactivated and it is assigned an IP, that IP will show up on this list since that IP address is not technically in use.

Response Example

After you have selected the IP that you wish to assign to your subuser account, simply make the API call to append the IP address.

When defining this call’s ‘set’ parameter, you have a few options for appending the subuser’s IP:

None = removes all of the IPs on the associated account.

All = applies all of the possible IPs to the account.

Specify = Specify the IPs to the subuser

Success Message

Failure Message

3. Assign a Whitelabel for the Subuser Account (optional)

After you have created the subuser account and have appended an IP address, you are now ready to assign an existingwhitelabel to the account. If you have not yet created the required records for whitelabeling for your chosen domain then this step should be skipped. Unfortunately, new whitelabel records cannot be established through API calls.

The API response above shows that email.sendgrid.com and email.example.com are both already established whitelabel entries, and can be used by this subuser. If none are displayed then the next step in this process should be skipped.

If you have a whitelabel entry that you wish to apply to your subuser then you will need to append the whitelabel entry to your subuser: