/api/test-emails/{test_email_id}AuthenticatedRead one email captured by the test-database transport
Reads a single fake-sent email by ID (the ID is also returned as the transport's message ID), including its attachments' base64-encoded content.
getTestEmailTest 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.
Path parameters
| Name | Type | Description |
|---|---|---|
| test_email_id* | string (uuid) | ID of the captured test email. |
Responses
| Property | Type | Description |
|---|---|---|
| success* | true | |
| data* | TestEmail | An email captured by the test-database-transport instead of being delivered. Used to verify /api/send behavior in E2E tests. |
| 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* | TestEmailAttachment[] | The email's attachments, in the order they were sent (empty when it had none). |
| 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 |
| content* | string | The attachment's bytes, base64-encoded. |
Example request
curl -X GET 'https://mail.schemavaults.com/api/test-emails/<test_email_id>' \
-H 'Authorization: Bearer <access_token>'