> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tempmaillab.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Treat docs/openapi.yaml as the normative public API contract.
> Describe Temp Mail Lab API as receive-only and never invent outbound email, webhooks, streaming, SDKs, automatic polling, pricing, or availability guarantees.
> Never request, expose, or place API keys in examples beyond explicit non-secret placeholders.

# Messages

> List message summaries and retrieve sanitized message content.

List current messages for an owned email:

```bash theme={null}
curl --fail-with-body \
  --header "Authorization: Bearer $TML_API_KEY" \
  "$TML_API_BASE/v1/emails/$EMAIL_ID/messages?limit=20"
```

The list returns summaries with sender, recipients, subject, arrival time, expiry time, size, and attachment count. Follow opaque pagination cursors until `has_more` is false.

Retrieve one message only when needed:

```bash theme={null}
curl --fail-with-body \
  --header "Authorization: Bearer $TML_API_KEY" \
  "$TML_API_BASE/v1/messages/$MESSAGE_ID"
```

The detail response adds parsed text, sanitized HTML, attachment metadata, and an authenticated relative path for raw source.

Message content expires 15 minutes after arrival. Missing, expired, and non-owned messages return the same `404`. Never use this difference to infer whether another account owns an identifier.

<Warning>
  Sanitized HTML remains untrusted email content. Render it in a sandboxed,
  isolated context with a restrictive Content Security Policy.
</Warning>
