latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

Mail
cPanel Account Mail Management

Return email delivery records by search criteria

This function retrieves email delivery records.

Warning:

  • On most servers, this function returns a large amount of output. We strongly recommend that you filter and sort 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

get/emailtrack_search

Query parameters

defer0 | 1

Whether to return delivery deferral events.

  • 1 — Return delivery deferral events.
  • 0 — Do not return delivery deferral events.
deliverytype'all' | 'remote' | 'local'
Example:all

The type of delivery records to retrieve.

  • all — Retrieve all delivery records.
  • remote — Retrieve remote delivery records.
  • local — Retrieve local delivery records.
failure0 | 1

Whether to return delivery failure events.

  • 1 — Return delivery failure events.
  • 0 — Do not return delivery failure events.
inprogress0 | 1

Whether to return delivery attempts in progress.

  • 1 — Return delivery attempts in progress.
  • 0 — Do not return delivery attempts in progress.
max_results_by_typeinteger
Example:3

The number of results to return for each type.

Note

If you set this parameter to 0, the function returns unlimited results.

success0 | 1

Whether to return successful delivery attempts.

  • 1 — Return successful delivery attempts.
  • 0 — Do not return successful delivery attempts.

Response

HTTP Request was successful.

Example response

{
  "data": {
    "records": [
      {
        "actiontime": "2012-02-06T14:17:51.000Z",
        "actionunixtime": 1328559471,
        "domain": "example.com",
        "message": "Domain example.com has exceeded the max defers and failures per hour (5/5 (100%)) allowed. Message discarded.",
        "msgid": "1RuV0Z-0005NR-BN",
        "recipient": "user@example.com",
        "router": "enforce_mail_permissions",
        "sender": "user@example.com",
        "senderauth": "localuser",
        "senderhost": "localhost",
        "senderip": "127.0.0.1",
        "sendunixtime": 1328559471,
        "size": 1653,
        "spamscore": 5,
        "type": "success",
        "user": "cpanel1"
      }
    ]
  },
  "metadata": {
    "command": "emailtrack_search",
    "reason": "OK",
    "result": 1,
    "version": 1
  }
}