Import People
curl --request POST \
--url https://api-ai.zixflow.com/api/data/people/v1/import \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"file_url": "<string>",
"mapping": [
{
"csv_column": "<string>",
"attribute": "<string>"
}
],
"on_duplicate": "<string>",
"segment_id": "<string>"
}
'import requests
url = "https://api-ai.zixflow.com/api/data/people/v1/import"
payload = {
"file_url": "<string>",
"mapping": [
{
"csv_column": "<string>",
"attribute": "<string>"
}
],
"on_duplicate": "<string>",
"segment_id": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"x-workspace-id": "<x-workspace-id>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-workspace-id': '<x-workspace-id>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
file_url: '<string>',
mapping: [{csv_column: '<string>', attribute: '<string>'}],
on_duplicate: '<string>',
segment_id: '<string>'
})
};
fetch('https://api-ai.zixflow.com/api/data/people/v1/import', 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-ai.zixflow.com/api/data/people/v1/import",
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([
'file_url' => '<string>',
'mapping' => [
[
'csv_column' => '<string>',
'attribute' => '<string>'
]
],
'on_duplicate' => '<string>',
'segment_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <x-api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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-ai.zixflow.com/api/data/people/v1/import"
payload := strings.NewReader("{\n \"file_url\": \"<string>\",\n \"mapping\": [\n {\n \"csv_column\": \"<string>\",\n \"attribute\": \"<string>\"\n }\n ],\n \"on_duplicate\": \"<string>\",\n \"segment_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Content-Type", "<content-type>")
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-ai.zixflow.com/api/data/people/v1/import")
.header("x-api-key", "<x-api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.header("Content-Type", "<content-type>")
.body("{\n \"file_url\": \"<string>\",\n \"mapping\": [\n {\n \"csv_column\": \"<string>\",\n \"attribute\": \"<string>\"\n }\n ],\n \"on_duplicate\": \"<string>\",\n \"segment_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/people/v1/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"file_url\": \"<string>\",\n \"mapping\": [\n {\n \"csv_column\": \"<string>\",\n \"attribute\": \"<string>\"\n }\n ],\n \"on_duplicate\": \"<string>\",\n \"segment_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Import queued. Processing will begin shortly.",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c0",
"status": "in-queue",
"segment_id": "65f1a2b3c4d5e6f7a8b9c0d1"
}
}
{
"success": false,
"message": "mapping is required"
}
{
"error": true,
"message": "Unauthorized"
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "segment not found"
}
{
"success": false,
"message": "daily public API import limit reached (10 per day)"
}
{
"success": false,
"message": "message broker unavailable"
}
People
Import People
Queue a people CSV import from a publicly reachable HTTPS URL
POST
/
api
/
data
/
people
/
v1
/
import
Import People
curl --request POST \
--url https://api-ai.zixflow.com/api/data/people/v1/import \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"file_url": "<string>",
"mapping": [
{
"csv_column": "<string>",
"attribute": "<string>"
}
],
"on_duplicate": "<string>",
"segment_id": "<string>"
}
'import requests
url = "https://api-ai.zixflow.com/api/data/people/v1/import"
payload = {
"file_url": "<string>",
"mapping": [
{
"csv_column": "<string>",
"attribute": "<string>"
}
],
"on_duplicate": "<string>",
"segment_id": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"x-workspace-id": "<x-workspace-id>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-workspace-id': '<x-workspace-id>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
file_url: '<string>',
mapping: [{csv_column: '<string>', attribute: '<string>'}],
on_duplicate: '<string>',
segment_id: '<string>'
})
};
fetch('https://api-ai.zixflow.com/api/data/people/v1/import', 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-ai.zixflow.com/api/data/people/v1/import",
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([
'file_url' => '<string>',
'mapping' => [
[
'csv_column' => '<string>',
'attribute' => '<string>'
]
],
'on_duplicate' => '<string>',
'segment_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <x-api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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-ai.zixflow.com/api/data/people/v1/import"
payload := strings.NewReader("{\n \"file_url\": \"<string>\",\n \"mapping\": [\n {\n \"csv_column\": \"<string>\",\n \"attribute\": \"<string>\"\n }\n ],\n \"on_duplicate\": \"<string>\",\n \"segment_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Content-Type", "<content-type>")
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-ai.zixflow.com/api/data/people/v1/import")
.header("x-api-key", "<x-api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.header("Content-Type", "<content-type>")
.body("{\n \"file_url\": \"<string>\",\n \"mapping\": [\n {\n \"csv_column\": \"<string>\",\n \"attribute\": \"<string>\"\n }\n ],\n \"on_duplicate\": \"<string>\",\n \"segment_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/people/v1/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"file_url\": \"<string>\",\n \"mapping\": [\n {\n \"csv_column\": \"<string>\",\n \"attribute\": \"<string>\"\n }\n ],\n \"on_duplicate\": \"<string>\",\n \"segment_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Import queued. Processing will begin shortly.",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c0",
"status": "in-queue",
"segment_id": "65f1a2b3c4d5e6f7a8b9c0d1"
}
}
{
"success": false,
"message": "mapping is required"
}
{
"error": true,
"message": "Unauthorized"
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "segment not found"
}
{
"success": false,
"message": "daily public API import limit reached (10 per day)"
}
{
"success": false,
"message": "message broker unavailable"
}
Description
Queues a people CSV import from a public HTTPS CSV URL. Buildmapping in the dashboard Import wizard (Users), then copy the JSON from Review. Attribute keys include system and custom fields for your workspace — do not invent them by hand. See Get mapping from the dashboard.
Also see CSV Import Introduction for auth, limits, and statuses.
Headers
string
required
Your API key for authentication. Must have Dashboard permission.
string
required
Your workspace ID for authentication. Must own the API key.
string
default:"application/json"
required
Must be
application/json.Body
string
required
Public HTTPS URL of the CSV. Must return raw CSV bytes (not an HTML share/preview page).
array
required
Column → attribute map copied from the dashboard. Each item needs
csv_column and attribute. CSV column names and attribute keys must be unique (case-insensitive).string
default:"update"
How to handle duplicates:
update (default) or skip.string
Optional 24-char ObjectId of a
manual_list_upload segment. Imported people are added to that list.Request Example
{
"file_url": "https://files.example.com/people.csv",
"on_duplicate": "update",
"segment_id": "65f1a2b3c4d5e6f7a8b9c0d1",
"mapping": [
{ "csv_column": "user_id", "attribute": "user_id" },
{ "csv_column": "email", "attribute": "email" },
{ "csv_column": "phone", "attribute": "phone" }
]
}
mapping array exported from the dashboard Review step for your file — do not rely on the sample keys above.
Response
boolean
Indicates whether the API call was successful.
string
Success or error message from the API.
object
Queued import details.
string
Unique import job ID. Use this to poll status or cancel.
string
Initial job status. Typically
in-queue.string
Present only when you sent
segment_id in the request.{
"success": true,
"message": "Import queued. Processing will begin shortly.",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c0",
"status": "in-queue",
"segment_id": "65f1a2b3c4d5e6f7a8b9c0d1"
}
}
{
"success": false,
"message": "mapping is required"
}
{
"error": true,
"message": "Unauthorized"
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "segment not found"
}
{
"success": false,
"message": "daily public API import limit reached (10 per day)"
}
{
"success": false,
"message": "message broker unavailable"
}
Typical 400 messages
file_url is required / file_url must be a valid https url / mapping is required / mapping entries require csv_column and attribute / duplicate csv_column in mapping: … / duplicate attribute in mapping: … / unsupported mapping attribute for people: … / on_duplicate must be update or skip / invalid segment_id / segment must be of type manual_list_upload