Update IPs assigned to a subuser
For more information about Subusers, visit the longform Subusers documentation. You can also manage Subusers in the SendGrid console.
PUT/v3/subusers/{subuser_name}/ips
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 update your subusers' assigned IP.
Each subuser should be assigned to an IP address from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have one or more of their own IP addresses as well.
More information:
Property nameTypeRequiredDescription
Authorizationstring
required
Default:
Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
subuser_namestring
required
The username of the Subuser.
Encoding type:
application/json
SchemaExample
array[string<ipv4>]
The IP addresses you would like to assign to the subuser.
200401
SchemaExample
Property nameTypeRequiredDescriptionChild properties
ipsarray[string<ipv4>]
Optional
The IP addresses that are assigned to the subuser.
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const subuser_name = "subuser_name";5const data = ["127.0.0.1"];67const request = {8url: `/v3/subusers/${subuser_name}/ips`,9method: "PUT",10body: data,11};1213client14.request(request)15.then(([response, body]) => {16console.log(response.statusCode);17console.log(response.body);18})19.catch((error) => {20console.error(error);21});