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>",
"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>",
"plain_text_content": "<string>",
"html_content": "<string>",
"received_on": "2023-11-07T05:31:56Z",
"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>",
"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>",
"plain_text_content": "<string>",
"html_content": "<string>",
"received_on": "2023-11-07T05:31:56Z",
"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
Your API key. In the dashboard, go to Integrations and open Deliveryman API Keys to create one.
Query Parameters
The message_id returned by Send Email. Works for scheduled emails too.
1 - 40Response
Success
An email sent through the API, with its activity.
Email address the email was sent from.
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.
Recipient email address.
message_id of the first email in this conversation. Equal to message_id unless this email was sent as a reply.
message_id this email replied to, or null if it started a conversation.
Subject line of the email.
HTML body, or null for plain text emails.
Plain text body, or null for HTML emails.
Opens of this email, oldest first. Empty when open tracking is off.
Show child attributes
Show child attributes
Link clicks in this email, oldest first. Empty when click tracking is off.
Show child attributes
Show child attributes
Bounce details, or null if the email didn't bounce.
Show child attributes
Show child attributes
Replies received in the conversation this email started, oldest first. Always empty for emails sent as a reply. Their replies are listed on the conversation's first email.
Show child attributes
Show child attributes
Whether opens are tracked for this email.
Whether link clicks are tracked for this email.
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 Why a scheduled email couldn't be sent, or null.
When a scheduled email will be handed to the mail server, or null if it was sent right away. ISO 8601, UTC.
When the recipient's mail server accepted the email. Null until delivery is confirmed. ISO 8601, UTC.
When the recipient unsubscribed through this email, or null.