Start an inbox placement test
curl --request POST \
--url https://api.getcluster.ai/v1/email/placement-tests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"sender_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"subject": "<string>",
"body": "<string>",
"name": "<string>",
"body_format": "plain_text"
}
'import requests
url = "https://api.getcluster.ai/v1/email/placement-tests"
payload = {
"sender_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"subject": "<string>",
"body": "<string>",
"name": "<string>",
"body_format": "plain_text"
}
headers = {
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
sender_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
subject: '<string>',
body: JSON.stringify('<string>'),
name: '<string>',
body_format: 'plain_text'
})
};
fetch('https://api.getcluster.ai/v1/email/placement-tests', 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.getcluster.ai/v1/email/placement-tests",
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([
'sender_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'subject' => '<string>',
'body' => '<string>',
'name' => '<string>',
'body_format' => 'plain_text'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-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.getcluster.ai/v1/email/placement-tests"
payload := strings.NewReader("{\n \"sender_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"body_format\": \"plain_text\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.getcluster.ai/v1/email/placement-tests")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sender_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"body_format\": \"plain_text\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getcluster.ai/v1/email/placement-tests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sender_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"body_format\": \"plain_text\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"status": "<string>",
"subject": "<string>",
"credits_charged": 123,
"sender_count": 123,
"summary": {
"inbox": 0,
"other": 0,
"spam": 0,
"missing": 0,
"not_sent": 0,
"pending": 0,
"seeds": 0,
"inbox_rate": 123,
"other_rate": 123,
"spam_rate": 123,
"missing_rate": 123
},
"senders": [
{
"sender_id": "<string>",
"email": "<string>",
"status": "<string>",
"seeds_total": 123,
"seeds_sent": 123,
"summary": {
"inbox": 0,
"other": 0,
"spam": 0,
"missing": 0,
"not_sent": 0,
"pending": 0,
"seeds": 0,
"inbox_rate": 123,
"other_rate": 123,
"spam_rate": 123,
"missing_rate": 123
},
"providers": [
{
"groups": [
{
"label": "<string>",
"inbox": 0,
"other": 0,
"spam": 0,
"missing": 0,
"not_sent": 0,
"pending": 0
}
],
"inbox": 0,
"other": 0,
"spam": 0,
"missing": 0,
"not_sent": 0,
"pending": 0,
"provider": "<string>"
}
],
"report": {
"blocklists": [
"<string>"
],
"spam_words": [
"<string>"
],
"score": 123,
"spf_valid": true,
"dkim_valid": true,
"dmarc_valid": true
},
"completed_at": "2023-11-07T05:31:56Z"
}
],
"credits_remaining": 123,
"completed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}Email
Start an inbox placement test
Costs credits for each sender tested; the response reports the credits charged and remaining. Requires an Idempotency-Key header: sending the same key again returns the same test and charges nothing. The test takes about 15 minutes. Read its status at the URL in the Location header.
POST
/
v1
/
email
/
placement-tests
Start an inbox placement test
curl --request POST \
--url https://api.getcluster.ai/v1/email/placement-tests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"sender_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"subject": "<string>",
"body": "<string>",
"name": "<string>",
"body_format": "plain_text"
}
'import requests
url = "https://api.getcluster.ai/v1/email/placement-tests"
payload = {
"sender_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"subject": "<string>",
"body": "<string>",
"name": "<string>",
"body_format": "plain_text"
}
headers = {
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
sender_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
subject: '<string>',
body: JSON.stringify('<string>'),
name: '<string>',
body_format: 'plain_text'
})
};
fetch('https://api.getcluster.ai/v1/email/placement-tests', 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.getcluster.ai/v1/email/placement-tests",
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([
'sender_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'subject' => '<string>',
'body' => '<string>',
'name' => '<string>',
'body_format' => 'plain_text'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-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.getcluster.ai/v1/email/placement-tests"
payload := strings.NewReader("{\n \"sender_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"body_format\": \"plain_text\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.getcluster.ai/v1/email/placement-tests")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sender_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"body_format\": \"plain_text\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getcluster.ai/v1/email/placement-tests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sender_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"body_format\": \"plain_text\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"status": "<string>",
"subject": "<string>",
"credits_charged": 123,
"sender_count": 123,
"summary": {
"inbox": 0,
"other": 0,
"spam": 0,
"missing": 0,
"not_sent": 0,
"pending": 0,
"seeds": 0,
"inbox_rate": 123,
"other_rate": 123,
"spam_rate": 123,
"missing_rate": 123
},
"senders": [
{
"sender_id": "<string>",
"email": "<string>",
"status": "<string>",
"seeds_total": 123,
"seeds_sent": 123,
"summary": {
"inbox": 0,
"other": 0,
"spam": 0,
"missing": 0,
"not_sent": 0,
"pending": 0,
"seeds": 0,
"inbox_rate": 123,
"other_rate": 123,
"spam_rate": 123,
"missing_rate": 123
},
"providers": [
{
"groups": [
{
"label": "<string>",
"inbox": 0,
"other": 0,
"spam": 0,
"missing": 0,
"not_sent": 0,
"pending": 0
}
],
"inbox": 0,
"other": 0,
"spam": 0,
"missing": 0,
"not_sent": 0,
"pending": 0,
"provider": "<string>"
}
],
"report": {
"blocklists": [
"<string>"
],
"spam_words": [
"<string>"
],
"score": 123,
"spf_valid": true,
"dkim_valid": true,
"dmarc_valid": true
},
"completed_at": "2023-11-07T05:31:56Z"
}
],
"credits_remaining": 123,
"completed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}Authorizations
Body
application/json
Response
Successful Response