curl
curl -X POST "https://api.deliveryman.ai/api/v1/contact-list/" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": 12,
"name": "Q1 outreach",
"columns": [],
"rows": [],
"field_mappings": [],
"unsubscribe_column": "string",
"verify_emails": true
}'import requests
url = "https://api.deliveryman.ai/api/v1/contact-list/"
payload = {
"workspace_id": 123,
"name": "<string>",
"columns": ["Email", "First Name", "Company"],
"rows": [["jane@example.com", "Jane", "Acme"]],
"field_mappings": [
{
"column": "<string>",
"custom_field_name": "<string>"
}
],
"unsubscribe_column": "<string>",
"verify_emails": True
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspace_id: 123,
name: '<string>',
columns: ['Email', 'First Name', 'Company'],
rows: [['jane@example.com', 'Jane', 'Acme']],
field_mappings: [{column: '<string>', custom_field_name: '<string>'}],
unsubscribe_column: '<string>',
verify_emails: true
})
};
fetch('https://api.deliveryman.ai/api/v1/contact-list/', 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/contact-list/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workspace_id' => 123,
'name' => '<string>',
'columns' => [
'Email',
'First Name',
'Company'
],
'rows' => [
[
'jane@example.com',
'Jane',
'Acme'
]
],
'field_mappings' => [
[
'column' => '<string>',
'custom_field_name' => '<string>'
]
],
'unsubscribe_column' => '<string>',
'verify_emails' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.deliveryman.ai/api/v1/contact-list/"
payload := strings.NewReader("{\n \"workspace_id\": 123,\n \"name\": \"<string>\",\n \"columns\": [\n \"Email\",\n \"First Name\",\n \"Company\"\n ],\n \"rows\": [\n [\n \"jane@example.com\",\n \"Jane\",\n \"Acme\"\n ]\n ],\n \"field_mappings\": [\n {\n \"column\": \"<string>\",\n \"custom_field_name\": \"<string>\"\n }\n ],\n \"unsubscribe_column\": \"<string>\",\n \"verify_emails\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.deliveryman.ai/api/v1/contact-list/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": 123,\n \"name\": \"<string>\",\n \"columns\": [\n \"Email\",\n \"First Name\",\n \"Company\"\n ],\n \"rows\": [\n [\n \"jane@example.com\",\n \"Jane\",\n \"Acme\"\n ]\n ],\n \"field_mappings\": [\n {\n \"column\": \"<string>\",\n \"custom_field_name\": \"<string>\"\n }\n ],\n \"unsubscribe_column\": \"<string>\",\n \"verify_emails\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v1/contact-list/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace_id\": 123,\n \"name\": \"<string>\",\n \"columns\": [\n \"Email\",\n \"First Name\",\n \"Company\"\n ],\n \"rows\": [\n [\n \"jane@example.com\",\n \"Jane\",\n \"Acme\"\n ]\n ],\n \"field_mappings\": [\n {\n \"column\": \"<string>\",\n \"custom_field_name\": \"<string>\"\n }\n ],\n \"unsubscribe_column\": \"<string>\",\n \"verify_emails\": true\n}"
response = http.request(request)
puts response.read_body{
"uid": "<string>",
"workspace_id": 123,
"name": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"field_mappings": [
{
"column": "<string>",
"mapped_field": "<string>",
"custom_field_name": "<string>"
}
],
"is_deletable": true,
"status": "<string>",
"source": "<string>",
"available_columns": "<unknown>",
"has_unsubscribe_column": true,
"unsubscribe_column_name": "<string>",
"contacts_count": 1073741823,
"email_verification_status": "processing"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Contact Lists
Create Contact List
Creates a contact list from rows of contact data, the same way a CSV upload does in the web app. Send the CSV’s header row as columns and the remaining rows as rows, and use field_mappings to choose which columns to import.
The import runs in the background and returns 202 straight away with the list in uploading status. Poll Retrieve Contact List until its status is active (or verifying while emails are being verified) before using it in a campaign.
POST
/
api
/
v1
/
contact-list
/
curl
curl -X POST "https://api.deliveryman.ai/api/v1/contact-list/" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": 12,
"name": "Q1 outreach",
"columns": [],
"rows": [],
"field_mappings": [],
"unsubscribe_column": "string",
"verify_emails": true
}'import requests
url = "https://api.deliveryman.ai/api/v1/contact-list/"
payload = {
"workspace_id": 123,
"name": "<string>",
"columns": ["Email", "First Name", "Company"],
"rows": [["jane@example.com", "Jane", "Acme"]],
"field_mappings": [
{
"column": "<string>",
"custom_field_name": "<string>"
}
],
"unsubscribe_column": "<string>",
"verify_emails": True
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspace_id: 123,
name: '<string>',
columns: ['Email', 'First Name', 'Company'],
rows: [['jane@example.com', 'Jane', 'Acme']],
field_mappings: [{column: '<string>', custom_field_name: '<string>'}],
unsubscribe_column: '<string>',
verify_emails: true
})
};
fetch('https://api.deliveryman.ai/api/v1/contact-list/', 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/contact-list/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workspace_id' => 123,
'name' => '<string>',
'columns' => [
'Email',
'First Name',
'Company'
],
'rows' => [
[
'jane@example.com',
'Jane',
'Acme'
]
],
'field_mappings' => [
[
'column' => '<string>',
'custom_field_name' => '<string>'
]
],
'unsubscribe_column' => '<string>',
'verify_emails' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.deliveryman.ai/api/v1/contact-list/"
payload := strings.NewReader("{\n \"workspace_id\": 123,\n \"name\": \"<string>\",\n \"columns\": [\n \"Email\",\n \"First Name\",\n \"Company\"\n ],\n \"rows\": [\n [\n \"jane@example.com\",\n \"Jane\",\n \"Acme\"\n ]\n ],\n \"field_mappings\": [\n {\n \"column\": \"<string>\",\n \"custom_field_name\": \"<string>\"\n }\n ],\n \"unsubscribe_column\": \"<string>\",\n \"verify_emails\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.deliveryman.ai/api/v1/contact-list/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": 123,\n \"name\": \"<string>\",\n \"columns\": [\n \"Email\",\n \"First Name\",\n \"Company\"\n ],\n \"rows\": [\n [\n \"jane@example.com\",\n \"Jane\",\n \"Acme\"\n ]\n ],\n \"field_mappings\": [\n {\n \"column\": \"<string>\",\n \"custom_field_name\": \"<string>\"\n }\n ],\n \"unsubscribe_column\": \"<string>\",\n \"verify_emails\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v1/contact-list/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace_id\": 123,\n \"name\": \"<string>\",\n \"columns\": [\n \"Email\",\n \"First Name\",\n \"Company\"\n ],\n \"rows\": [\n [\n \"jane@example.com\",\n \"Jane\",\n \"Acme\"\n ]\n ],\n \"field_mappings\": [\n {\n \"column\": \"<string>\",\n \"custom_field_name\": \"<string>\"\n }\n ],\n \"unsubscribe_column\": \"<string>\",\n \"verify_emails\": true\n}"
response = http.request(request)
puts response.read_body{
"uid": "<string>",
"workspace_id": 123,
"name": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"field_mappings": [
{
"column": "<string>",
"mapped_field": "<string>",
"custom_field_name": "<string>"
}
],
"is_deletable": true,
"status": "<string>",
"source": "<string>",
"available_columns": "<unknown>",
"has_unsubscribe_column": true,
"unsubscribe_column_name": "<string>",
"contacts_count": 1073741823,
"email_verification_status": "processing"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
application/json
Contact rows, excluding the header row. Each row lists values in columns order. Missing trailing values are treated as empty and extra values are ignored. Rows with a duplicate email address are skipped. At most 100000 rows.
Required array length:
1 - 100000 elementsExample:
[["jane@example.com", "Jane", "Acme"]]
Response
Import Started