Using IP Pools with the SMTP API Header

IP pools can only be used with IP addresses that have rDNS setup.

IP Pools allow you to group your dedicated SendGrid IP addresses together. For example, you might have separate pools named transactional and marketing.

Then, when sending marketing emails, you may specify that the marketing pool be used, so that your transactional IPs maintain their own reputation.

1
{"to": ["destination.com"],"ip_pool": "pool_name"}

If an IP pool is NOT specified for an email, it will use any IP available, including ones in pools.


POST

Create an IP pool.

There is a limit of 100 IP pools per user.

URI Parameter Required Requirements Description
name Yes String. max of 64 characters Name of the new IPpool

Request

1
POST https://api.sendgrid.com/v3/ips/pools HTTP/1.1
Request Body
1
2
3
{
  "name": "marketing"
}

Response

1
{"name":"marketing"}

GET

Retrieve all IP pools.

Request

1
GET https://api.sendgrid.com/v3/ips/pools HTTP/1.1

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
HTTP/1.1 200
[
  {
    "name": "test1"
  },
  {
    "name": "test2"
  },
  {
    "name": "test3"
  },
  {
    "name": "new_test3"
  }
]

GET

Retrieve all IPs in a specified pool.

Request

1
GET https://api.sendgrid.com/v3/ips/pools/{pool_name} HTTP/1.1

Response

1
2
3
4
5
6
HTTP/1.1 200 OK 

{
  "ips":["167.89.21.3"],
  "pool_name":"new_test5"
}

PUT

Update an IP pool’s name.

URI Parameter Required Requirements Description
name Yes String. max 64 characters New name of the pool

Request

1
PUT https://api.sendgrid.com/v3/ips/pools/{pool_name} HTTP/1.1
Request Body
1
2
3
{
  "name": "marketing"
}

Response

1
2
3
4
5
HTTP/1.1 200 OK 

{
  "name":"new_pool_name"
}

POST

Add an IP Address to a pool.

Request

1
POST https://api.sendgrid.com/v3/ips/pools/{pool_name}/ips HTTP/1.1
Request Body
1
2
3
{
  "ip": "0.00.0.0"
}

Response

1
2
3
4
5
6
7
8
9
10
HTTP/1.1 200 OK 

{
  "ip": "0.00.0.0",
  "pools": [
    "marketing"
  ],
  "start_date": null,
  "warmup": false
}

DELETE

Remove an IP Address from a pool.

Request

1
DELETE https://api.sendgrid.com/v3/ips/pools/{pool_name}/ips/{ip} HTTP/1.1

Response

1
HTTP/1.1 204 NO CONTENT (OK)

DELETE

Delete an IP pool.

Request

1
DELETE https://api.sendgrid.com/v3/ips/pools/{pool_name} HTTP/1.1

Response

1
HTTP/1.1 204 NO CONTENT (OK)