Create a draft test, send the email you want to test to the returned address, then configure the schedule and activate it.
Step 1. Create a draft test. The response returns the test id and the inbox_address.
curl -X POST https://api.unspam.email/ext/v2/scheduled-tests \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"id": "9b1c7e84-2f3a-4d6b-8c11-7a5e0d9f4321",
"status": "draft",
"inbox_address": "test-9b1c7e84@inbox.unspam.email"
}
Step 2. Send the email you want to test to the returned inbox_address.
# Send your email (from your mail client / ESP) to the inbox_address above.
# This captures the template every run will deliver.
# Wait a few moments for it to be received before continuing.
Step 3. Poll the test with a GET request to check whether the email has arrived. While the test is still in draft and email_subject / email_from are null, the email has not been received yet. Once it is received, those fields are populated — you can then configure the schedule and activate the test.
curl https://api.unspam.email/ext/v2/scheduled-tests/9b1c7e84-2f3a-4d6b-8c11-7a5e0d9f4321 \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"id": "9b1c7e84-2f3a-4d6b-8c11-7a5e0d9f4321",
"status": "draft",
"email_subject": "Welcome to our newsletter",
"email_from": "news@yourdomain.com",
"...": "..."
}
Step 4. Configure the test and set status to active so it runs on schedule. Use the sender id from the previous example as sender_uuid and mailbox IDs from Available Mailboxes as providers.
curl -X PUT https://api.unspam.email/ext/v2/scheduled-tests/9b1c7e84-2f3a-4d6b-8c11-7a5e0d9f4321 \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My automatic test",
"status": "active",
"sender_uuid": "2ded86a5-b2d9-4f29-921f-1aca66350209",
"providers": [3, 7, 23],
"schedule": {
"start_at": "2026-06-18T10:21:00Z",
"type": "week",
"days": []
},
"alert_settings": {
"mode": "all",
"spam_level": null
}
}'