/api/test-emailsAuthenticatedList emails captured by the test-database transport
Lists emails 'sent' through the fake test-database-transport, newest first. Attachments are listed without their content; read an email by ID for that. Intended for E2E tests verifying the full /api/send flow without real delivery.
listTestEmailsTest EmailsAuthentication & permissionsAuthenticated
Any authenticated user
- Accepted credentials
- Mail-server API key (Bearer)
Authorization: Bearer <token> - Access token (Bearer)
Authorization: Bearer <JWT> - Access token (cookie)
cookie "access_token_schemavaults-mail"
- Mail-server API key (Bearer)
- Who may call
- Any authenticated user
- Notes
- Access tokens must belong to an admin (other users get 403). Admins may always read. API keys may read only when their transport scope permits the test-database transport (zero transport-scope entries = unrestricted), the same rule /api/send applies to sending through it.
Query parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Page size (default 50, max 200). |
| offset | integer | null | Rows to skip, for paging (default 0). |
Responses
| Property | Type | Description |
|---|---|---|
| success* | true | |
| data* | TestEmailSummary[] | |
| test_email_id* | string (uuid) | |
| from_address* | string | The |
| to_addresses* | string[] | Recipient addresses, after any mailing-list expansion. minItems: 1 |
| cc_addresses* | string[] | |
| bcc_addresses* | string[] | |
| reply_to_addresses* | string[] | |
| subject* | string | |
| html* | string | null | null | Rendered HTML body (templates are rendered before the transport runs), or null for text-only sends. |
| text* | string | null | null | |
| created_at* | number | Unix epoch milliseconds when the fake send was stored. minimum: 0 |
| attachments* | TestEmailAttachmentMetadata[] | The email's attachments without their content, in the order they were sent (empty when it had none). Read the email by ID for the content. |
| filename* | string | |
| content_type* | string | null | null | The MIME type exactly as the sender passed it, or null when it was omitted (the real transports derive it from the filename). |
| content_id* | string | null | null | The Content-ID of an inline attachment (referenced from the HTML as |
| size_bytes* | integer | Decoded size of the attachment, in bytes. minimum: 0 |
Example request
curl -X GET 'https://mail.schemavaults.com/api/test-emails' \
-H 'Authorization: Bearer <access_token>'