Start a placement test
POST/v1/placement-tests
Start an inbox placement test: see whether a message lands in the inbox, a Gmail tab or spam at the big mailbox providers.
Requires a full-access live key; test keys get 403 test_key_restricted.
With a message (from and content, or a template) one copy goes to each seed mailbox through your account, like any send (each counts as a sent email; test keys cannot). Without one the test is manual: send your message to every address in results from anywhere, with token in the subject or text, within 2 hours.
ZapSMTP then reads each seed mailbox (Gmail, Outlook, Yahoo and others) and records where the copy landed: inbox, a Gmail tab (promotions, social, updates, forums), spam, or missing once the test ends (15 minutes after a send). auth is the provider's own SPF, DKIM and DMARC verdict.
status is running until every seed has an answer or the test ends, then done. summary.inbox_rate = inbox (any tab) / seeds with an answer.
Your plan includes a number of tests a month (Free 1, Pro 10, Scale 50); over it: 429 monthly_quota_exceeded.
Body parameters
fromstring- Sender on one of your verified domains. Leave out (with
template) for a manual test. subjectstring- As in Send an email.
htmlstring- As in Send an email.
textstring- As in Send an email.
templateobject- A stored template and its variables, as in Send an email.
headersobject- Extra headers, as in Send an email.
tagsobject[]- As in Send an email.
streamstring- As in Send an email.
Errors
test_key_restrictedHTTP 403- test-mode keys can send test email and read, not change the account: use a live key
monthly_quota_exceededHTTP 429- this month's inbox placement tests of the plan are used up
service_unavailableHTTP 503- no seed mailboxes are configured
curl -X POST 'https://api.zapsmtp.com/v1/placement-tests' \
-H "Authorization: Bearer $ZAP_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"from": "News <news@example.com>",
"subject": "November offers",
"html": "<p>Our November offers</p>"
}'const res = await fetch('https://api.zapsmtp.com/v1/placement-tests', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.ZAP_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"from": "News <news@example.com>",
"subject": "November offers",
"html": "<p>Our November offers</p>"
}),
});
// 204 No Content (e.g. a delete) has no body
const data = res.status === 204 ? null : await res.json();
if (!res.ok) throw new Error(`${data.name}: ${data.message}`);
console.log(data);import os
import requests
res = requests.post(
"https://api.zapsmtp.com/v1/placement-tests",
headers={"Authorization": f"Bearer {os.environ['ZAP_API_KEY']}"},
json={
"from": "News <news@example.com>",
"subject": "November offers",
"html": "<p>Our November offers</p>",
},
timeout=30,
)
res.raise_for_status()
print(res.json() if res.status_code != 204 else "deleted")<?php
$ch = curl_init('https://api.zapsmtp.com/v1/placement-tests');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ZAP_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'from' => 'News <news@example.com>',
'subject' => 'November offers',
'html' => '<p>Our November offers</p>',
]),
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException($data['message']);
}
print_r($data);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"from": "News <news@example.com>",
"subject": "November offers",
"html": "<p>Our November offers</p>"
}`)
req, err := http.NewRequest(
"POST",
"https://api.zapsmtp.com/v1/placement-tests",
body,
)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ZAP_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}require 'net/http'
require 'json'
uri = URI('https://api.zapsmtp.com/v1/placement-tests')
req = Net::HTTP::Post.new(uri)
req['Authorization'] = "Bearer #{ENV.fetch('ZAP_API_KEY')}"
req['Content-Type'] = 'application/json'
req.body = {
from: "News <news@example.com>",
subject: "November offers",
html: "<p>Our November offers</p>"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.code, (JSON.parse(res.body) unless res.body.to_s.empty?)import java.net.URI;
import java.net.http.*;
public class ZapRequest {
public static void main(String[] args) throws Exception {
var request = HttpRequest.newBuilder(URI.create("https://api.zapsmtp.com/v1/placement-tests"))
.header("Authorization", "Bearer " + System.getenv("ZAP_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"from": "News <news@example.com>",
"subject": "November offers",
"html": "<p>Our November offers</p>"
}"""))
.build();
var response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System.Net.Http.Headers;
using System.Text;
using var http = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.zapsmtp.com/v1/placement-tests");
request.Headers.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("ZAP_API_KEY"));
request.Content = new StringContent("""
{
"from": "News <news@example.com>",
"subject": "November offers",
"html": "<p>Our November offers</p>"
}
""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");ZAP_API_KEY in your environment.Response 201 Created
{
"object": "placement_test",
"id": "019a2b10-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
"mode": "send",
"token": "zp-4f9k2m8q1x7c3v5b",
"from": "News <news@example.com>",
"subject": "November offers",
"status": "running",
"created_at": "2026-11-02T10:00:00Z",
"ends_at": "2026-11-02T10:15:00Z",
"finished_at": null,
"results": [
{
"provider": "gmail",
"address": "seed1@gmail.com",
"email_id": "019a2b10-5c6d-7e8f-9a0b-1c2d3e4f5a6b",
"placement": null,
"folder": null,
"received_at": null,
"auth": null
},
{
"provider": "outlook",
"address": "seed1@outlook.com",
"email_id": "019a2b10-5c6d-7e8f-9a0b-1c2d3e4f5a6b",
"placement": null,
"folder": null,
"received_at": null,
"auth": null
},
{
"provider": "yahoo",
"address": "seed1@yahoo.com",
"email_id": "019a2b10-5c6d-7e8f-9a0b-1c2d3e4f5a6b",
"placement": null,
"folder": null,
"received_at": null,
"auth": null
}
],
"summary": {
"total": 3,
"inbox": 0,
"primary": 0,
"promotions": 0,
"social": 0,
"updates": 0,
"forums": 0,
"spam": 0,
"missing": 0,
"pending": 3,
"inbox_rate": 0
}
}