List automated tests

Returns automated tests belonging to the current project. Results are paginated, 25 per page (page is zero-indexed).

The list can be narrowed down with the following query parameters. They can be combined — every result must match each parameter that is provided.

  • search — full-text query matched against the test message subject and the email of every account associated to the test. Matching is case-insensitive, supports partial-word matches, and tokenizes emails on +, -, @ and . so john, acme.com, or john@acme.com all return the test linked to john@acme.com. Omit to skip text search.
  • active — boolean filter on the test status. true returns only active tests, false only inactive ones. Omit to return both.
  • sort — field to sort results by. One of last_run_at or created_at. Omit to keep the default ordering (relevance when search is provided, most recently created first otherwise).
  • order — sort direction, asc (oldest first) or desc (newest first). Only applied when sort is provided. Defaults to desc.
  • page — zero-indexed page number, 25 results per page.
Query Parameters
  • page
    Type: integerFormat: int32

    Zero-indexed page number. Each page contains up to 25 automated tests.

  • search
    Type: string

    Full-text search query matched against the test message subject and the emails of associated accounts.

  • active
    Type: boolean

    When provided, returns only active tests (true) or only inactive ones (false). Omit to return both.

  • sort
    Type: stringenum

    Field to sort results by. Omit to keep the default ordering.

    values
    • last_run_at
    • created_at
  • order
    Type: stringenum

    Sort direction, asc or desc. Only applied when sort is provided.

    values
    • asc
    • desc
Responses
  • application/json
  • application/json
Request Example for get/v1/automated_tests
curl 'http://api.mailreach.co/api/v1/automated_tests?page=0&search=monthly%20check&active=true&sort=last_run_at&order=desc' \
  --header 'X-Api-Key: YOUR_SECRET_TOKEN'
[
  {
    "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
        ]
      }
    ]
  }
]