Create IPPool
curl --request POST \
--url https://api.sendpost.io/api/v1/account/ippool \
--header 'Content-Type: application/json' \
--header 'X-Account-ApiKey: <api-key>' \
--data '
{
"name": "Marketing Promotional",
"tpsps": [
1
],
"ips": [
{
"publicIP": "3.238.19.87"
}
]
}
'import requests
url = "https://api.sendpost.io/api/v1/account/ippool"
payload = {
"name": "Marketing Promotional",
"tpsps": [1],
"ips": [{ "publicIP": "3.238.19.87" }]
}
headers = {
"X-Account-ApiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Account-ApiKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Marketing Promotional', tpsps: [1], ips: [{publicIP: '3.238.19.87'}]})
};
fetch('https://api.sendpost.io/api/v1/account/ippool', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sendpost.io/api/v1/account/ippool",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Marketing Promotional',
'tpsps' => [
1
],
'ips' => [
[
'publicIP' => '3.238.19.87'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Account-ApiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sendpost.io/api/v1/account/ippool"
payload := strings.NewReader("{\n \"name\": \"Marketing Promotional\",\n \"tpsps\": [\n 1\n ],\n \"ips\": [\n {\n \"publicIP\": \"3.238.19.87\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Account-ApiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sendpost.io/api/v1/account/ippool")
.header("X-Account-ApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Marketing Promotional\",\n \"tpsps\": [\n 1\n ],\n \"ips\": [\n {\n \"publicIP\": \"3.238.19.87\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/ippool")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Account-ApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Marketing Promotional\",\n \"tpsps\": [\n 1\n ],\n \"ips\": [\n {\n \"publicIP\": \"3.238.19.87\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 3,
"name": "Marketing Promotional",
"created": 1686304219037565000,
"ips": [
{
"id": 6,
"publicIP": "3.238.19.86",
"reverseDNSHostname": "sp0006.mtaspb.email",
"type": 1,
"created": 1597511124804000
}
],
"thirdPartySendingProviders": [
{
"id": 1,
"name": "sendgrid",
"type": 1,
"domain": "",
"endpoint": "",
"key": "",
"secret": "your_api_key",
"port": 0,
"oauthToken": "",
"retryTime": 0,
"created": 1597511124701000
}
],
"routingStrategy": 0,
"routingMetaData": "{}"
}IPPools
Create IPPool
Creates a new IPPool with the specified name, IPs, and third-party sending providers.
POST
/
account
/
ippool
Create IPPool
curl --request POST \
--url https://api.sendpost.io/api/v1/account/ippool \
--header 'Content-Type: application/json' \
--header 'X-Account-ApiKey: <api-key>' \
--data '
{
"name": "Marketing Promotional",
"tpsps": [
1
],
"ips": [
{
"publicIP": "3.238.19.87"
}
]
}
'import requests
url = "https://api.sendpost.io/api/v1/account/ippool"
payload = {
"name": "Marketing Promotional",
"tpsps": [1],
"ips": [{ "publicIP": "3.238.19.87" }]
}
headers = {
"X-Account-ApiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Account-ApiKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Marketing Promotional', tpsps: [1], ips: [{publicIP: '3.238.19.87'}]})
};
fetch('https://api.sendpost.io/api/v1/account/ippool', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sendpost.io/api/v1/account/ippool",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Marketing Promotional',
'tpsps' => [
1
],
'ips' => [
[
'publicIP' => '3.238.19.87'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Account-ApiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sendpost.io/api/v1/account/ippool"
payload := strings.NewReader("{\n \"name\": \"Marketing Promotional\",\n \"tpsps\": [\n 1\n ],\n \"ips\": [\n {\n \"publicIP\": \"3.238.19.87\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Account-ApiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sendpost.io/api/v1/account/ippool")
.header("X-Account-ApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Marketing Promotional\",\n \"tpsps\": [\n 1\n ],\n \"ips\": [\n {\n \"publicIP\": \"3.238.19.87\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/ippool")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Account-ApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Marketing Promotional\",\n \"tpsps\": [\n 1\n ],\n \"ips\": [\n {\n \"publicIP\": \"3.238.19.87\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 3,
"name": "Marketing Promotional",
"created": 1686304219037565000,
"ips": [
{
"id": 6,
"publicIP": "3.238.19.86",
"reverseDNSHostname": "sp0006.mtaspb.email",
"type": 1,
"created": 1597511124804000
}
],
"thirdPartySendingProviders": [
{
"id": 1,
"name": "sendgrid",
"type": 1,
"domain": "",
"endpoint": "",
"key": "",
"secret": "your_api_key",
"port": 0,
"oauthToken": "",
"retryTime": 0,
"created": 1597511124701000
}
],
"routingStrategy": 0,
"routingMetaData": "{}"
}Authorizations
This api key can be used for all account level operations
Body
application/json
Response
Created IPPool details
Example:
746
Example:
"Transactional"
Example:
1597511124804000
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
0
Example:
"{}"
Example:
false
Example:
true
Example:
null
Indicates whether the IP should overflow, once email capacity of the IP Pool has been reached, should we send remaining emails over shared IP or not
Example:
true
The name of the overflow pool
Example:
"Transactional"
The interval for the warmup
Example:
60
Was this page helpful?
⌘I