Update an automated test

Updates the configuration of an automated test: schedule (repeat_period, repeat_period_delay, hour, time_zone), audience (btob, btoc), seedlist, the associated account, and whether it is active.

Use POST /v1/automated_tests/:id/runs to set the weekdays the test should run on.

Path Parameters
  • id
    Type: integerFormat: int32
    required

    ID of the automated test to update.

Body·
required
application/json

Update an automated test

  • active
    Type: boolean
    required

    Whether the automated test is active. Inactive tests are not scheduled.

  • account_id
    Type: integerFormat: int32

    If provided, re-associates the automated test with this account. Must belong to the current project.

  • btob
    Type: boolean

    If true, the test targets a business (B2B) audience — Google Workspace and Office 365.

  • btoc
    Type: boolean

    If true, the test targets a consumer (B2C) audience — Gmail, Outlook.com, Hotmail, Yahoo.

  • hour
    Type: integerFormat: int32
    min:  
    0
    max:  
    23

    Local hour of the day (0–23) at which the test should run, in the provided time_zone.

  • repeat_period
    Type: stringenum

    Unit of the recurrence interval. One of WEEK or DAY.

    values
    • WEEK
    • DAY
  • repeat_period_delay
    Type: integerFormat: int32

    How many repeat_period units to wait between two runs. For example, repeat_period: "WEEK" + repeat_period_delay: 2 runs every two weeks.

  • seedlist
    Type: integerFormat: int32enum

    Seedlist identifier used for the test. One of 0, 1, 2, 3 or 4.

    values
    • 0
    • 1
    • 2
    • 3
    • 4
  • time_zone
    Type: string

    IANA time zone name used to interpret hour. Defaults to the project timezone when omitted.

Responses
  • application/json
  • application/json
Request Example for post/v1/automated_tests/{id}
curl http://api.mailreach.co/api/v1/automated_tests/42 \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "account_id": 1234,
  "repeat_period_delay": 1,
  "repeat_period": "WEEK",
  "btoc": false,
  "btob": true,
  "active": true,
  "seedlist": 1,
  "hour": 9,
  "time_zone": "Europe/Paris"
}'
{
  "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
      ]
    }
  ]
}