Add a Twilio SendGrid IP Address



The IP Address Management API combines functionality that was previously split between the Twilio SendGrid IP Address API and IP Pools API. This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. More details about each operation can be found in the descriptions and schemas for each endpoint.

(information)
(warning)

Warning

The IP Address Management API is in public beta at this time. This means the API and documentation are still in development and subject to change without advanced notice.


POST/v3/send_ips/ips

Base url: https://api.sendgrid.com (for global users and subusers)

Base url: https://api.eu.sendgrid.com (for EU regional subusers)

This operation adds a Twilio SendGrid IP address to your account. You can also assign up to 100 Subusers to the IP address at creation.


Property nameTypeRequiredDescription
authorizationstring
required
Default: Bearer <<YOUR_API_KEY_HERE>>
Encoding type:application/json
SchemaExample
Property nameTypeRequiredDescriptionChild properties
isAutoWarmupboolean
required

Indicates if the IP address is set to automatically warmup.


isParentAssignedboolean
required

Indicates if a parent on the account is able to send email from the IP address.


subusersarray[string]

Optional

An array of Subuser IDs the IP address will be assigned to.

Max Items: 100

regionenum<string>

Optional

The region to which the IP address is assigned. This property will only be returned if the include_region query parameter is included and set to true as part of the API request.

Default: usPossible values:
euus

includeRegionboolean

Optional

Boolean indicating whether or not to return the IP address's region information in the response.

Default: false
201400401500

Created

SchemaExample
Property nameTypeRequiredDescriptionChild properties
ipstring

Optional

The IP address that was added to your account.


isAutoWarmupboolean

Optional

Indicates if the IP address is set to automatically warmup. This parameter is returned only if the IP address is set to automatically warm up.


isParentAssignedboolean

Optional

Indicates if a parent on the account is able to send email from the IP address.


subusersarray[string]

Optional

An array of Subuser IDs the IP address was assigned to.


regionenum<string>

Optional

The region to which the IP address is assigned. This property will only be returned if the include_region query parameter is included and set to true as part of the API request.

Possible values:
euus
1
const client = require("@sendgrid/client");
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const data = {
5
is_auto_warmup: true,
6
is_parent_assigned: true,
7
subusers: ["12345"],
8
};
9
10
const request = {
11
url: `/v3/send_ips/ips`,
12
method: "POST",
13
body: data,
14
};
15
16
client
17
.request(request)
18
.then(([response, body]) => {
19
console.log(response.statusCode);
20
console.log(response.body);
21
})
22
.catch((error) => {
23
console.error(error);
24
});