Create an automated test
Creates a new automated test attached to an account. Automated tests run a spam test on a recurring schedule (every X days or weeks) so you can monitor inbox placement over time without triggering each test manually.
Before you can create an automated test, the target account must be connected to MailReach. If the account is only used for automated tests and not for warming/monitoring, set spamchecker_only: true when connecting it (see POST /v1/imap_auth or the Email Workspaces endpoints) — no warming seat is charged in that case.
Once created, use the other endpoints in this section to set the schedule (repeat_period, repeat_period_delay, hour, time_zone, weekdays), pick an audience (btob / btoc), and activate it.
Create an automated test
- Type: integerFormat: int32account
_id requiredID of the account the automated test should run on. The account must belong to the current project.
- application/json
- application/json
curl http://api.mailreach.co/api/v1/automated_tests \
--request POST \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: YOUR_SECRET_TOKEN' \
--data '{
"account_id": 1234
}'
{
"id": 54594,
"key": "3f6bc4496ba74bdc42",
"subject": "Monthly inbox placement check",
"content_text": "Hello, this is a test message.",
"content_html": "<p>Hello, this is a test message.</p>",
"automated_test_runs": [
{
"id": 4242,
"automated_test_id": 42,
"weekday": 2,
"last_run_at": "2026-04-21T11:22:12.271Z",
"created_at": "2024-10-14T12:23:06.786Z",
"updated_at": "2026-04-21T11:22:12.274Z"
}
],
"template_defined": false,
"btoc": false,
"btob": false,
"accounts": [
{
"id": 1234,
"email": "john@acme.com",
"first_name": "John",
"last_name": "Doe"
}
],
"repeat_period": "WEEK",
"repeat_period_delay": 1,
"time_zone": "UTC",
"utc_hour": 7,
"hour": 9,
"active": false,
"last_run_at": "2026-04-20T08:00:00.000Z",
"created_at": "2026-04-24T08:48:04.924Z",
"can_show_run_now": true,
"account_day_delta": 564,
"account_ids": [
1234
],
"seedlist": 0,
"alerts": [
{
"id": 42,
"channel": "SLACK",
"events": [
"ACCOUNT_DISCONNECTED",
"SPAMCHECK_COMPLETED"
],
"active": true,
"hook_url": "https://example.com/hooks/mailreach",
"slack_channel_id": 42,
"automated_test_ids": [
12,
34
]
}
]
}