# Return email delivery records by search criteria This function retrieves email delivery records. * On most servers, this function returns a large amount of output. We recommend that you filter and sort the output. * The following example uses the filter and sort options: Endpoint: GET /emailtrack_search Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `defer` (integer) Whether to return delivery deferral events. * — Return delivery deferral events. * — Do not return delivery deferral events. Enum: 0, 1 - `deliverytype` (string) The type of delivery records to retrieve. * — Retrieve all delivery records. * — Retrieve remote delivery records. * — Retrieve local delivery records. Enum: "all", "remote", "local" - `failure` (integer) Whether to return delivery failure events. * — Return delivery failure events. * — Do not return delivery failure events. Enum: 0, 1 - `inprogress` (integer) Whether to return delivery attempts in progress. * — Return delivery attempts in progress. * — Do not return delivery attempts in progress. Enum: 0, 1 - `max_results_by_type` (integer) The number of results to return for each type. If you set this parameter to , the function returns unlimited results. Example: 3 - `success` (integer) Whether to return successful delivery attempts. * — Return successful delivery attempts. * — Do not return successful delivery attempts. Enum: 0, 1 ## Response 200 fields (application/json): - `data` (object) - `data.records` (array) An array of objects containing the delivery record. - `data.records.actiontime` (string) When the delivery attempt happened in format. Example: "2012-02-06T14:17:51.000Z" - `data.records.actionunixtime` (integer) When the delivery attempt happened. Example: 1328559471 - `data.records.deliveredto` (string,null) The delivery attempt's final end point. If the message went to a mailing list, the address will be the mailing list member's address. - `data.records.deliverydomain` (string,null) The recipient's domain. - `data.records.deliveryuser` (string,null) The recipient's username. - `data.records.domain` (string) The sender's domain. Example: "example.com" - `data.records.host` (string,null) The hostname that received the message. - `data.records.ip` (string,null) The recipient's IP address. - `data.records.message` (string) The action taken. Example: "Domain example.com has exceeded the max defers and failures per hour (5/5 (100%)) allowed. Message discarded." - `data.records.msgid` (string) The message ID. Example: "1RuV0Z-0005NR-BN" - `data.records.recipient` (string) The recipient's mail address. Example: "user@example.com" - `data.records.router` (string) The mail server's internal router name. Example: "enforce_mail_permissions" - `data.records.sender` (string) The sender's full email address. Example: "user@example.com" - `data.records.senderauth` (string) The user authentication. Example: "localuser" - `data.records.senderhost` (string) The sender's hostname. Example: "localhost" - `data.records.senderip` (string) The sender's IP address. Example: "127.0.0.1" - `data.records.sendunixtime` (integer) When the message was sent. Example: 1328559471 - `data.records.size` (integer) The message's size. Example: 1653 - `data.records.spamscore` (integer) The message's spam score. If the spam prevention engine uses a result range from to , the system multiplies the result by . Example: 5 - `data.records.transport` (string,null) The mail transfer agent (MTA). - `data.records.transport_is_remote` (integer) Whether the mail transfer agent (MTA) is remote. * — Remote. * — Not remote. Enum: 0, 1 - `data.records.type` (string) The delivery status. * * * * Enum: "success", "defer", "failure", "inprogress" - `data.records.user` (string) The sender's username. Example: "cpanel1" - `metadata` (object) - `metadata.command` (string) The method name called. Example: "emailtrack_search" - `metadata.reason` (string) The reason the API function failed when the field is . This field may display a success message when a function succeeds. Example: "OK" - `metadata.result` (integer) * — Success * — Failed: Check the reason field for more details. Enum: 0, 1 - `metadata.version` (integer) The version of the API function. Example: 1