Skip to contentSkip to navigationSkip to topbar
On this page

Add an IP address to a pool



API Overview

api-overview page anchor

IP pools allow you to group your dedicated SendGrid IP addresses. For example, you could create separate one pool for your transactional email and another for your marketing email. When sending marketing emails, specify that you want to use the marketing IP pool. This allows you to maintain separate reputations for your different email traffic.

A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is determined by the aggregate performance of all email traffic sent from it.

IP pools can only be used with IP addresses for which you've set up a reverse DNS record.

If an IP pool is not specified for an email, it will use any IP available, including pooled addresses.

Each user can create up to 100 different IP pools.


POST/v3/ips/pools/{pool_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 to add an IP address to an IP pool.

You can add the same IP address to multiple pools. It may take up to 60 seconds for your IP address to be added to a pool after your request is made.

Before you can add an IP to a pool, you need to activate it in your SendGrid account:

  1. Log into your SendGrid account.
  2. Navigate to Settings and then select IP Addresses.
  3. Find the IP address you want to activate and then click Edit.
  4. Check Allow my account to send mail using this IP address.
  5. Click Save.

You can retrieve all of your available IP addresses from the "Retrieve all IP addresses" endpoint.


Authentication

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

The name of the IP pool you want to add the address to. If the name contains spaces, they must be URL encoded (e.g., "Test Pool" becomes "Test%20Pool").

Encoding type:application/json
SchemaExample
Property nameTypeRequiredDescriptionChild properties
ipstringOptional

The IP address that you want to add to the named pool.

201404
SchemaExample
Property nameTypeRequiredDescriptionChild properties
ipstring

The IP address.


poolsarray[string]

The IP pools that this IP address has been added to.


start_dateinteger

A Unix timestamp indicating when the warmup process began for the added IP address.


warmupboolean

Indicates if the IP address is in warmup.

Add an IP address to a poolLink to code sample: Add an IP address to a pool
1
const client = require('@sendgrid/client');
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const pool_name = "per";
5
const data = {
6
"ip": "0.0.0.0"
7
};
8
9
const request = {
10
url: `/v3/ips/pools/${pool_name}/ips`,
11
method: 'POST',
12
body: data
13
}
14
15
client.request(request)
16
.then(([response, body]) => {
17
console.log(response.statusCode);
18
console.log(response.body);
19
})
20
.catch(error => {
21
console.error(error);
22
});

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.