---
title: "List/Search Tests V2"
method: GET
path: "/v2/preview/tests"
tags: ["Email Preview"]
---

# List/Search Tests V2

`GET /v2/preview/tests`

## Request

- Base URL: `https://api.mailgun.net`
- URL: `https://api.mailgun.net/v2/preview/tests`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/mailgun/apis/email-preview-api/docs/v2/preview/tests/get.ts> (a function with typed inputs; its response is checked against the schema)

This call returns a list of Email Tests along with metadata about each test. Email Tests are stored for 90 days. When query parameters are provided, only the tests matching the specified criteria will be returned; otherwise, all available tests are returned. The response structure remains identical in both cases.

## Query parameters

- `customer_id` string
- `from` string
- `to` string
- `subject` string
- `headers` string
- `results` integer
- `page` integer

## Response `200`

A 200 response

- object[]
  - `id` string
  - `date` integer
  - `type` string
  - `subject` string
  - `headers` object

## Other responses

- `400`: A 400 response
- `401`: A 401 response
- `500`: A 500 response
- `default`: A default response

---

[API](https://skmtc.dev/mailgun/apis/email-preview-api.md) - [All operations](https://skmtc.dev/mailgun/apis/email-preview-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mailgun/apis/email-preview-api/revisions/c8a18f02bc8b?raw)
