We will deprecate this version on February 10, 2025. To access all the latest features and upcoming developments, please see our v3 API. For assistance with transitioning, refer to our migration guide.
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 |
1[2{3"ip": "255.255.255.250"4},5{6"ip": "255.255.255.251"7},8{9"ip": "255.255.255.252"10}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 |
1{2"success": "success",3"outboundcluster": "SendGrid MTA",4"ips": [5{6"ip": "255.255.255.250"7},8{9"ip": "255.255.255.251"10},11{12"ip": "255.255.255.251"13},14{15"ip": "255.255.255.252"16},17{18"ip": "255.255.255.253"19},20{21"ip": "255.255.255.254"22}23]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 |