curl
curl "https://api.deliveryman.ai/api/v1/leads/?campaign_uid=cmp_4b1f7a92c3d84e05&limit=20&offset=0" \
-H "X-Api-Key: YOUR_API_KEY"import requests
url = "https://api.deliveryman.ai/api/v1/leads/"
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/v1/leads/', 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/v1/leads/",
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/v1/leads/"
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/v1/leads/")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v1/leads/")
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{
"data": [
{
"uid": "<string>",
"contact": {
"id": 123,
"email_id": "<string>",
"bounced": true,
"unsubscribed": true
},
"schedules": [
{
"id": 123,
"email_data": {
"id": 123,
"subject": "<string>",
"body": "<string>",
"email_content_type": "text/plain"
},
"link_click_events": [
{
"id": 123,
"link": "<string>",
"clicked_on": "2023-11-07T05:31:56Z"
}
],
"replies": [
{
"id": 123,
"body_plain_text": "<string>",
"body_html": "<string>",
"received_on": "2023-11-07T05:31:56Z",
"reply_classification": "positive"
}
],
"status": "created",
"schedule_datetime": "2023-11-07T05:31:56Z",
"sent_on": "2023-11-07T05:31:56Z",
"reply_received": true,
"email_opened": true,
"email_opened_on": "2023-11-07T05:31:56Z",
"email_open_count": 1073741823
}
],
"sender_email_address": "<string>",
"sender_name": "<string>"
}
],
"total": 1
}{
"message": "<string>"
}{
"message": "<string>"
}Contacts and Leads
List all Leads
Retrieves all leads data for the given campaign.
GET
/
api
/
v1
/
leads
/
curl
curl "https://api.deliveryman.ai/api/v1/leads/?campaign_uid=cmp_4b1f7a92c3d84e05&limit=20&offset=0" \
-H "X-Api-Key: YOUR_API_KEY"import requests
url = "https://api.deliveryman.ai/api/v1/leads/"
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/v1/leads/', 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/v1/leads/",
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/v1/leads/"
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/v1/leads/")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v1/leads/")
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{
"data": [
{
"uid": "<string>",
"contact": {
"id": 123,
"email_id": "<string>",
"bounced": true,
"unsubscribed": true
},
"schedules": [
{
"id": 123,
"email_data": {
"id": 123,
"subject": "<string>",
"body": "<string>",
"email_content_type": "text/plain"
},
"link_click_events": [
{
"id": 123,
"link": "<string>",
"clicked_on": "2023-11-07T05:31:56Z"
}
],
"replies": [
{
"id": 123,
"body_plain_text": "<string>",
"body_html": "<string>",
"received_on": "2023-11-07T05:31:56Z",
"reply_classification": "positive"
}
],
"status": "created",
"schedule_datetime": "2023-11-07T05:31:56Z",
"sent_on": "2023-11-07T05:31:56Z",
"reply_received": true,
"email_opened": true,
"email_opened_on": "2023-11-07T05:31:56Z",
"email_open_count": 1073741823
}
],
"sender_email_address": "<string>",
"sender_name": "<string>"
}
],
"total": 1
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Your API key. In the dashboard, go to Integrations and open Deliveryman API Keys to create one.
Query Parameters
UID of campaign to fetch leads from.
Maximum number of records to fetch in the current page. Must be between 1 and 100.
Required range:
1 <= x <= 100Number of records to skip before fetching the results.For example, an offset of 0 starts at the beginning, while an offset of 50 fetches records starting from the 51st. If offset is greater than number of records available, results will be empty.
Required range:
x >= 0