curl "https://api.deliveryman.ai/api/v2/email/?message_id=em_9f2c4a7b1e0d3c5a8b6f4e21" \
-H "X-Api-Key: YOUR_API_KEY"import requests
url = "https://api.deliveryman.ai/api/v2/email/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.deliveryman.ai/api/v2/email/', 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.deliveryman.ai/api/v2/email/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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.deliveryman.ai/api/v2/email/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
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.deliveryman.ai/api/v2/email/")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v2/email/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"from": "<string>",
"message_id": "<string>",
"to": "<string>",
"reply_to": "<string>",
"thread_message_id": "<string>",
"in_reply_to": "<string>",
"subject": "<string>",
"html_content": "<string>",
"plain_text_content": "<string>",
"opens": [
{
"opened_on": "2023-11-07T05:31:56Z"
}
],
"clicks": [
{
"link": "<string>",
"clicked_on": "2023-11-07T05:31:56Z"
}
],
"bounce": {
"reason": "<string>",
"bounced_on": "2023-11-07T05:31:56Z"
},
"replies": [
{
"from": "<string>",
"message_id": "<string>",
"rfc_message_id": "<string>",
"plain_text_content": "<string>",
"html_content": "<string>",
"received_on": "2023-11-07T05:31:56Z",
"headers": {
"message_id": "<string>",
"from": "<string>",
"to": "<string>",
"cc": "<string>",
"reply_to": "<string>",
"date": "<string>",
"in_reply_to": "<string>",
"references": "<string>"
},
"headers_complete": true,
"subject": "<string>",
"is_auto_reply": true
}
],
"open_tracking": true,
"click_tracking": true,
"status": "scheduled",
"failure_reason": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"sent_on": "2023-11-07T05:31:56Z",
"unsubscribed_on": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>"
}Retrieve Sent Email
Returns a single email sent through the API, with its opens, clicks, bounce, unsubscribe and replies, by its message_id. Use this to catch up on an email’s activity if a webhook was missed, or to check whether a scheduled email has gone out.
curl "https://api.deliveryman.ai/api/v2/email/?message_id=em_9f2c4a7b1e0d3c5a8b6f4e21" \
-H "X-Api-Key: YOUR_API_KEY"import requests
url = "https://api.deliveryman.ai/api/v2/email/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.deliveryman.ai/api/v2/email/', 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.deliveryman.ai/api/v2/email/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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.deliveryman.ai/api/v2/email/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
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.deliveryman.ai/api/v2/email/")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v2/email/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"from": "<string>",
"message_id": "<string>",
"to": "<string>",
"reply_to": "<string>",
"thread_message_id": "<string>",
"in_reply_to": "<string>",
"subject": "<string>",
"html_content": "<string>",
"plain_text_content": "<string>",
"opens": [
{
"opened_on": "2023-11-07T05:31:56Z"
}
],
"clicks": [
{
"link": "<string>",
"clicked_on": "2023-11-07T05:31:56Z"
}
],
"bounce": {
"reason": "<string>",
"bounced_on": "2023-11-07T05:31:56Z"
},
"replies": [
{
"from": "<string>",
"message_id": "<string>",
"rfc_message_id": "<string>",
"plain_text_content": "<string>",
"html_content": "<string>",
"received_on": "2023-11-07T05:31:56Z",
"headers": {
"message_id": "<string>",
"from": "<string>",
"to": "<string>",
"cc": "<string>",
"reply_to": "<string>",
"date": "<string>",
"in_reply_to": "<string>",
"references": "<string>"
},
"headers_complete": true,
"subject": "<string>",
"is_auto_reply": true
}
],
"open_tracking": true,
"click_tracking": true,
"status": "scheduled",
"failure_reason": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"sent_on": "2023-11-07T05:31:56Z",
"unsubscribed_on": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Query Parameters
Response
Success
An email sent through the API, with its activity.
Unique ID of the email, available as soon as it's accepted, including while it's scheduled. Use it to look the email up with Retrieve Sent Email, to match webhook events, and as reply_to_message_id to reply in the same conversation. It's also sent with the email in the X-Deliveryman-Message-Id header.
Delivery status, updated as the mail server reports back. scheduled: waiting in the queue for your sending domain's next send slot. queued: accepted and waiting for the recipient's mail server to accept it. delivered: the recipient's mail server accepted it. failed: couldn't be delivered because of a problem on the sending side, or a scheduled email couldn't be sent (see failure_reason). The recipient is not suppressed. bounced: the recipient's server rejected it and the address was added to your suppression list. failed and bounced are final. A delivered email can still become bounced if a bounce arrives later.
scheduled- Scheduledqueued- Queueddelivered- Deliveredfailed- Failedbounced- Bounced
scheduled, queued, delivered, failed, bounced