Quickstart
Ask a question in your test company and follow a citation back to its source.
On this page
Get the base address and credentials for the test company from your account onboarding. Follow Authentication and set RDC_BASE_URL and RDC_TOKEN in your shell. Use a client with access to the collection you want to query.
Submit a question
Choose a fresh UUID for operationId and an unused conversationId. Keep both identifiers. Use expectedRevision: 0 for a new conversation.
Set language to ro for a Romanian answer. The answer, title and passage then come back in Romanian.
curl
curl -X POST "$RDC_BASE_URL/ai/v1/conversations" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"question": "What payment term did we agree with Hanul Ozana?",
"scope": "all",
"language": "en",
"operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
"expectedRevision": 0,
"conversationId": "review-1042"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/ai/v1/conversations`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"question": "What payment term did we agree with Hanul Ozana?",
"scope": "all",
"language": "en",
"operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
"expectedRevision": 0,
"conversationId": "review-1042"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/ai/v1/conversations',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'question': 'What payment term did we agree with Hanul Ozana?',
'scope': 'all',
'language': 'en',
'operationId': '86c4fe37-99d4-4bfc-a8f1-347afc902a56',
'expectedRevision': 0,
'conversationId': 'review-1042',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"question": "What payment term did we agree with Hanul Ozana?",
"scope": "all",
"language": "en",
"operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
"expectedRevision": 0,
"conversationId": "review-1042"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/ai/v1/conversations');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/ai/v1/conversations");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"question": "What payment term did we agree with Hanul Ozana?",
"scope": "all",
"language": "en",
"operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
"expectedRevision": 0,
"conversationId": "review-1042"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
"status": "accepted",
"aggregateRevision": 1
} Read the result
Use the operation identifier you sent. Wait for completed before reading the conversation by its own identifier. A rejected operation has an error code. If the write times out, repeat the same body with the same UUID.
curl
curl "$RDC_BASE_URL/ai/v1/operations/86c4fe37-99d4-4bfc-a8f1-347afc902a56" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/ai/v1/operations/86c4fe37-99d4-4bfc-a8f1-347afc902a56`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/ai/v1/operations/86c4fe37-99d4-4bfc-a8f1-347afc902a56',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/ai/v1/operations/86c4fe37-99d4-4bfc-a8f1-347afc902a56');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/ai/v1/operations/86c4fe37-99d4-4bfc-a8f1-347afc902a56");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
"status": "completed",
"aggregateRevision": 1
} curl
curl "$RDC_BASE_URL/ai/v1/conversations/review-1042" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/ai/v1/conversations/review-1042`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/ai/v1/conversations/review-1042',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/ai/v1/conversations/review-1042');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/ai/v1/conversations/review-1042");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "review-1042",
"revision": 1,
"status": "answered",
"answer": "Hanul Ozana pays by bank transfer at the end of the month after delivery. [1] Clause 6.2 of the contract sets the last day of the month after delivery as the due date. [2] On orders delivered in parts, the period starts with the last delivery. [3]",
"citations": [
{
"id": "account",
"system": "CRM",
"title": "Hanul Ozana account notes",
"owner": "Andrei Pop",
"changed": "2026-11-17T15:40:00Z",
"path": "/sales/hanul-ozana",
"scope": "sales",
"passage": "Hanul Ozana pays by bank transfer at the end of the month after delivery.",
"number": 1,
"canRead": true
},
{
"id": "contract",
"system": "DMS",
"title": "Payment terms",
"owner": "Ioana Marin",
"changed": "2026-09-03T10:30:00Z",
"path": "/contracts/payment",
"scope": "contracts",
"passage": "Clause 6.2 of the contract sets the last day of the month after delivery as the due date.",
"number": 2,
"canRead": true
},
{
"id": "annex",
"system": "DMS",
"title": "Payment annex",
"owner": "Ana Rusu",
"changed": "2026-10-21T13:10:00Z",
"path": "/contracts/payment-annex",
"scope": "contracts",
"passage": "On orders delivered in parts, the period starts with the last delivery.",
"number": 3,
"canRead": true
}
],
"hiddenCount": 0
} Open the cited passage
Take citations[].id from the conversation. When the status is no_answer, inspect the collection and client access before asking again.
curl
curl "$RDC_BASE_URL/ai/v1/documents/account" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/ai/v1/documents/account`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/ai/v1/documents/account',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/ai/v1/documents/account');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/ai/v1/documents/account");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "account",
"system": "CRM",
"title": "Hanul Ozana account notes",
"owner": "Andrei Pop",
"changed": "2026-11-17T15:40:00Z",
"path": "/sales/hanul-ozana",
"scope": "sales",
"passage": "Hanul Ozana pays by bank transfer at the end of the month after delivery."
}