> ## 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 messages and retrieve parsed content, source, and attachments.

List the current messages for an inbox:

```bash theme={null}
curl --fail-with-body \
  --header "Authorization: Bearer YOUR_API_KEY" \
  https://api.tempmaillab.com/v1/emails/eml_example/messages
```

An empty `data` array means no message is currently available. The API does not wait for mail, so your application decides when to request the list and when to stop.

## Read parsed content

```bash theme={null}
curl --fail-with-body \
  --header "Authorization: Bearer YOUR_API_KEY" \
  https://api.tempmaillab.com/v1/messages/msg_example
```

The response includes `text`, sanitized `html`, sender and recipient fields, subject, timestamps, and attachment metadata. Message content expires 15 minutes after arrival; use the returned `expires_at` value as the deadline.

## Download source or an attachment

```bash theme={null}
curl --fail-with-body \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --output message.eml \
  https://api.tempmaillab.com/v1/messages/msg_example/source
```

```bash theme={null}
curl --fail-with-body \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --output attachment.bin \
  https://api.tempmaillab.com/v1/messages/msg_example/attachments/att_example
```

The current attachment limits are 10 files per message, 5 MiB per file, and 8 MiB total decoded attachment data.

Email is untrusted input. Isolate rendered HTML and validate downloaded files before using them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.