🔐 API Overview
The Treova Client API allows you to securely access your KYC submissions. You can filter and retrieve your data directly in your browser (via Swagger) or through commands.
Base URL
https://api.treova.ai/api/client-api
Authentication
Every request requires an x-api-key header. Treova will
provide your unique API key.
x-api-key: YOUR_API_KEY
Keep this key safe. Do not share it publicly, as it grants access to your client data.
Option 1 – Use Swagger (Easiest)
- Open Swagger UI.
- Click the green "Authorize" button.
- Paste your API key and click Authorize.
- Find the
/submissionssection. - Click "Try it out", enter filters (optional), then click "Execute".
- Your data will appear directly in the browser.
Option 2 – Use Commands (For Full Control)
You can also access the data using curl, which is a command-line tool.
How to run curl commands:
- On Mac: open the Terminal app.
- On Windows: open PowerShell.
-
Copy and paste one of the commands below, replace
YOUR_API_KEYwith your actual key, and press Enter.
Examples:
1. Get all submissions
curl "https://api.treova.ai/api/client-api/submissions" --header "x-api-key: YOUR_API_KEY"
2. Get only verified submissions
curl "https://api.treova.ai/api/client-api/submissions?status=verified" --header "x-api-key: YOUR_API_KEY"
3. Filter by applicant name
curl "https://api.treova.ai/api/client-api/submissions?name=John" --header "x-api-key: YOUR_API_KEY"
4. Filter by wallet address
curl "https://api.treova.ai/api/client-api/submissions?wallet_address=0xABC123..." --header "x-api-key: YOUR_API_KEY"
5. Filter by date range
curl "https://api.treova.ai/api/client-api/submissions?from=2025-01-01&to=2025-02-01" --header "x-api-key: YOUR_API_KEY"
6. Get only the most recent submission
curl "https://api.treova.ai/api/client-api/submissions?latest=true" --header "x-api-key: YOUR_API_KEY"
After pressing Enter, the results will appear as JSON in your terminal.
Example: Pulling Data into Google Sheets
This example shows how you can pull API data directly into a Google Sheet, no coding experience needed.
Prerequisites
- A Google account with access to Google Sheets.
- Your Treova
x-api-key.
Steps:
- Open a new Google Sheet.
- Click Extensions > Apps Script.
- Remove existing code and paste the following script:
function fetchTreovaSubmissions() {
const API_KEY = "YOUR_API_KEY"; // Replace with your key
const API_URL = "https://api.treova.ai/api/client-api/submissions";
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const response = UrlFetchApp.fetch(API_URL, {
method: "get",
headers: { "x-api-key": API_KEY }
});
const data = JSON.parse(response.getContentText());
// Column headers
const headers = [
"user_id", "campaign_id", "applicant_id", "name", "dob", "address",
"email", "nationality", "status", "wallet_address", "screening", "comment",
"createdat", "updatedat"
];
// Write headers if sheet is empty
if (sheet.getLastRow() === 0) sheet.appendRow(headers);
// Build a lookup of existing applicant_ids
const existing = {};
const existingData = sheet.getDataRange().getValues();
for (let i = 1; i < existingData.length; i++) {
existing[existingData[i][2]] = i + 1; // applicant_id column index
}
// Update or append rows
data.data.forEach(item => {
const row = headers.map(h => item[h] || "");
if (existing[item.applicant_id]) {
sheet.getRange(existing[item.applicant_id], 1, 1, headers.length).setValues([row]);
} else {
sheet.appendRow(row);
}
});
}
- Replace YOUR_API_KEY with your actual API key.
- Click the disk icon to save, name the project “Treova API”.
- Click Run ▶ the first time; allow Google permissions.
-
Back in the sheet, you can now run the script by going to
Extensions > Apps Script and clicking the
Run ▶ button next to
fetchTreovaSubmissionsto refresh records.
Alternatively, you can insert a drawing (a button) in the sheet, right-click on it, choose Assign script, and typefetchTreovaSubmissions. After that, clicking the button will fetch and refresh your data.
The script will fetch all submissions and keep the sheet updated with new or changed data whenever you run it.
📧 Support
For help or additional filters, email info@treova.ai.
Open Swagger UI