Import a CSV
curl --request POST \
--url https://api.rial.io/v1/link-templates/{slug}/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"csv": "external_ref\nci-inso-row-1\nci-inso-row-2\n"
}
'import requests
url = "https://api.rial.io/v1/link-templates/{slug}/import"
payload = { "csv": "external_ref
ci-inso-row-1
ci-inso-row-2
" }
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({csv: 'external_ref\nci-inso-row-1\nci-inso-row-2\n'})
};
fetch('https://api.rial.io/v1/link-templates/{slug}/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.rial.io/v1/link-templates/{slug}/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([
'csv' => 'external_ref
ci-inso-row-1
ci-inso-row-2
'
]),
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.rial.io/v1/link-templates/{slug}/import"
payload := strings.NewReader("{\n \"csv\": \"external_ref\\nci-inso-row-1\\nci-inso-row-2\\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.rial.io/v1/link-templates/{slug}/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"csv\": \"external_ref\\nci-inso-row-1\\nci-inso-row-2\\n\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rial.io/v1/link-templates/{slug}/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 \"csv\": \"external_ref\\nci-inso-row-1\\nci-inso-row-2\\n\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"template_slug": "<string>",
"status": "processing",
"total_rows": 123,
"imported_rows": 123,
"invalid_rows": [
{
"row": 123,
"reason": "<string>"
}
],
"requested_at": "2023-11-07T05:31:56Z",
"duplicate": true,
"completed_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>"
}{
"id": "imp_01HXYZABCDEFGHJKMNPQRSTVWX",
"status": "processing",
"total_rows": 2,
"valid_rows": 2,
"invalid_rows": [],
"invalid_rows_total": 0
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}{
"error": "<string>"
}{
"error": "storage_unavailable"
}Templates
Import a CSV
Import a CSV: one verification per row, created in the background. Poll the job for progress.
POST
/
v1
/
link-templates
/
{slug}
/
import
Import a CSV
curl --request POST \
--url https://api.rial.io/v1/link-templates/{slug}/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"csv": "external_ref\nci-inso-row-1\nci-inso-row-2\n"
}
'import requests
url = "https://api.rial.io/v1/link-templates/{slug}/import"
payload = { "csv": "external_ref
ci-inso-row-1
ci-inso-row-2
" }
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({csv: 'external_ref\nci-inso-row-1\nci-inso-row-2\n'})
};
fetch('https://api.rial.io/v1/link-templates/{slug}/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.rial.io/v1/link-templates/{slug}/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([
'csv' => 'external_ref
ci-inso-row-1
ci-inso-row-2
'
]),
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.rial.io/v1/link-templates/{slug}/import"
payload := strings.NewReader("{\n \"csv\": \"external_ref\\nci-inso-row-1\\nci-inso-row-2\\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.rial.io/v1/link-templates/{slug}/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"csv\": \"external_ref\\nci-inso-row-1\\nci-inso-row-2\\n\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rial.io/v1/link-templates/{slug}/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 \"csv\": \"external_ref\\nci-inso-row-1\\nci-inso-row-2\\n\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"template_slug": "<string>",
"status": "processing",
"total_rows": 123,
"imported_rows": 123,
"invalid_rows": [
{
"row": 123,
"reason": "<string>"
}
],
"requested_at": "2023-11-07T05:31:56Z",
"duplicate": true,
"completed_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>"
}{
"id": "imp_01HXYZABCDEFGHJKMNPQRSTVWX",
"status": "processing",
"total_rows": 2,
"valid_rows": 2,
"invalid_rows": [],
"invalid_rows_total": 0
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}{
"error": "<string>"
}{
"error": "storage_unavailable"
}Authorizations
Secret API key, created in the dashboard under Settings → API. Send it as Authorization: Bearer rk_secret_… from your server only. Publishable keys (pk_live_…) are for the native SDKs and reach the capture endpoints alone. An unknown key returns 401.
Path Parameters
Template slug — lowercase [a-z0-9-].
Pattern:
^[a-z0-9]+(?:-[a-z0-9]+)*$Example:
"warehouse-intake"
Body
application/json
Response
Identical bytes already submitted — the EXISTING job is returned with duplicate: true; nothing re-runs.
Available options:
processing, completed, failed, aborted Show child attributes
Show child attributes
Available options:
true ⌘I