For more information about Subusers, visit the longform Subusers documentation. You can also manage Subusers in the SendGrid console.
This endpoint allows you to create a new subuser.
Bearer <<YOUR_API_KEY_HERE>>
application/json
The username for this subuser.
The email address of the subuser.
The password this subuser will use when logging into SendGrid.
The IP addresses that should be assigned to this subuser.
The region this Subuser should be assigned to. Can be global
or eu
. (Regional email is in Public Beta and requires SendGrid Pro plan or above.).
global
Possible values: global
eu
A flag that determines if the Subuser's region should be returned in the response. (Regional email is in Public Beta and requires SendGrid Pro plan or above.)
false
The username of the subuser.
The user ID for this subuser.
The email address for this subuser.
The region this Subuser is assigned to. The property is returned only if the include_region
parameter is included and set to true
in the API request.
global
Possible values: global
eu
1const client = require('@sendgrid/client');2client.setApiKey(process.env.SENDGRID_API_KEY);34const data = {5"username": "John@example.com",6"email": "John@example.com",7"password": "johns_password",8"ips": [9"1.1.1.1",10"2.2.2.2"11],12"region": "global",13"include_region": true14};1516const request = {17url: `/v3/subusers`,18method: 'POST',19body: data20}2122client.request(request)23.then(([response, body]) => {24console.log(response.statusCode);25console.log(response.body);26})27.catch(error => {28console.error(error);29});