Contact imports
Get import status
Poll GET /dn/contacts/import/ to check whether a contact import has completed, how many contacts it added, and which rows failed.
GET
/
dn
/
contacts
/
import
/
{id}
Get import status
curl --request GET \
--url https://app.detrack.com/api/v2/dn/contacts/import/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.detrack.com/api/v2/dn/contacts/import/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://app.detrack.com/api/v2/dn/contacts/import/{id}', 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://app.detrack.com/api/v2/dn/contacts/import/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://app.detrack.com/api/v2/dn/contacts/import/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.detrack.com/api/v2/dn/contacts/import/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.detrack.com/api/v2/dn/contacts/import/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "6ae1949608fe77f3f222fa08",
"status": "completed",
"import_count": 2,
"invalid_count": 0,
"invalid_contacts": [],
"errors": [],
"imported_at": "2026-10-28T14:22:14.255+08:00"
}
}{
"code": "invalid_key",
"message": "Invalid key"
}{
"code": "forbidden"
}{
"code": "not_found",
"message": "Contact import not found"
}After you start an import with Import contacts, poll this endpoint with the import’s
id.
Polling
- Poll every 5 to 10 seconds. Small files finish within seconds, but a file with a few thousand rows can take a couple of minutes.
- Stop polling when
statusiscompletedorfailed. - A
failedimport lists the reasons inerrors. Withinvalid_contact, the rows ininvalid_contactsweren’t saved but the file’s other rows were. See Import errors.
id, use Get the last import.Authorizations
Path Parameters
The id returned by Import contacts.
Example:
"6ae1949608fe77f3f222fa08"
Get import status
curl --request GET \
--url https://app.detrack.com/api/v2/dn/contacts/import/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.detrack.com/api/v2/dn/contacts/import/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://app.detrack.com/api/v2/dn/contacts/import/{id}', 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://app.detrack.com/api/v2/dn/contacts/import/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://app.detrack.com/api/v2/dn/contacts/import/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.detrack.com/api/v2/dn/contacts/import/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.detrack.com/api/v2/dn/contacts/import/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "6ae1949608fe77f3f222fa08",
"status": "completed",
"import_count": 2,
"invalid_count": 0,
"invalid_contacts": [],
"errors": [],
"imported_at": "2026-10-28T14:22:14.255+08:00"
}
}{
"code": "invalid_key",
"message": "Invalid key"
}{
"code": "forbidden"
}{
"code": "not_found",
"message": "Contact import not found"
}