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.

Call

POST https://api.sendgrid.com/apiv2/reseller.ip.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=all

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[
  {
    "ip": "255.255.255.250"
  },
  {
    "ip": "255.255.255.251"
  },
  {
    "ip": "255.255.255.251"
  },
  {
    "ip": "255.255.255.252"
  },
  {
    "ip": "255.255.255.253"
  },
  {
    "ip": "255.255.255.254"
  }
]

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/reseller.ip.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=all

Response

1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="ISO-8859-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>

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 Parameter
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.

Call

POST https://api.sendgrid.com/apiv2/reseller.ip.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=free

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[
  {
    "ip": "255.255.255.250"
  },
  {
    "ip": "255.255.255.251"
  },
  {
    "ip": "255.255.255.251"
  },
  {
    "ip": "255.255.255.252"
  },
  {
    "ip": "255.255.255.253"
  },
  {
    "ip": "255.255.255.254"
  }
]

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/reseller.ip.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=free

Response

1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="ISO-8859-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>

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 Parameter
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.

Call

POST https://api.sendgrid.com/apiv2/reseller.ip.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=taken

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[
  {
    "ip": "255.255.255.250"
  },
  {
    "ip": "255.255.255.251"
  },
  {
    "ip": "255.255.255.251"
  },
  {
    "ip": "255.255.255.252"
  },
  {
    "ip": "255.255.255.253"
  },
  {
    "ip": "255.255.255.254"
  }
]

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/reseller.ip.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=taken

Response

1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="ISO-8859-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>

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 Parameter
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.

Call

POST https://api.sendgrid.com/apiv2/reseller.ip.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=available

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[
  {
    "ip": "255.255.255.250"
  },
  {
    "ip": "255.255.255.251"
  },
  {
    "ip": "255.255.255.251"
  },
  {
    "ip": "255.255.255.252"
  },
  {
    "ip": "255.255.255.253"
  },
  {
    "ip": "255.255.255.254"
  }
]

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/apiv2/reseller.ip.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=available

Response

1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="ISO-8859-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>

Usage

The current breakdown of users who are using your IPs.

Parameter Required Requirements Parameter
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.

Call

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[
  {
    "ip": "255.255.253.0",
    "user": "user4@example.com"
  },
  {
    "ip": "255.255.254.0",
    "user": "user4@example.com"
  }
]

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
<?xml version="1.0" encoding="ISO-8859-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>