Sending IPs

Run in Postman
Import the SparkPost API as a Postman collection

Sending IP Object

Example

{
  "external_ip": "123.45.67.80",
  "hostname": "mta474a.sparkpostmail.com",
  "ip_pool": "default"
}

Request Body

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

customer_provided boolean

Whether this sending IP was provided by the customer.

Request

GET /api/v1/sending-ips/123.45.67.89

Response

{
  "results": {
    "external_ip": "123.45.67.89",
    "hostname": "mta472a.sparkpostmail.com",
    "ip_pool": "cool_kids",
    "customer_provided": false
  }
}
{
  "errors": [
    {
      "message": "external ip must be a valid IPv4 address"
    }
  ]
}
{
  "errors": [
    {
      "message": "Sending IP does not exist"
    }
  ]
}

Retrieve a Sending IP

GET/api/v1/sending-ips/{external_ip}

Parameters

external_ip string required

The external IP of the sending IP

Retrieves a specific sending IP.

Request

PUT /api/v1/sending-ips/123.45.67.89
{
  "ip_pool": "too_cool_for_pool"
}

Response

{
  "results": {
    "message": "Updated IP Pool."
  }
}
{
  "errors": [
    {
      "message": "IP Pool too_cool_for_pool does not exist."
    }
  ]
}
{
  "errors": [
    {
      "message": "Sending IP does not exist"
    }
  ]
}

Update a Sending IP

PUT/api/v1/sending-ips/{external_ip}

Parameters

external_ip string required

The external IP of the sending IP to update

Request Body

ip_pool string required

The IP pool to add this sending IP to.

Updates which IP Pool holds the sending IP.

Request

GET /api/v1/sending-ips

Response

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

List all sending IPs

GET/api/v1/sending-ips

Returns a list of all sending IPs.