All

View all IPs under your account.

Parameter Required Requirements Description
task Yes Must be set to all. Retrieve all IPs available for your account.
ip No Can be a complete or partial IP address. Filter your search results.
system No Must be set to true. Include IPs assigned by SendGrid.

XML Call

POST https://api.sendgrid.com/api/distributor.ip.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=al

Response

1
<ips><ip>255.255.255.0</ip><ip>255.255.254.0</ip><ip>255.255.253.0</ip><ip>255.255.252.0</ip></ips

JSON Call

POST https://api.sendgrid.com/api/distributor.ip.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=al

Response: Success

1
"255.255.255.0","255.255.254.0","255.255.253.0","255.255.252.0"

Response: Error

1
2
3
4
5
6
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Free

A listing of all free IPs under your account. A Free IP is any IP that is not in use by a user or is not linked to an IP grouping.

Parameter Required Requirements Description
task Yes Must be set to free. Retrieve all free IPs for your account.
ip No Can be a complete or partial IP address. Filter your search results.

XML Call

POST https://api.sendgrid.com/api/distributor.ip.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=fre

Response

1
<ips><ip>255.255.255.0</ip><ip>255.255.254.0</ip><ip>255.255.253.0</ip><ip>255.255.252.0</ip></ips

JSON Call

POST https://api.sendgrid.com/api/distributor.ip.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=fre

Response: Success

1
"255.255.255.0","255.255.254.0","255.255.253.0","255.255.252.0"

Response: Error

1
2
3
4
5
6
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Taken

A listing of all taken IPs under your account. A Taken IP is any IP that is in use by a user or is linked to an IP grouping.

Parameter Required Requirements Description
task Yes Must be set to taken. Retrieve all taken IPs for your account.
ip No Can be a complete or partial IP address. Filter your search results.

XML Call

POST https://api.sendgrid.com/api/distributor.ip.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=take

Response

1
<ips><ip>255.255.255.0</ip><ip>255.255.254.0</ip><ip>255.255.253.0</ip><ip>255.255.252.0</ip></ips

JSON Call

POST https://api.sendgrid.com/api/distributor.ip.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=take

Response: Success

1
"255.255.255.0","255.255.254.0","255.255.253.0","255.255.252.0"

Response: Error

1
2
3
4
5
6
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Available

A listing of all available IPs under your account. An Available IP is any IP that is currently free, or is in use by a user but that user is inactive or that is not linked to an IP grouping.

Parameter Required Requirements Description
task Yes Must be set to available. Retrieve all available IPs for your account.
ip No Can be a complete or partial IP address. Filter your search results.

XML Call

POST https://api.sendgrid.com/api/distributor.ip.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=availabl

Response

1
<ips><ip>255.255.255.0</ip><ip>255.255.254.0</ip><ip>255.255.253.0</ip><ip>255.255.252.0</ip></ips

JSON Call

POST https://api.sendgrid.com/api/distributor.ip.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=availabl

Response: Success

1
"255.255.255.0","255.255.254.0","255.255.253.0","255.255.252.0"

Response: Error

1
2
3
4
5
6
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Usage

The current breakdown of users who are using your IPs.

Parameter Required Requirements Description
task Yes Must be set to usage. Retrieve all IPs in use broken down by user.
ip No Can be a complete or partial IP address. Filter your search results.
user No Can be a complete or part of a username. Filter your search results.
group No Can be a complete or part of a group name. Filter your search results.
system No Must be set to true. Include IPs assigned by SendGrid.

XML Call

POST https://api.sendgrid.com/api/distributor.ip.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=usage&user=example.com

Response

1
<ips><entry><ip>255.255.253.0</ip><user>user4@example.com</user></entry><entry><ip>255.255.254.0</ip><user>user4@example.com</user></entry></ips

JSON Call

POST https://api.sendgrid.com/api/distributor.ip.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=usage&user=example.com

Response: Success

1
{"ip":"255.255.253.0","user":"user4@example.com"},{"ip":"255.255.254.0","user":"user4@example.com"}

Response: Error

1
2
3
4
5
6
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}