Export chosen leads
curl --request POST \
--url https://app.manypi.com/api/leads/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04"
],
"format": "csv"
}
'import requests
url = "https://app.manypi.com/api/leads/export"
payload = {
"ids": ["d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04"],
"format": "csv"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04'], format: 'csv'})
};
fetch('https://app.manypi.com/api/leads/export', 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.manypi.com/api/leads/export",
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([
'ids' => [
'd4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04'
],
'format' => 'csv'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.manypi.com/api/leads/export"
payload := strings.NewReader("{\n \"ids\": [\n \"d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04\"\n ],\n \"format\": \"csv\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.manypi.com/api/leads/export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04\"\n ],\n \"format\": \"csv\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.manypi.com/api/leads/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04\"\n ],\n \"format\": \"csv\"\n}"
response = http.request(request)
puts response.read_body<string>{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}Leads
Export chosen leads
The same export as GET /api/leads/export, with the settings in a JSON body. Send ids to export exactly those leads (up to 10,000); otherwise the filters apply.
An API key needs Leads & companies: Read & write (leads:write), or the legacy write permission. A read-only key cannot use this form; use the GET form instead.
POST
/
api
/
leads
/
export
Export chosen leads
curl --request POST \
--url https://app.manypi.com/api/leads/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04"
],
"format": "csv"
}
'import requests
url = "https://app.manypi.com/api/leads/export"
payload = {
"ids": ["d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04"],
"format": "csv"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04'], format: 'csv'})
};
fetch('https://app.manypi.com/api/leads/export', 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.manypi.com/api/leads/export",
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([
'ids' => [
'd4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04'
],
'format' => 'csv'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.manypi.com/api/leads/export"
payload := strings.NewReader("{\n \"ids\": [\n \"d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04\"\n ],\n \"format\": \"csv\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.manypi.com/api/leads/export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04\"\n ],\n \"format\": \"csv\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.manypi.com/api/leads/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"d4e7f1a2-8b30-4c95-a1d6-5f2e9c8b7a04\"\n ],\n \"format\": \"csv\"\n}"
response = http.request(request)
puts response.read_body<string>{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}Authorizations
Body
application/json
Comma-separated columns to include, from: company, full_name, title, email, phone, phone_e164, phone_type, phone_status, domain, category, subcategory, linkedin_url, location, source_url, score, status, email_provider, email_status, email_is_role, email_validated_at, unsubscribed_at, created_at. Leave it out for all of them.
Response
CSV file.
The response is of type string.
