To access all the latest features and upcoming developments, please see our v3 API.
Obtain a complete list of all IPs associated with your account and whether they are free, taken, or available.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
list | Yes | Must be set to one of the following: all free taken available | Will return the IPs on the account that match the argument |
The list
argument will restrict the IPs returned:
POST | https://api.sendgrid.com/apiv2/customer.ip.json |
---|---|
POST Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&list=all |
_11[_11 {_11 "ip": "255.255.255.250"_11 },_11 {_11 "ip": "255.255.255.251"_11 },_11 {_11 "ip": "255.255.255.252"_11 }_11]
URI Parameter | Required | Requirements | Description |
---|---|---|---|
task | Yes | Must be set to list | Task to return the IPs in use by the subuser |
user | Yes | Subuser must be under your account | Subuser to get the IPs of |
POST | https://api.sendgrid.com/apiv2/customer.sendip.json |
---|---|
POST Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&task=list&user=subuser_username |
_24{_24 "success": "success",_24 "outboundcluster": "SendGrid MTA",_24 "ips": [_24 {_24 "ip": "255.255.255.250"_24 },_24 {_24 "ip": "255.255.255.251"_24 },_24 {_24 "ip": "255.255.255.251"_24 },_24 {_24 "ip": "255.255.255.252"_24 },_24 {_24 "ip": "255.255.255.253"_24 },_24 {_24 "ip": "255.255.255.254"_24 }_24 ]_24}
You need to assign at least ONE IP to your subuser.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
task | Yes | Must be set to append | Task to add IP to a subuser |
user | Yes | Subuser must be under your account | Subuser that is adding IPs |
set | Yes | Must be either: none all specify | none : Remove all IPs. all : Apply all possible IPs to subuser. specify : Specify the IPs to the subser |
ip[] | No | Must be a valid set of IPs (use the list call to determine valid IPs) | If the set parameter is specify , then you must specify the IPs. Use the IP[] parameter to specify an IP: ip[]=255.255.255.0[]=255.255.255.1 |