Skip to contentSkip to navigationSkip to topbar
Rate this page:
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

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
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
subuser_namestringrequired

The username of the Subuser.

SchemaExample
array[string<ipv4>]

The IP addresses you would like to assign to the subuser.

200401
SchemaExample
ipsarray[string<ipv4>]

The IP addresses that are assigned to the subuser.

Update IPs assigned to a subuser

update-ips-assigned-to-a-subuser page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

_22
const client = require('@sendgrid/client');
_22
client.setApiKey(process.env.SENDGRID_API_KEY);
_22
_22
const subuser_name = "Miss Christine Morgan";
_22
const data = [
_22
"127.0.0.1"
_22
];
_22
_22
const request = {
_22
url: `/v3/subusers/${subuser_name}/ips`,
_22
method: 'PUT',
_22
body: data
_22
}
_22
_22
client.request(request)
_22
.then(([response, body]) => {
_22
console.log(response.statusCode);
_22
console.log(response.body);
_22
})
_22
.catch(error => {
_22
console.error(error);
_22
});


Rate this page: