curl --request POST \
--url https://app.leadconduit.com/exports \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"created_at": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"filter_rules": [
{
"lhv": "<string>",
"op": "<string>",
"rhv": "<string>"
}
],
"email_to": [
"<string>"
],
"fields": [
"<string>"
],
"standard_dates": true,
"user": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"sso_id": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"reason": {
"message": "<string>"
},
"error": "<string>",
"exported_docs": 123,
"file_name": "<string>",
"downloads": [
{}
]
}
'import requests
url = "https://app.leadconduit.com/exports"
payload = {
"created_at": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"filter_rules": [
{
"lhv": "<string>",
"op": "<string>",
"rhv": "<string>"
}
],
"email_to": ["<string>"],
"fields": ["<string>"],
"standard_dates": True,
"user": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"sso_id": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"reason": { "message": "<string>" },
"error": "<string>",
"exported_docs": 123,
"file_name": "<string>",
"downloads": [{}]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
created_at: '2023-11-07T05:31:56Z',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
filter_rules: [{lhv: '<string>', op: '<string>', rhv: '<string>'}],
email_to: ['<string>'],
fields: ['<string>'],
standard_dates: true,
user: {
id: '<string>',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
sso_id: '<string>'
},
expires_at: '2023-11-07T05:31:56Z',
reason: {message: '<string>'},
error: '<string>',
exported_docs: 123,
file_name: '<string>',
downloads: [{}]
})
};
fetch('https://app.leadconduit.com/exports', 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://app.leadconduit.com/exports",
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([
'created_at' => '2023-11-07T05:31:56Z',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'filter_rules' => [
[
'lhv' => '<string>',
'op' => '<string>',
'rhv' => '<string>'
]
],
'email_to' => [
'<string>'
],
'fields' => [
'<string>'
],
'standard_dates' => true,
'user' => [
'id' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'sso_id' => '<string>'
],
'expires_at' => '2023-11-07T05:31:56Z',
'reason' => [
'message' => '<string>'
],
'error' => '<string>',
'exported_docs' => 123,
'file_name' => '<string>',
'downloads' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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://app.leadconduit.com/exports"
payload := strings.NewReader("{\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"filter_rules\": [\n {\n \"lhv\": \"<string>\",\n \"op\": \"<string>\",\n \"rhv\": \"<string>\"\n }\n ],\n \"email_to\": [\n \"<string>\"\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"standard_dates\": true,\n \"user\": {\n \"id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"sso_id\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": {\n \"message\": \"<string>\"\n },\n \"error\": \"<string>\",\n \"exported_docs\": 123,\n \"file_name\": \"<string>\",\n \"downloads\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://app.leadconduit.com/exports")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"filter_rules\": [\n {\n \"lhv\": \"<string>\",\n \"op\": \"<string>\",\n \"rhv\": \"<string>\"\n }\n ],\n \"email_to\": [\n \"<string>\"\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"standard_dates\": true,\n \"user\": {\n \"id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"sso_id\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": {\n \"message\": \"<string>\"\n },\n \"error\": \"<string>\",\n \"exported_docs\": 123,\n \"file_name\": \"<string>\",\n \"downloads\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leadconduit.com/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"filter_rules\": [\n {\n \"lhv\": \"<string>\",\n \"op\": \"<string>\",\n \"rhv\": \"<string>\"\n }\n ],\n \"email_to\": [\n \"<string>\"\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"standard_dates\": true,\n \"user\": {\n \"id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"sso_id\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": {\n \"message\": \"<string>\"\n },\n \"error\": \"<string>\",\n \"exported_docs\": 123,\n \"file_name\": \"<string>\",\n \"downloads\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "5fd4371e940df5a34a3888b2",
"created_at": "2023-11-07T05:31:56Z",
"status": "created",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"filter_rules": [
{
"lhv": "<string>",
"op": "<string>",
"rhv": "<string>"
}
],
"email_to": [
"<string>"
],
"fields": [
"<string>"
],
"date_format": "standard",
"user": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"sso_id": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"reason": {
"message": "<string>"
},
"error": "<string>",
"exported_docs": 123,
"file_name": "<string>",
"downloads": [
{}
]
}{
"error": "not authorized"
}{
"errors": {
"name": [
"Must be unique"
],
"steps": {
"0": {
"integration": {
"module_id": [
"Integration not found"
]
}
}
}
}
}Create an export
Requests a CSV export of lead events for a time range. The export runs in the
background: poll GET /exports/{id} until status is complete, then call
GET /exports/{id}/file to get a download link. The addresses in email_to are
notified when the file is ready.
Only start, end, fields, filter_rules, email_to, and standard_dates are read
from the request; the other properties of an export are set by LeadConduit. Send
standard_dates: true for the standard date format in the CSV; the export’s
date_format reflects the choice and defaults to legacy.
curl --request POST \
--url https://app.leadconduit.com/exports \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"created_at": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"filter_rules": [
{
"lhv": "<string>",
"op": "<string>",
"rhv": "<string>"
}
],
"email_to": [
"<string>"
],
"fields": [
"<string>"
],
"standard_dates": true,
"user": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"sso_id": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"reason": {
"message": "<string>"
},
"error": "<string>",
"exported_docs": 123,
"file_name": "<string>",
"downloads": [
{}
]
}
'import requests
url = "https://app.leadconduit.com/exports"
payload = {
"created_at": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"filter_rules": [
{
"lhv": "<string>",
"op": "<string>",
"rhv": "<string>"
}
],
"email_to": ["<string>"],
"fields": ["<string>"],
"standard_dates": True,
"user": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"sso_id": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"reason": { "message": "<string>" },
"error": "<string>",
"exported_docs": 123,
"file_name": "<string>",
"downloads": [{}]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
created_at: '2023-11-07T05:31:56Z',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
filter_rules: [{lhv: '<string>', op: '<string>', rhv: '<string>'}],
email_to: ['<string>'],
fields: ['<string>'],
standard_dates: true,
user: {
id: '<string>',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
sso_id: '<string>'
},
expires_at: '2023-11-07T05:31:56Z',
reason: {message: '<string>'},
error: '<string>',
exported_docs: 123,
file_name: '<string>',
downloads: [{}]
})
};
fetch('https://app.leadconduit.com/exports', 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://app.leadconduit.com/exports",
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([
'created_at' => '2023-11-07T05:31:56Z',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'filter_rules' => [
[
'lhv' => '<string>',
'op' => '<string>',
'rhv' => '<string>'
]
],
'email_to' => [
'<string>'
],
'fields' => [
'<string>'
],
'standard_dates' => true,
'user' => [
'id' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'sso_id' => '<string>'
],
'expires_at' => '2023-11-07T05:31:56Z',
'reason' => [
'message' => '<string>'
],
'error' => '<string>',
'exported_docs' => 123,
'file_name' => '<string>',
'downloads' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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://app.leadconduit.com/exports"
payload := strings.NewReader("{\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"filter_rules\": [\n {\n \"lhv\": \"<string>\",\n \"op\": \"<string>\",\n \"rhv\": \"<string>\"\n }\n ],\n \"email_to\": [\n \"<string>\"\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"standard_dates\": true,\n \"user\": {\n \"id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"sso_id\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": {\n \"message\": \"<string>\"\n },\n \"error\": \"<string>\",\n \"exported_docs\": 123,\n \"file_name\": \"<string>\",\n \"downloads\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://app.leadconduit.com/exports")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"filter_rules\": [\n {\n \"lhv\": \"<string>\",\n \"op\": \"<string>\",\n \"rhv\": \"<string>\"\n }\n ],\n \"email_to\": [\n \"<string>\"\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"standard_dates\": true,\n \"user\": {\n \"id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"sso_id\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": {\n \"message\": \"<string>\"\n },\n \"error\": \"<string>\",\n \"exported_docs\": 123,\n \"file_name\": \"<string>\",\n \"downloads\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leadconduit.com/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"filter_rules\": [\n {\n \"lhv\": \"<string>\",\n \"op\": \"<string>\",\n \"rhv\": \"<string>\"\n }\n ],\n \"email_to\": [\n \"<string>\"\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"standard_dates\": true,\n \"user\": {\n \"id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"sso_id\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": {\n \"message\": \"<string>\"\n },\n \"error\": \"<string>\",\n \"exported_docs\": 123,\n \"file_name\": \"<string>\",\n \"downloads\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "5fd4371e940df5a34a3888b2",
"created_at": "2023-11-07T05:31:56Z",
"status": "created",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"filter_rules": [
{
"lhv": "<string>",
"op": "<string>",
"rhv": "<string>"
}
],
"email_to": [
"<string>"
],
"fields": [
"<string>"
],
"date_format": "standard",
"user": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"sso_id": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"reason": {
"message": "<string>"
},
"error": "<string>",
"exported_docs": 123,
"file_name": "<string>",
"downloads": [
{}
]
}{
"error": "not authorized"
}{
"errors": {
"name": [
"Must be unique"
],
"steps": {
"0": {
"integration": {
"module_id": [
"Integration not found"
]
}
}
}
}
}Authorizations
LeadConduit uses HTTP Basic Authentication
with the username API and your API key as the password.
For example: API:1f1b96c9150d8050e858c043d543bb4eadae0e6f'
Body
The export to create
An export job that produces a CSV of lead events for a given time range and field selection.
Response
Created
An export job that produces a CSV of lead events for a given time range and field selection.