List Emails
curl --request GET \
--url https://api.thepurplebox.io/v1/emails \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.thepurplebox.io/v1/emails"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thepurplebox.io/v1/emails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.thepurplebox.io/v1/emails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.thepurplebox.io/v1/emails"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.thepurplebox.io/v1/emails")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thepurplebox.io/v1/emails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "emails retrieved successfully.",
"data": {
"data": [
{
"id": "xxxxx",
"message_id": "xxxxx@me.thepurplebox.io",
"from_address": "hello@yourdomain.com",
"to_addresses": [
"user@example.com"
],
"subject": "Complete Your Sign-In to thePurpleBox",
"size": 8915,
"inline": 0,
"attachments": 0,
"api_key_id": 2,
"snippet": "Complete Your Sign-In Hey user@example.com, We noticed a sign-in attempt to your purplebox account...",
"created_at": "2025-11-21T10:51:55.330945Z",
"team_id": "xxxxx",
"metadata": {
"from": "hello@yourdomain.com",
"to": [
"user@example.com"
],
"cc": null,
"bcc": null,
"reply_to": null,
"text": "",
"html": ""
},
"opened_at": null,
"delivered_at": null,
"click_count": 0,
"status": "processing",
"credits_used": 1
}
],
"pagination": {
"page": 1,
"total_records": 11,
"total_pages": 2,
"limit": 10
}
}
}
Emails
List Emails
Retrieve a paginated list of all emails sent through your account.
GET
/
v1
/
emails
List Emails
curl --request GET \
--url https://api.thepurplebox.io/v1/emails \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.thepurplebox.io/v1/emails"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thepurplebox.io/v1/emails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.thepurplebox.io/v1/emails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.thepurplebox.io/v1/emails"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.thepurplebox.io/v1/emails")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thepurplebox.io/v1/emails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "emails retrieved successfully.",
"data": {
"data": [
{
"id": "xxxxx",
"message_id": "xxxxx@me.thepurplebox.io",
"from_address": "hello@yourdomain.com",
"to_addresses": [
"user@example.com"
],
"subject": "Complete Your Sign-In to thePurpleBox",
"size": 8915,
"inline": 0,
"attachments": 0,
"api_key_id": 2,
"snippet": "Complete Your Sign-In Hey user@example.com, We noticed a sign-in attempt to your purplebox account...",
"created_at": "2025-11-21T10:51:55.330945Z",
"team_id": "xxxxx",
"metadata": {
"from": "hello@yourdomain.com",
"to": [
"user@example.com"
],
"cc": null,
"bcc": null,
"reply_to": null,
"text": "",
"html": ""
},
"opened_at": null,
"delivered_at": null,
"click_count": 0,
"status": "processing",
"credits_used": 1
}
],
"pagination": {
"page": 1,
"total_records": 11,
"total_pages": 2,
"limit": 10
}
}
}
Headers
string
application/jsonQuery Parameters
number
default:"1"
Page number for pagination.
number
default:"10"
Number of emails to return per page.
string
Search query to filter emails by subject, recipient, or sender.
string
Filter emails created on or after this date (ISO 8601 format, e.g.,
2025-11-01T00:00:00Z).string
Filter emails created on or before this date (ISO 8601 format, e.g.,
2025-11-30T23:59:59Z).string
Filter by email status. Can be a single status or comma-separated list. Possible values:
processing, queued, delivered, failed, bounced, complaint.number
Filter emails sent using a specific API key ID.
Response
number
HTTP status code. Returns
200 when emails are retrieved successfully.string
A human-readable message describing the result of the operation.
object
Contains the paginated list of emails and pagination metadata.
Show properties
Show properties
array
Array of email objects. HTML and full metadata are not included in list view.
Show properties
Show properties
string
Unique identifier for the email.
string
The message ID used in email headers.
string
The sender email address.
array
Array of recipient email addresses.
string
The email subject line.
number
Total size of the email in bytes.
number
Number of inline attachments.
number
Number of file attachments.
number
ID of the API key used to send the email.
string
Text preview/snippet of the email content.
string
ISO 8601 timestamp when the email was created.
string
The team ID that owns this email.
object
Basic email metadata. HTML and text content are empty in list view.
Show properties
Show properties
string
Sender email address.
array
Array of recipient email addresses.
array | null
CC recipients, if any.
array | null
BCC recipients, if any.
string | null
Reply-to email address, if set.
string
Empty in list view. Use GET by ID to retrieve full content.
string
Empty in list view. Use GET by ID to retrieve full content.
string | null
ISO 8601 timestamp when the email was first opened. Null if not opened.
string | null
ISO 8601 timestamp when the email was delivered. Null if not yet delivered.
number
Number of times links in the email were clicked.
string
Current email status. Possible values:
processing, queued, delivered, failed, bounced, complaint.number
Number of credits consumed to send this email.
{
"status": 200,
"message": "emails retrieved successfully.",
"data": {
"data": [
{
"id": "xxxxx",
"message_id": "xxxxx@me.thepurplebox.io",
"from_address": "hello@yourdomain.com",
"to_addresses": [
"user@example.com"
],
"subject": "Complete Your Sign-In to thePurpleBox",
"size": 8915,
"inline": 0,
"attachments": 0,
"api_key_id": 2,
"snippet": "Complete Your Sign-In Hey user@example.com, We noticed a sign-in attempt to your purplebox account...",
"created_at": "2025-11-21T10:51:55.330945Z",
"team_id": "xxxxx",
"metadata": {
"from": "hello@yourdomain.com",
"to": [
"user@example.com"
],
"cc": null,
"bcc": null,
"reply_to": null,
"text": "",
"html": ""
},
"opened_at": null,
"delivered_at": null,
"click_count": 0,
"status": "processing",
"credits_used": 1
}
],
"pagination": {
"page": 1,
"total_records": 11,
"total_pages": 2,
"limit": 10
}
}
}
⌘I