Get Email by ID
curl --request GET \
--url https://api.thepurplebox.io/v1/emails/{email_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.thepurplebox.io/v1/emails/{email_id}"
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/{email_id}', 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/{email_id}",
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/{email_id}"
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/{email_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thepurplebox.io/v1/emails/{email_id}")
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": "email retrieved successfully.",
"data": {
"id": "xxxxx",
"message_id": "xxxxx@me.thepurplebox.io",
"from_address": "hello@yourdomain.com",
"to_addresses": [
"user@example.com"
],
"subject": "Test from http client",
"size": 280,
"inline": 0,
"attachments": 0,
"api_key_id": 2,
"snippet": "hello world",
"created_at": "2025-11-18T18:42:21.819994Z",
"team_id": "xxxxx",
"metadata": {
"from": "hello@yourdomain.com",
"to": [
"user@example.com"
],
"cc": null,
"bcc": null,
"reply_to": null,
"text": "hello world",
"html": ""
},
"opened_at": null,
"delivered_at": "2025-11-18T18:42:23.494Z",
"click_count": 0,
"status": "delivered",
"credits_used": 1,
"logs": [
{
"email_id": "xxxxx",
"team_id": "xxxxx",
"status": "delivered",
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Test from http client",
"response": "250 2.0.0 OK xxxxx 6a1803df08f44-882866ae38bsi47823636d6.1634 - gsmtp",
"code": "250",
"mx_hostname": "gmail-smtp-in.l.google.com",
"time": 1763491342,
"queued_at": "2025-11-18T18:42:23.494Z",
"recipient": "user@example.com",
"recipient_type": "to"
},
{
"email_id": "xxxxx",
"team_id": "xxxxx",
"status": "queued",
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Test from http client",
"response": "250 Message queued as xxxxx",
"code": "250",
"mx_hostname": "",
"time": 1763491343,
"queued_at": "2025-11-18T18:42:23Z",
"recipient": "user@example.com",
"recipient_type": "to"
},
{
"email_id": "xxxxx",
"team_id": "xxxxx",
"status": "processing",
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Test from http client",
"response": "250 2.0.0 Ok: queued as xxxxx",
"code": "250",
"mx_hostname": "",
"time": 1763491341,
"queued_at": "",
"recipient": "user@example.com",
"recipient_type": "to"
}
]
}
}
Emails
Get Email by ID
Retrieve detailed information about a specific email, including full content and delivery logs.
GET
/
v1
/
emails
/
{email_id}
Get Email by ID
curl --request GET \
--url https://api.thepurplebox.io/v1/emails/{email_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.thepurplebox.io/v1/emails/{email_id}"
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/{email_id}', 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/{email_id}",
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/{email_id}"
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/{email_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thepurplebox.io/v1/emails/{email_id}")
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": "email retrieved successfully.",
"data": {
"id": "xxxxx",
"message_id": "xxxxx@me.thepurplebox.io",
"from_address": "hello@yourdomain.com",
"to_addresses": [
"user@example.com"
],
"subject": "Test from http client",
"size": 280,
"inline": 0,
"attachments": 0,
"api_key_id": 2,
"snippet": "hello world",
"created_at": "2025-11-18T18:42:21.819994Z",
"team_id": "xxxxx",
"metadata": {
"from": "hello@yourdomain.com",
"to": [
"user@example.com"
],
"cc": null,
"bcc": null,
"reply_to": null,
"text": "hello world",
"html": ""
},
"opened_at": null,
"delivered_at": "2025-11-18T18:42:23.494Z",
"click_count": 0,
"status": "delivered",
"credits_used": 1,
"logs": [
{
"email_id": "xxxxx",
"team_id": "xxxxx",
"status": "delivered",
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Test from http client",
"response": "250 2.0.0 OK xxxxx 6a1803df08f44-882866ae38bsi47823636d6.1634 - gsmtp",
"code": "250",
"mx_hostname": "gmail-smtp-in.l.google.com",
"time": 1763491342,
"queued_at": "2025-11-18T18:42:23.494Z",
"recipient": "user@example.com",
"recipient_type": "to"
},
{
"email_id": "xxxxx",
"team_id": "xxxxx",
"status": "queued",
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Test from http client",
"response": "250 Message queued as xxxxx",
"code": "250",
"mx_hostname": "",
"time": 1763491343,
"queued_at": "2025-11-18T18:42:23Z",
"recipient": "user@example.com",
"recipient_type": "to"
},
{
"email_id": "xxxxx",
"team_id": "xxxxx",
"status": "processing",
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Test from http client",
"response": "250 2.0.0 Ok: queued as xxxxx",
"code": "250",
"mx_hostname": "",
"time": 1763491341,
"queued_at": "",
"recipient": "user@example.com",
"recipient_type": "to"
}
]
}
}
Headers
string
application/jsonPath Parameters
string
required
The unique identifier of the email to retrieve.
Response
number
HTTP status code. Returns
200 when the email is retrieved successfully.string
A human-readable message describing the result of the operation.
object
Contains complete email details, including full content and delivery logs.
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
Complete email metadata including full text and HTML 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.
array
Chronological delivery logs showing the email’s journey through the sending process.
Show properties
Show properties
string
The email identifier this log entry belongs to.
string
The team ID that owns this email.
string
Status at this point in delivery. Possible values:
processing, queued, delivered, failed, bounced.string
Sender email address.
string
Recipient email address for this log entry.
string
Email subject line.
string
SMTP server response message.
string
SMTP response code (e.g.,
250 for success).string
The MX hostname of the receiving mail server.
number
Unix timestamp of when this log entry was created.
string
ISO 8601 timestamp when the email was queued at this stage.
string
The recipient email address.
string
Type of recipient. Possible values:
to, cc, bcc.{
"status": 200,
"message": "email retrieved successfully.",
"data": {
"id": "xxxxx",
"message_id": "xxxxx@me.thepurplebox.io",
"from_address": "hello@yourdomain.com",
"to_addresses": [
"user@example.com"
],
"subject": "Test from http client",
"size": 280,
"inline": 0,
"attachments": 0,
"api_key_id": 2,
"snippet": "hello world",
"created_at": "2025-11-18T18:42:21.819994Z",
"team_id": "xxxxx",
"metadata": {
"from": "hello@yourdomain.com",
"to": [
"user@example.com"
],
"cc": null,
"bcc": null,
"reply_to": null,
"text": "hello world",
"html": ""
},
"opened_at": null,
"delivered_at": "2025-11-18T18:42:23.494Z",
"click_count": 0,
"status": "delivered",
"credits_used": 1,
"logs": [
{
"email_id": "xxxxx",
"team_id": "xxxxx",
"status": "delivered",
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Test from http client",
"response": "250 2.0.0 OK xxxxx 6a1803df08f44-882866ae38bsi47823636d6.1634 - gsmtp",
"code": "250",
"mx_hostname": "gmail-smtp-in.l.google.com",
"time": 1763491342,
"queued_at": "2025-11-18T18:42:23.494Z",
"recipient": "user@example.com",
"recipient_type": "to"
},
{
"email_id": "xxxxx",
"team_id": "xxxxx",
"status": "queued",
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Test from http client",
"response": "250 Message queued as xxxxx",
"code": "250",
"mx_hostname": "",
"time": 1763491343,
"queued_at": "2025-11-18T18:42:23Z",
"recipient": "user@example.com",
"recipient_type": "to"
},
{
"email_id": "xxxxx",
"team_id": "xxxxx",
"status": "processing",
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Test from http client",
"response": "250 2.0.0 Ok: queued as xxxxx",
"code": "250",
"mx_hostname": "",
"time": 1763491341,
"queued_at": "",
"recipient": "user@example.com",
"recipient_type": "to"
}
]
}
}
⌘I