# Trace ## Get email trace `email_security.investigate.trace.get(strpostfix_id, TraceGetParams**kwargs) -> TraceGetResponse` **get** `/accounts/{account_id}/email-security/investigate/{postfix_id}/trace` Gets the delivery trace for an email message, showing its path through email security processing. ### Parameters - `account_id: str` Account Identifier - `postfix_id: str` The identifier of the message. ### Returns - `class TraceGetResponse: …` - `inbound: Inbound` - `lines: Optional[List[InboundLine]]` - `lineno: int` - `message: str` - `ts: datetime` - `pending: Optional[bool]` - `outbound: Outbound` - `lines: Optional[List[OutboundLine]]` - `lineno: int` - `message: str` - `ts: datetime` - `pending: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) trace = client.email_security.investigate.trace.get( postfix_id="4Njp3P0STMz2c02Q", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(trace.inbound) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "inbound": { "lines": [ { "lineno": 0, "message": "message", "ts": "2019-12-27T18:11:19.117Z" } ], "pending": true }, "outbound": { "lines": [ { "lineno": 0, "message": "message", "ts": "2019-12-27T18:11:19.117Z" } ], "pending": true } }, "success": true } ``` ## Domain Types ### Trace Get Response - `class TraceGetResponse: …` - `inbound: Inbound` - `lines: Optional[List[InboundLine]]` - `lineno: int` - `message: str` - `ts: datetime` - `pending: Optional[bool]` - `outbound: Outbound` - `lines: Optional[List[OutboundLine]]` - `lineno: int` - `message: str` - `ts: datetime` - `pending: Optional[bool]`