Create Inbox Test
curl --request POST \
--url https://api.campaigncleaner.com/v1/create_inbox_test \
--header 'Content-Type: application/json' \
--data '
{
"test_name": "My Campaign Inbox Test"
}
'import requests
url = "https://api.campaigncleaner.com/v1/create_inbox_test"
payload = { "test_name": "My Campaign Inbox Test" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({test_name: 'My Campaign Inbox Test'})
};
fetch('https://api.campaigncleaner.com/v1/create_inbox_test', 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.campaigncleaner.com/v1/create_inbox_test",
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([
'test_name' => 'My Campaign Inbox Test'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.campaigncleaner.com/v1/create_inbox_test"
payload := strings.NewReader("{\n \"test_name\": \"My Campaign Inbox Test\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.campaigncleaner.com/v1/create_inbox_test")
.header("Content-Type", "application/json")
.body("{\n \"test_name\": \"My Campaign Inbox Test\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campaigncleaner.com/v1/create_inbox_test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"test_name\": \"My Campaign Inbox Test\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "12345",
"test_name": "My Campaign Inbox Test",
"mailtester_address": "mailtest+a1b2c3d4@campaigncleaner.com",
"instructions": "Send your campaign to ALL addresses in the send_to list. Results will be available via get_inbox_test_results once processing is complete.",
"send_to": [
"seed1@gmail.com",
"seed2@yahoo.com",
"seed3@outlook.com",
"mailtest+a1b2c3d4@campaigncleaner.com"
]
}API Endpoints
Create Inbox Test
The create_inbox_test API allows you to create a new inbox placement test. Once created, you will receive a list of seed email addresses to send your campaign to. After sending your campaign to all addresses in the send_to list, you can use the get_inbox_test_results API to retrieve the placement results.
This endpoint requires an active Campaign Cleaner subscription or a standalone Inbox Placement Tester subscription. One API credit will be deducted per test created.
Header:
X-CC-API-Key: Your API Key
Request Body:
Required:
- test_name: The name of your inbox test - maximum 255 characters.
Response:
- job_id: The unique ID of the inbox test, used to retrieve results via the get_inbox_test_results API.
- test_name: The name you provided for the test.
- mailtester_address: The unique monitoring address that must be included in your send list. This is already included in the send_to array.
- instructions: A description of what to do next.
- send_to: An array of all seed email addresses including the mailtester_address. Send your campaign to every address in this list.
In the event of an error, you will get an “error:” response with a description of the reason.
POST
/
v1
/
create_inbox_test
Create Inbox Test
curl --request POST \
--url https://api.campaigncleaner.com/v1/create_inbox_test \
--header 'Content-Type: application/json' \
--data '
{
"test_name": "My Campaign Inbox Test"
}
'import requests
url = "https://api.campaigncleaner.com/v1/create_inbox_test"
payload = { "test_name": "My Campaign Inbox Test" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({test_name: 'My Campaign Inbox Test'})
};
fetch('https://api.campaigncleaner.com/v1/create_inbox_test', 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.campaigncleaner.com/v1/create_inbox_test",
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([
'test_name' => 'My Campaign Inbox Test'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.campaigncleaner.com/v1/create_inbox_test"
payload := strings.NewReader("{\n \"test_name\": \"My Campaign Inbox Test\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.campaigncleaner.com/v1/create_inbox_test")
.header("Content-Type", "application/json")
.body("{\n \"test_name\": \"My Campaign Inbox Test\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campaigncleaner.com/v1/create_inbox_test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"test_name\": \"My Campaign Inbox Test\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "12345",
"test_name": "My Campaign Inbox Test",
"mailtester_address": "mailtest+a1b2c3d4@campaigncleaner.com",
"instructions": "Send your campaign to ALL addresses in the send_to list. Results will be available via get_inbox_test_results once processing is complete.",
"send_to": [
"seed1@gmail.com",
"seed2@yahoo.com",
"seed3@outlook.com",
"mailtest+a1b2c3d4@campaigncleaner.com"
]
}
