Import records from a CSV
curl --request POST \
--url https://api.quiva.ai/records/csv-import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config_id": "customers",
"object_uri": "obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv",
"space_id": "spc_9fJk2",
"folder": "customers/2026",
"column_map": {
"First Name": "first_name",
"Email": "email"
},
"types": {
"first_name": "string",
"email": "string"
}
}
'import requests
url = "https://api.quiva.ai/records/csv-import"
payload = {
"config_id": "customers",
"object_uri": "obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv",
"space_id": "spc_9fJk2",
"folder": "customers/2026",
"column_map": {
"First Name": "first_name",
"Email": "email"
},
"types": {
"first_name": "string",
"email": "string"
}
}
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({
config_id: 'customers',
object_uri: 'obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv',
space_id: 'spc_9fJk2',
folder: 'customers/2026',
column_map: {'First Name': 'first_name', Email: 'email'},
types: {first_name: 'string', email: 'string'}
})
};
fetch('https://api.quiva.ai/records/csv-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.quiva.ai/records/csv-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([
'config_id' => 'customers',
'object_uri' => 'obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv',
'space_id' => 'spc_9fJk2',
'folder' => 'customers/2026',
'column_map' => [
'First Name' => 'first_name',
'Email' => 'email'
],
'types' => [
'first_name' => 'string',
'email' => 'string'
]
]),
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://api.quiva.ai/records/csv-import"
payload := strings.NewReader("{\n \"config_id\": \"customers\",\n \"object_uri\": \"obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv\",\n \"space_id\": \"spc_9fJk2\",\n \"folder\": \"customers/2026\",\n \"column_map\": {\n \"First Name\": \"first_name\",\n \"Email\": \"email\"\n },\n \"types\": {\n \"first_name\": \"string\",\n \"email\": \"string\"\n }\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://api.quiva.ai/records/csv-import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config_id\": \"customers\",\n \"object_uri\": \"obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv\",\n \"space_id\": \"spc_9fJk2\",\n \"folder\": \"customers/2026\",\n \"column_map\": {\n \"First Name\": \"first_name\",\n \"Email\": \"email\"\n },\n \"types\": {\n \"first_name\": \"string\",\n \"email\": \"string\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/records/csv-import")
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 \"config_id\": \"customers\",\n \"object_uri\": \"obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv\",\n \"space_id\": \"spc_9fJk2\",\n \"folder\": \"customers/2026\",\n \"column_map\": {\n \"First Name\": \"first_name\",\n \"Email\": \"email\"\n },\n \"types\": {\n \"first_name\": \"string\",\n \"email\": \"string\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status_code": 123,
"body": {
"config_id": "<string>",
"total": 123,
"created": 123,
"failed": 123,
"errors": [
{
"row": 123,
"error": "<string>"
}
],
"history_failed": 123,
"history_warning": "<string>"
}
}{
"status_code": 400,
"body": {
"error": "field 'rating' is required"
}
}{
"status_code": 400,
"body": {
"error": "field 'rating' is required"
}
}Records
Import records from a CSV
Reads an already-uploaded CSV and creates one record per row, in batches. Rows go through the same validation, folder derivation, indexing and events a single create does. A row that fails is reported and the rest continue, so a partial import is visible rather than silent.
POST
/
records
/
csv-import
Import records from a CSV
curl --request POST \
--url https://api.quiva.ai/records/csv-import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config_id": "customers",
"object_uri": "obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv",
"space_id": "spc_9fJk2",
"folder": "customers/2026",
"column_map": {
"First Name": "first_name",
"Email": "email"
},
"types": {
"first_name": "string",
"email": "string"
}
}
'import requests
url = "https://api.quiva.ai/records/csv-import"
payload = {
"config_id": "customers",
"object_uri": "obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv",
"space_id": "spc_9fJk2",
"folder": "customers/2026",
"column_map": {
"First Name": "first_name",
"Email": "email"
},
"types": {
"first_name": "string",
"email": "string"
}
}
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({
config_id: 'customers',
object_uri: 'obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv',
space_id: 'spc_9fJk2',
folder: 'customers/2026',
column_map: {'First Name': 'first_name', Email: 'email'},
types: {first_name: 'string', email: 'string'}
})
};
fetch('https://api.quiva.ai/records/csv-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.quiva.ai/records/csv-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([
'config_id' => 'customers',
'object_uri' => 'obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv',
'space_id' => 'spc_9fJk2',
'folder' => 'customers/2026',
'column_map' => [
'First Name' => 'first_name',
'Email' => 'email'
],
'types' => [
'first_name' => 'string',
'email' => 'string'
]
]),
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://api.quiva.ai/records/csv-import"
payload := strings.NewReader("{\n \"config_id\": \"customers\",\n \"object_uri\": \"obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv\",\n \"space_id\": \"spc_9fJk2\",\n \"folder\": \"customers/2026\",\n \"column_map\": {\n \"First Name\": \"first_name\",\n \"Email\": \"email\"\n },\n \"types\": {\n \"first_name\": \"string\",\n \"email\": \"string\"\n }\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://api.quiva.ai/records/csv-import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config_id\": \"customers\",\n \"object_uri\": \"obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv\",\n \"space_id\": \"spc_9fJk2\",\n \"folder\": \"customers/2026\",\n \"column_map\": {\n \"First Name\": \"first_name\",\n \"Email\": \"email\"\n },\n \"types\": {\n \"first_name\": \"string\",\n \"email\": \"string\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/records/csv-import")
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 \"config_id\": \"customers\",\n \"object_uri\": \"obj://microstrate-agent-knowledge/record-import.customers.aB3xY9.contacts.csv\",\n \"space_id\": \"spc_9fJk2\",\n \"folder\": \"customers/2026\",\n \"column_map\": {\n \"First Name\": \"first_name\",\n \"Email\": \"email\"\n },\n \"types\": {\n \"first_name\": \"string\",\n \"email\": \"string\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status_code": 123,
"body": {
"config_id": "<string>",
"total": 123,
"created": 123,
"failed": 123,
"errors": [
{
"row": 123,
"error": "<string>"
}
],
"history_failed": 123,
"history_warning": "<string>"
}
}{
"status_code": 400,
"body": {
"error": "field 'rating' is required"
}
}{
"status_code": 400,
"body": {
"error": "field 'rating' is required"
}
}Authorizations
bearerAuthapiKeyAuth
Body
application/json
Turn an already-uploaded CSV into records. The file is named, not carried: upload it to the knowledge object bucket first and send its location, so a file of any size travels once rather than through this request body.