List emails
curl --request GET \
--url https://api.maildiver.com/v1/emails \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.maildiver.com/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.maildiver.com/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.maildiver.com/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.maildiver.com/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.maildiver.com/v1/emails")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maildiver.com/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{
"emails": [
{
"id": "0195c9e3-5067-741d-be87-a4f75ef93372",
"type": "transactional",
"to": [
"recipient@company.com"
],
"subject": "Your Order Confirmation #12345",
"last_event": {
"recipient": "recipient@company.com",
"processing_time_millis": 1114,
"reporting_mta": "b224-18.smtp-out.eu-central-1.amazonses.com",
"smtp_response": "250 2.0.0 OK 1742843424 ffacd0b85a97d-3997f97d977si6557456f8f.132 - gsmtp",
"status": "delivered",
"timestamp": 1742843424147
},
"email_sent_timestamp": 1742843423033,
"recipient_statuses": [
{
"recipient": "recipient@company.com",
"status": "delivered",
"timestamp": 1742843424147
}
]
},
{
"id": "0195c413-4e53-77c8-bb52-35087d60e50e",
"type": "broadcast",
"to": [
"recipient@company.com"
],
"subject": "Monthly Newsletter - March 2024",
"last_event": {
"recipient": "recipient@company.com",
"type": "Permanent",
"subtype": "General",
"status": "bounced",
"timestamp": 1742751354893
},
"email_sent_timestamp": 1742751354368,
"recipient_statuses": [
{
"recipient": "recipient@company.com",
"status": "bounced",
"timestamp": 1742751354893,
"type": "Permanent",
"subtype": "General"
}
]
}
],
"count": 50,
"cursor": "0195c413-3fe1-779d-804e-f5f9bd8cd523"
}Email
List emails
Endpoint: v1/emails
List all emails with pagination support. Returns 50 emails per page.
List emails
curl --request GET \
--url https://api.maildiver.com/v1/emails \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.maildiver.com/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.maildiver.com/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.maildiver.com/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.maildiver.com/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.maildiver.com/v1/emails")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maildiver.com/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{
"emails": [
{
"id": "0195c9e3-5067-741d-be87-a4f75ef93372",
"type": "transactional",
"to": [
"recipient@company.com"
],
"subject": "Your Order Confirmation #12345",
"last_event": {
"recipient": "recipient@company.com",
"processing_time_millis": 1114,
"reporting_mta": "b224-18.smtp-out.eu-central-1.amazonses.com",
"smtp_response": "250 2.0.0 OK 1742843424 ffacd0b85a97d-3997f97d977si6557456f8f.132 - gsmtp",
"status": "delivered",
"timestamp": 1742843424147
},
"email_sent_timestamp": 1742843423033,
"recipient_statuses": [
{
"recipient": "recipient@company.com",
"status": "delivered",
"timestamp": 1742843424147
}
]
},
{
"id": "0195c413-4e53-77c8-bb52-35087d60e50e",
"type": "broadcast",
"to": [
"recipient@company.com"
],
"subject": "Monthly Newsletter - March 2024",
"last_event": {
"recipient": "recipient@company.com",
"type": "Permanent",
"subtype": "General",
"status": "bounced",
"timestamp": 1742751354893
},
"email_sent_timestamp": 1742751354368,
"recipient_statuses": [
{
"recipient": "recipient@company.com",
"status": "bounced",
"timestamp": 1742751354893,
"type": "Permanent",
"subtype": "General"
}
]
}
],
"count": 50,
"cursor": "0195c413-3fe1-779d-804e-f5f9bd8cd523"
}Authorizations
API key with format "Bearer {your-api-key}"
Query Parameters
Pagination cursor. If there are more than 50 emails, this cursor will be returned in the response. Use this cursor in the next request to get the next page of results.
Response
OK
Was this page helpful?
⌘I