curl --request POST \
--url https://api.tented.ai/v1/contacts/imports/{sessionId}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tented.ai/v1/contacts/imports/{sessionId}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tented.ai/v1/contacts/imports/{sessionId}/preview', 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.tented.ai/v1/contacts/imports/{sessionId}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tented.ai/v1/contacts/imports/{sessionId}/preview"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.tented.ai/v1/contacts/imports/{sessionId}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/contacts/imports/{sessionId}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"import_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"headers": [
"<string>"
],
"proposed_mappings": [
{
"header": "<string>",
"target_field": "<string>",
"target_kind": "standard",
"reason": "<string>",
"source": "deterministic",
"overwrite_behavior": "overwrite"
}
],
"unmapped_headers": [
"<string>"
],
"available_fields": {
"standard": [
{
"api_name": "<string>",
"display_name": "<string>",
"type": "standard",
"value_type": "string",
"is_editable": true,
"field_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"management_mode": "org_managed",
"provenance_kind": "manual_ui",
"created_from_import_session_id": "<string>"
}
],
"custom": [
{
"api_name": "<string>",
"display_name": "<string>",
"type": "standard",
"value_type": "string",
"is_editable": true,
"field_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"management_mode": "org_managed",
"provenance_kind": "manual_ui",
"created_from_import_session_id": "<string>"
}
]
},
"field_creation_candidates": [
{
"header": "<string>",
"suggested_display_name": "<string>",
"suggested_api_name": "<string>",
"suggested_value_type": "string",
"confidence": "low",
"sample_values": [
"<string>"
],
"reason": "<string>",
"conflicts": [
{
"kind": "archived_existing",
"resolution": "restore_existing",
"existing_field_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"existing_field_display_name": "<string>",
"conflict_key": "<string>"
}
]
}
],
"sample_rows": [
{}
],
"sample_issues": [
{
"row_number": 123,
"header": "<string>",
"target_field": "<string>",
"code": "invalid_email",
"message": "<string>",
"value": "<string>"
}
],
"blocking_issues": [
{
"code": "missing_identity_mapping",
"message": "<string>"
}
]
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}Preview an import
Parse the session’s CSV and return everything needed to build the mapping step: the detected column headers, proposed column-to-field mappings (deterministic header matching plus AI-assisted suggestions), the catalog of available target fields (importable standard fields and your active custom fields), suggested new custom fields for unmapped columns (field_creation_candidates), a sample of rows, and validation issues found in that sample.
Proposed mappings never send two columns to the same field: a header-name match wins over an AI suggestion, then the earlier column wins, and the other column is left unmapped (its reason names the column that claimed the field) so it can be offered in field_creation_candidates.
No request body. Safe to call repeatedly — for example, after bulk-creating suggested custom fields via POST /v1/contact-fields, preview again to see the new fields mapped.
blocking_issues must be resolved before executing: an import needs at least one column mapped to email or phone so contacts can be identified and deduplicated.
curl --request POST \
--url https://api.tented.ai/v1/contacts/imports/{sessionId}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tented.ai/v1/contacts/imports/{sessionId}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tented.ai/v1/contacts/imports/{sessionId}/preview', 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.tented.ai/v1/contacts/imports/{sessionId}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tented.ai/v1/contacts/imports/{sessionId}/preview"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.tented.ai/v1/contacts/imports/{sessionId}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/contacts/imports/{sessionId}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"import_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"headers": [
"<string>"
],
"proposed_mappings": [
{
"header": "<string>",
"target_field": "<string>",
"target_kind": "standard",
"reason": "<string>",
"source": "deterministic",
"overwrite_behavior": "overwrite"
}
],
"unmapped_headers": [
"<string>"
],
"available_fields": {
"standard": [
{
"api_name": "<string>",
"display_name": "<string>",
"type": "standard",
"value_type": "string",
"is_editable": true,
"field_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"management_mode": "org_managed",
"provenance_kind": "manual_ui",
"created_from_import_session_id": "<string>"
}
],
"custom": [
{
"api_name": "<string>",
"display_name": "<string>",
"type": "standard",
"value_type": "string",
"is_editable": true,
"field_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"management_mode": "org_managed",
"provenance_kind": "manual_ui",
"created_from_import_session_id": "<string>"
}
]
},
"field_creation_candidates": [
{
"header": "<string>",
"suggested_display_name": "<string>",
"suggested_api_name": "<string>",
"suggested_value_type": "string",
"confidence": "low",
"sample_values": [
"<string>"
],
"reason": "<string>",
"conflicts": [
{
"kind": "archived_existing",
"resolution": "restore_existing",
"existing_field_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"existing_field_display_name": "<string>",
"conflict_key": "<string>"
}
]
}
],
"sample_rows": [
{}
],
"sample_issues": [
{
"row_number": 123,
"header": "<string>",
"target_field": "<string>",
"code": "invalid_email",
"message": "<string>",
"value": "<string>"
}
],
"blocking_issues": [
{
"code": "missing_identity_mapping",
"message": "<string>"
}
]
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}Authorizations
Workspace API key, e.g. Authorization: Bearer tented_.... Create keys in Workspace Settings → API Keys.
Path Parameters
Import session ID from POST /v1/contacts/imports.
Response
Parsed preview with proposed mappings and sample validation issues.
Preview of an import: detected headers, proposed mappings, available target fields, new-field suggestions, and sample validation issues.
Import session ID.
Column headers detected in the CSV.
Proposed column-to-field mappings, one per header. Use these as the starting point for the execute call's mappings.
Show child attributes
Show child attributes
Headers with no proposed target (target_field: null).
Catalog of valid mapping targets.
Show child attributes
Show child attributes
Suggested new custom fields for unmapped columns.
Show child attributes
Show child attributes
A sample of the file's first data rows.
Show child attributes
Show child attributes
Validation issues found in the sample rows under the proposed mappings — a preview of the problems the full import would hit.
Show child attributes
Show child attributes
Issues that must be resolved before execution — currently only missing_identity_mapping: no column maps to email or phone, so contacts cannot be identified.
Show child attributes
Show child attributes