Import Events
curl --request POST \
--url https://api-ai.zixflow.com/api/data/events/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>"
}
]
}
'import requests
url = "https://api-ai.zixflow.com/api/data/events/v1/import"
payload = {
"file_url": "<string>",
"mapping": [
{
"csv_column": "<string>",
"attribute": "<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>'}]
})
};
fetch('https://api-ai.zixflow.com/api/data/events/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/events/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>'
]
]
]),
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/events/v1/import"
payload := strings.NewReader("{\n \"file_url\": \"<string>\",\n \"mapping\": [\n {\n \"csv_column\": \"<string>\",\n \"attribute\": \"<string>\"\n }\n ]\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/events/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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/events/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}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Import queued. Processing will begin shortly.",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c1",
"status": "in-queue"
}
}
{
"success": false,
"message": "mapping is required"
}
{
"error": true,
"message": "Unauthorized"
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "daily public API import limit reached (10 per day)"
}
{
"success": false,
"message": "message broker unavailable"
}
Events
Import Events
Queue an events CSV import from a publicly reachable HTTPS URL
POST
/
api
/
data
/
events
/
v1
/
import
Import Events
curl --request POST \
--url https://api-ai.zixflow.com/api/data/events/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>"
}
]
}
'import requests
url = "https://api-ai.zixflow.com/api/data/events/v1/import"
payload = {
"file_url": "<string>",
"mapping": [
{
"csv_column": "<string>",
"attribute": "<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>'}]
})
};
fetch('https://api-ai.zixflow.com/api/data/events/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/events/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>'
]
]
]),
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/events/v1/import"
payload := strings.NewReader("{\n \"file_url\": \"<string>\",\n \"mapping\": [\n {\n \"csv_column\": \"<string>\",\n \"attribute\": \"<string>\"\n }\n ]\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/events/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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/events/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}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Import queued. Processing will begin shortly.",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c1",
"status": "in-queue"
}
}
{
"success": false,
"message": "mapping is required"
}
{
"error": true,
"message": "Unauthorized"
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "daily public API import limit reached (10 per day)"
}
{
"success": false,
"message": "message broker unavailable"
}
Description
Queues an events CSV import from a public HTTPS CSV URL. Buildmapping in the dashboard Import wizard (Events), then copy the JSON from Review. Attribute keys must match what the dashboard shows 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).Request Example
{
"file_url": "https://files.example.com/events.csv",
"mapping": [
{ "csv_column": "user_id", "attribute": "user_id" },
{ "csv_column": "name", "attribute": "event_name" },
{ "csv_column": "type", "attribute": "event_type" },
{ "csv_column": "time", "attribute": "occurred_at" }
]
}
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.{
"success": true,
"message": "Import queued. Processing will begin shortly.",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c1",
"status": "in-queue"
}
}
{
"success": false,
"message": "mapping is required"
}
{
"error": true,
"message": "Unauthorized"
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "daily public API import limit reached (10 per day)"
}
{
"success": false,
"message": "message broker unavailable"
}
Typical 400 messages
mapping is required/mapping entries require csv_column and attributeunsupported mapping attribute for events: …