For more information about Subusers, visit the longform Subusers documentation. You can also manage Subusers in the SendGrid console.
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:
Bearer <<YOUR_API_KEY_HERE>>
The username of the Subuser.
application/json
array[string<ipv4>]
The IP addresses you would like to assign to the subuser.
The IP addresses that are assigned to the subuser.
1const client = require('@sendgrid/client');2client.setApiKey(process.env.SENDGRID_API_KEY);34const subuser_name = "Miss Christine Morgan";5const data = [6"127.0.0.1"7];89const request = {10url: `/v3/subusers/${subuser_name}/ips`,11method: 'PUT',12body: data13}1415client.request(request)16.then(([response, body]) => {17console.log(response.statusCode);18console.log(response.body);19})20.catch(error => {21console.error(error);22});