Sending IPs

SparkPost Enterprise customers: IPs are managed through your TAM, please contact them directly for assistance.

Using Postman

If you use Postman you can click the following button to import the SparkPost API as a collection:

Run in Postman

Sending IP Properties

Property Type Description Notes
external_ip string Public-facing IP address of this sending IP
hostname string Reverse DNS hostname associated with this IP
ip_pool string IP pool this sending IP is held in

Sending IPs

Get all sending IPs

GET/api/v1/sending-ips

Gets all IP addresses.

Examples

Request

GET /api/v1/sending-ips

Response (HTTP status code: 200)

{
  "results": [
    {
      "external_ip": "123.45.67.89",
      "hostname": "mta472a.sparkpostmail.com",
      "ip_pool": "marketing"
    },
    {
      "external_ip": "123.45.67.80",
      "hostname": "mta474a.sparkpostmail.com",
      "ip_pool": "default"
    }
  ]
}

Sending IP Resource

Get a Sending IP

GET/api/v1/sending-ips/{external_ip}
URI Parameters
external_ip(required)  

The external IP of the sending IP

Example: 123.45.67.89

Retrieves a specific sending IP.

Examples

Request

GET /api/v1/sending-ips/123.45.67.89

Response (HTTP status code: 200)

{
  "results": {
    "external_ip": "123.45.67.89",
    "hostname": "mta472a.sparkpostmail.com",
    "ip_pool": "cool_kids"
  }
}

Response (HTTP status code: 400)

{
  "errors": [
    {
      "message": "external ip must be a valid IPv4 address"
    }
  ]
}

Response (HTTP status code: 404)

{
  "errors": [
    {
      "message": "Sending IP does not exist"
    }
  ]
}

Update a Sending IP

PUT/api/v1/sending-ips/{external_ip}
URI Parameters
external_ip(required)  

The external IP of the sending IP to update

Example: 123.45.67.89

Updates the IP Pool of a sending IP.

Request Body Attributes

Field Type Description Required
ip_pool string The IP pool to add this sending IP to. yes

Examples

Request

PUT /api/v1/sending-ips/123.45.67.89

{
  "ip_pool": "too_cool_for_pool"
}

Response (HTTP status code: 200)

{
  "results": {
    "message": "Updated IP Pool."
  }
}

Response (HTTP status code: 400)

{
  "errors": [
    {
      "message": "IP Pool glibglob does not exist."
    }
  ]
}

Response (HTTP status code: 404)

{
  "errors": [
    {
      "message": "Sending IP does not exist"
    }
  ]
}