List emails
GET
/emails
const url = 'https://api.vaartix.com/emails?limit=20&before=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?limit=20&before=em_7hq2kv9xr4m1c8d3' \ --header 'Authorization: Bearer <token>'Your team’s emails, newest first. Requires a full-access key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer
How many emails to return (1-100).
before
string
Return emails older than this email ID. Use the last ID of the previous page.
Example
em_7hq2kv9xr4m1c8d3Responses
Section titled “Responses”A page of emails.
Media typeapplication/json
object
data
required
Array<object>
object
id
string
from
string
to
Array<string>
cc
Array<string>
bcc
Array<string>
replyTo
Array<string>
subject
string
status
See the status guide for what each one means.
string
tags
Array<object>
object
name
required
string
value
required
string
attachments
Attachment details (the content is not kept after sending).
Array<object>
object
filename
string
contentType
string
size
Size in bytes.
integer
scheduledAt
string | null format: date-time
sentAt
string | null format: date-time
lastEventAt
string | null format: date-time
error
Why the email failed, if it did.
string | null
createdAt
string format: date-time
hasMore
required
True if older emails exist.
boolean
Example
{ "data": [ { "status": "queued", "tags": [ { "name": "category", "value": "receipt" } ] } ]}unauthorized: the API key is missing, invalid or revoked.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}forbidden: the key cannot do this, for example a send-only key on a management endpoint.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}