Skip to contentSkip to navigationSkip to topbar
On this page

Update IPs assigned to a subuser



API Overview

api-overview page anchor

For more information about Subusers, visit the longform Subusers documentation. You can also manage Subusers in the SendGrid console(link takes you to an external page).


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:


Authentication

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

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>]

The IP addresses that are assigned to the subuser.

Update IPs assigned to a subuserLink to code sample: Update IPs assigned to a subuser
1
const client = require("@sendgrid/client");
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const subuser_name = "Miss Christine Morgan";
5
const data = ["127.0.0.1"];
6
7
const request = {
8
url: `/v3/subusers/${subuser_name}/ips`,
9
method: "PUT",
10
body: data,
11
};
12
13
client
14
.request(request)
15
.then(([response, body]) => {
16
console.log(response.statusCode);
17
console.log(response.body);
18
})
19
.catch((error) => {
20
console.error(error);
21
});

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.