---
title: "Run email delivery route trace"
method: GET
path: "/Email/trace_delivery"
tags: ["Email", "Email Accounts"]
---

# Run email delivery route trace

`GET /Email/trace_delivery`

This function traces the email delivery route to an email account.

## Query parameters

- `recipient` string, required

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` union
      - object
        - `address` string, email — The email address of an email message recipient.
        - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value. For more information, see the return structure for each `type` return value below:
        - `destinations` object
          - `message` string — A message that the system sends when it rejects the delivery of an email.
          - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value.
      - object
        - `address` string, email — The email address of an email message recipient.
        - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value. For more information, see the return structure for each `type` return value below:
        - `destinations` object
          - `command` string — A command that the system runs when it receives the email.
          - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value.
      - object
        - `address` string, email — The email address of an email message recipient.
        - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value. For more information, see the return structure for each `type` return value below:
        - `destinations` object
          - `message` string — A message that the system sends when it defers the email.
          - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value.
      - object
        - `address` string, email — The email address of an email message recipient.
        - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value. For more information, see the return structure for each `type` return value below:
        - `destinations` object
          - `aliasfile` string, path — The file path on the system where Exim searched for the `address` return value's aliases. **Note:** The function **only** returns this value if an alias exists for the `address` value.
          - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value.
      - object
        - `address` string, email — The email address of an email message recipient.
        - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value. For more information, see the return structure for each `type` return value below:
        - `destinations` object
          - `message` string — An error message from the system.
          - `result` string — An error message.
          - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value.
      - object
        - `address` string, email — The email address of an email message recipient.
        - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value. For more information, see the return structure for each `type` return value below:
        - `destinations` object
          - `mailbox` string, email — The mailbox where the system sent the email.
          - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value.
      - object
        - `address` string, email — The email address of an email message recipient.
        - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value. For more information, see the return structure for each `type` return value below:
        - `destinations` object[]
          - `mx` string[] — An array of strings containing [mail exchanger (MX) information](https://en.wikipedia.org/wiki/MX_record). Each string contains information for a single mail exchanger (MX), including: * The server's hostname. * The server's resolving IP address. * The MX record's priority. The lower the value, the higher its priority. * Whether DNSSEC is enabled for the hostname.
          - `type` string — A type of trace node. The system returns this value to indicate the **end** of routing. * `bounce` - The system rejected the email's delivery. * `command` - The system will run a command when it receives an email. * `defer` - The system deferred the email. * `discard` - The system discarded the email. * `error` - The system encountered an error. * `local_delivery` - The system sent the email to a local mailbox. * `remote_delivery` - The system sent the email via Simple Mail Transfer Protocol (SMTP). * `routed` - The system routed the email elsewhere. **Note:** * The structure of the `destinations` return changes depending on the `type` return value. * The `routed` type can return any other type's data structure as part of the `destinations` return value.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 0 | 1 — * `1` - Success * `0` - Failed: Check the errors field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

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