Import a file
curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/ingest/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-ndjson' \
--data '"<string>"'import requests
url = "https://{space}.{region}.api.niadra.com/v1/ingest/files"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-ndjson"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/x-ndjson'},
body: JSON.stringify('<string>')
};
fetch('https://{space}.{region}.api.niadra.com/v1/ingest/files', 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://{space}.{region}.api.niadra.com/v1/ingest/files",
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('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-ndjson"
],
]);
$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://{space}.{region}.api.niadra.com/v1/ingest/files"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-ndjson")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{space}.{region}.api.niadra.com/v1/ingest/files")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-ndjson")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/ingest/files")
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/x-ndjson'
request.body = "\"<string>\""
response = http.request(request)
puts response.read_body{
"import_id": "0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e0a",
"format": "csv",
"status": "queued",
"size_bytes": 1842201,
"sha256": "9c1e5a7b3d2f40e18a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f",
"records": 0,
"accepted": 0,
"duplicates": 0,
"rejected": 0,
"errors": [],
"created_at": "2026-09-22T12:00:04Z",
"finished_at": null
}Write
Import a file
A CSV of identities or a JSONL file with one batch item per line, processed in the background.
POST
/
v1
/
ingest
/
files
Import a file
curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/ingest/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-ndjson' \
--data '"<string>"'import requests
url = "https://{space}.{region}.api.niadra.com/v1/ingest/files"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-ndjson"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/x-ndjson'},
body: JSON.stringify('<string>')
};
fetch('https://{space}.{region}.api.niadra.com/v1/ingest/files', 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://{space}.{region}.api.niadra.com/v1/ingest/files",
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('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-ndjson"
],
]);
$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://{space}.{region}.api.niadra.com/v1/ingest/files"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-ndjson")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{space}.{region}.api.niadra.com/v1/ingest/files")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-ndjson")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/ingest/files")
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/x-ndjson'
request.body = "\"<string>\""
response = http.request(request)
puts response.read_body{
"import_id": "0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e0a",
"format": "csv",
"status": "queued",
"size_bytes": 1842201,
"sha256": "9c1e5a7b3d2f40e18a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f",
"records": 0,
"accepted": 0,
"duplicates": 0,
"rejected": 0,
"errors": [],
"created_at": "2026-09-22T12:00:04Z",
"finished_at": null
}Authorizations
nia_sk_...
Body
application/x-ndjsontext/csv
The body is of type string.
Response
202 - application/json
The file is stored and queued; follow it with GET /v1/ingest/files/{import_id}.
POST /v1/ingest/files answers 202 with this; GET /v1/ingest/files/{import_id} follows it.
The first 100 rejected rows; values are never echoed.
Show child attributes
Show child attributes
Available options:
csv, jsonl Records in the file, blank lines included.
Available options:
queued, running, completed, failed 
