Get an email
const url = 'https://api.vaartix.com/emails/em_7hq2kv9xr4m1c8d3';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.vaartix.com/emails/em_7hq2kv9xr4m1c8d3 \ --header 'Authorization: Bearer <token>'An email with its content and full event timeline. Requires a full-access key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
em_7hq2kv9xr4m1c8d3Responses
Section titled “Responses”The email.
object
See the status guide for what each one means.
object
Attachment details (the content is not kept after sending).
object
Size in bytes.
Why the email failed, if it did.
object
Oldest first.
object
Details such as the bounce type, the SMTP response or the suppression reason.
object
Example
{ "status": "queued", "tags": [ { "name": "category", "value": "receipt" } ], "events": [ { "type": "sent" } ]}unauthorized: the API key is missing, invalid or revoked.
object
object
Stable, machine-readable error type.
Human-readable explanation, safe to show to developers.
Example
{ "error": { "type": "validation_error" }}forbidden: the key cannot do this, for example a send-only key on a management endpoint.
object
object
Stable, machine-readable error type.
Human-readable explanation, safe to show to developers.
Example
{ "error": { "type": "validation_error" }}not_found: no such resource in your team.
object
object
Stable, machine-readable error type.
Human-readable explanation, safe to show to developers.
Example
{ "error": { "type": "validation_error" }}