curl --request POST \
--url https://api.tented.ai/v1/contacts/imports/{sessionId}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mappings": [
{
"header": "<string>",
"target_field": "<string>"
}
],
"duplicate_strategy": "update",
"overwrite_blank_only": false,
"list_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"created_field_definition_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.tented.ai/v1/contacts/imports/{sessionId}/execute"
payload = {
"mappings": [
{
"header": "<string>",
"target_field": "<string>"
}
],
"duplicate_strategy": "update",
"overwrite_blank_only": False,
"list_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"created_field_definition_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
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({
mappings: [{header: '<string>', target_field: '<string>'}],
duplicate_strategy: 'update',
overwrite_blank_only: false,
list_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
created_field_definition_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.tented.ai/v1/contacts/imports/{sessionId}/execute', 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}/execute",
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([
'mappings' => [
[
'header' => '<string>',
'target_field' => '<string>'
]
],
'duplicate_strategy' => 'update',
'overwrite_blank_only' => false,
'list_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'created_field_definition_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
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.tented.ai/v1/contacts/imports/{sessionId}/execute"
payload := strings.NewReader("{\n \"mappings\": [\n {\n \"header\": \"<string>\",\n \"target_field\": \"<string>\"\n }\n ],\n \"duplicate_strategy\": \"update\",\n \"overwrite_blank_only\": false,\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"created_field_definition_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.tented.ai/v1/contacts/imports/{sessionId}/execute")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mappings\": [\n {\n \"header\": \"<string>\",\n \"target_field\": \"<string>\"\n }\n ],\n \"duplicate_strategy\": \"update\",\n \"overwrite_blank_only\": false,\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"created_field_definition_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/contacts/imports/{sessionId}/execute")
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 \"mappings\": [\n {\n \"header\": \"<string>\",\n \"target_field\": \"<string>\"\n }\n ],\n \"duplicate_strategy\": \"update\",\n \"overwrite_blank_only\": false,\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"created_field_definition_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"import_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"import_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"duplicate_strategy": "update",
"list_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"total_rows": 123,
"correlation_id": "<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
}Execute an import
Approve the final column mappings and start the import. The import runs asynchronously in chunks — this endpoint returns 202 with an import_run_id; poll GET /v1/contacts/imports/{importRunId} until status is completed or failed.
Every mapping’s header must be a column from the session’s CSV. Map a column to null (target_field: null, target_kind: null) to skip it. Each field can be the target of only one column; mapping two columns to the same field returns 400. At least one column must map to the email or phone standard field — contacts are matched (deduplicated) by normalized email or phone.
Each session can be executed once: re-executing a session whose latest run is queued, running, or completed returns 400. A session whose only runs failed can be executed again.
curl --request POST \
--url https://api.tented.ai/v1/contacts/imports/{sessionId}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mappings": [
{
"header": "<string>",
"target_field": "<string>"
}
],
"duplicate_strategy": "update",
"overwrite_blank_only": false,
"list_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"created_field_definition_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.tented.ai/v1/contacts/imports/{sessionId}/execute"
payload = {
"mappings": [
{
"header": "<string>",
"target_field": "<string>"
}
],
"duplicate_strategy": "update",
"overwrite_blank_only": False,
"list_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"created_field_definition_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
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({
mappings: [{header: '<string>', target_field: '<string>'}],
duplicate_strategy: 'update',
overwrite_blank_only: false,
list_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
created_field_definition_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.tented.ai/v1/contacts/imports/{sessionId}/execute', 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}/execute",
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([
'mappings' => [
[
'header' => '<string>',
'target_field' => '<string>'
]
],
'duplicate_strategy' => 'update',
'overwrite_blank_only' => false,
'list_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'created_field_definition_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
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.tented.ai/v1/contacts/imports/{sessionId}/execute"
payload := strings.NewReader("{\n \"mappings\": [\n {\n \"header\": \"<string>\",\n \"target_field\": \"<string>\"\n }\n ],\n \"duplicate_strategy\": \"update\",\n \"overwrite_blank_only\": false,\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"created_field_definition_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.tented.ai/v1/contacts/imports/{sessionId}/execute")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mappings\": [\n {\n \"header\": \"<string>\",\n \"target_field\": \"<string>\"\n }\n ],\n \"duplicate_strategy\": \"update\",\n \"overwrite_blank_only\": false,\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"created_field_definition_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/contacts/imports/{sessionId}/execute")
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 \"mappings\": [\n {\n \"header\": \"<string>\",\n \"target_field\": \"<string>\"\n }\n ],\n \"duplicate_strategy\": \"update\",\n \"overwrite_blank_only\": false,\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"created_field_definition_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"import_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"import_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"duplicate_strategy": "update",
"list_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"total_rows": 123,
"correlation_id": "<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
Body
Response
Import accepted and queued. Poll GET /v1/contacts/imports/{importRunId} for progress.
Acknowledgement that an import run was queued.