---
title: "Return email delivery records by search criteria"
method: GET
path: "/emailtrack_search"
tags: ["Mail", "cPanel Account Mail Management"]
---

# Return email delivery records by search criteria

`GET /emailtrack_search`

This function retrieves email delivery records.

**Warning:**

* On most servers, this function returns a large amount of output. We **strongly**
recommend that you [filter](https://go.cpanel.net/WHMAPI1FilterOutput) and
[sort](https://go.cpanel.net/WHMAPI1SortOutput) the output.
* The following example uses the filter and sort options:

  `https://hostname.example.com:2087/cpsess##########/json-api/emailtrack_search?api.version=1&api.filter.enable=1&api.filter.a.field=sendunixtime&api.filter.a.arg0=1628889719&api.filter.a.type=gt&api.filter.b.field=sendunixtime&api.filter.b.arg0=1629847321&api.filter.b.type=lt&api.sort.enable=1&api.sort.a.field=sendunixtime&api.sort.a.reverse=0&api.chunk.enable=1&api.chunk.size=25&api.chunk.start=1&success=1`

## Query parameters

- `defer` 0 | 1
- `deliverytype` 'all' | 'remote' | 'local'
- `failure` 0 | 1
- `inprogress` 0 | 1
- `max_results_by_type` integer
- `success` 0 | 1

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `records` object[] — An array of objects containing the delivery record.
      - `actiontime` string — When the delivery attempt happened in `YYYY-MM-DD HH-mm-SS` format.
      - `actionunixtime` integer — When the delivery attempt happened.
      - `deliveredto` string, nullable — The delivery attempt's final end point. **Note:** If the message went to a mailing list, the address will be the mailing list member's address.
      - `deliverydomain` string, domain, nullable — The recipient's domain.
      - `deliveryuser` string, nullable — The recipient's username.
      - `domain` string, domain — The sender's domain.
      - `host` string, hostname, nullable — The hostname that received the message.
      - `ip` string, ipv4, nullable — The recipient's IP address.
      - `message` string — The action taken.
      - `msgid` string — The message ID.
      - `recipient` string, email — The recipient's mail address.
      - `router` string — The mail server's internal router name.
      - `sender` string — The sender's full email address.
      - `senderauth` string, hostname — The user authentication.
      - `senderhost` string, hostname — The sender's hostname.
      - `senderip` string — The sender's IP address.
      - `sendunixtime` integer — When the message was sent.
      - `size` integer — The message's size.
      - `spamscore` integer — The message's spam score. **Note:** If the spam prevention engine uses a result range from `0` to `1` , the system multiplies the result by `10`.
      - `transport` string, nullable — The mail transfer agent (MTA).
      - `transport_is_remote` 0 | 1 — Whether the mail transfer agent (MTA) is remote. * `1` — Remote. * `0` — Not remote.
      - `type` 'success' | 'defer' | 'failure' | 'inprogress' — The delivery status. * `success` * `defer` * `failure` * `inprogress`
      - `user` string — The sender's username.
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.
    - `result` 0 | 1 — * `1` — Success * `0` — Failed: Check the reason field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
