Report templates
curl --request GET \
--url http://api.gu1.ai/report-templates \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'X-Organization-ID: <x-organization-id>' \
--data '
{
"format": "<string>",
"emailLocale": "<string>",
"params": {},
"delivery": "<string>",
"recipientEmails": [
"<string>"
]
}
'import requests
url = "http://api.gu1.ai/report-templates"
payload = {
"format": "<string>",
"emailLocale": "<string>",
"params": {},
"delivery": "<string>",
"recipientEmails": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"X-Organization-ID": "<x-organization-id>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
Authorization: '<authorization>',
'X-Organization-ID': '<x-organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
format: '<string>',
emailLocale: '<string>',
params: {},
delivery: '<string>',
recipientEmails: ['<string>']
})
};
fetch('http://api.gu1.ai/report-templates', 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 => "http://api.gu1.ai/report-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'format' => '<string>',
'emailLocale' => '<string>',
'params' => [
],
'delivery' => '<string>',
'recipientEmails' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"X-Organization-ID: <x-organization-id>"
],
]);
$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 := "http://api.gu1.ai/report-templates"
payload := strings.NewReader("{\n \"format\": \"<string>\",\n \"emailLocale\": \"<string>\",\n \"params\": {},\n \"delivery\": \"<string>\",\n \"recipientEmails\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("X-Organization-ID", "<x-organization-id>")
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.get("http://api.gu1.ai/report-templates")
.header("Authorization", "<authorization>")
.header("X-Organization-ID", "<x-organization-id>")
.header("Content-Type", "application/json")
.body("{\n \"format\": \"<string>\",\n \"emailLocale\": \"<string>\",\n \"params\": {},\n \"delivery\": \"<string>\",\n \"recipientEmails\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/report-templates")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["X-Organization-ID"] = '<x-organization-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"format\": \"<string>\",\n \"emailLocale\": \"<string>\",\n \"params\": {},\n \"delivery\": \"<string>\",\n \"recipientEmails\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyReport templates
List Gu1 operational report templates and queue async runs to object storage (optional email).
GET
/
report-templates
Report templates
curl --request GET \
--url http://api.gu1.ai/report-templates \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'X-Organization-ID: <x-organization-id>' \
--data '
{
"format": "<string>",
"emailLocale": "<string>",
"params": {},
"delivery": "<string>",
"recipientEmails": [
"<string>"
]
}
'import requests
url = "http://api.gu1.ai/report-templates"
payload = {
"format": "<string>",
"emailLocale": "<string>",
"params": {},
"delivery": "<string>",
"recipientEmails": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"X-Organization-ID": "<x-organization-id>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
Authorization: '<authorization>',
'X-Organization-ID': '<x-organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
format: '<string>',
emailLocale: '<string>',
params: {},
delivery: '<string>',
recipientEmails: ['<string>']
})
};
fetch('http://api.gu1.ai/report-templates', 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 => "http://api.gu1.ai/report-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'format' => '<string>',
'emailLocale' => '<string>',
'params' => [
],
'delivery' => '<string>',
'recipientEmails' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"X-Organization-ID: <x-organization-id>"
],
]);
$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 := "http://api.gu1.ai/report-templates"
payload := strings.NewReader("{\n \"format\": \"<string>\",\n \"emailLocale\": \"<string>\",\n \"params\": {},\n \"delivery\": \"<string>\",\n \"recipientEmails\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("X-Organization-ID", "<x-organization-id>")
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.get("http://api.gu1.ai/report-templates")
.header("Authorization", "<authorization>")
.header("X-Organization-ID", "<x-organization-id>")
.header("Content-Type", "application/json")
.body("{\n \"format\": \"<string>\",\n \"emailLocale\": \"<string>\",\n \"params\": {},\n \"delivery\": \"<string>\",\n \"recipientEmails\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/report-templates")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["X-Organization-ID"] = '<x-organization-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"format\": \"<string>\",\n \"emailLocale\": \"<string>\",\n \"params\": {},\n \"delivery\": \"<string>\",\n \"recipientEmails\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyOverview
Gu1 publishes a code-first catalog of operational templates (alerts by rules, bulk exports, and Metrics Hub views). The same templates power Reporting (on demand) and the automation actionsend_report / Generar reporte (reportPresetId or reportTemplateCode + params).
| Method | Path | Use |
|---|---|---|
GET | /report-templates | List catalog (optional category) |
GET | /report-templates/{code} | Detail + parameterDefinitions |
POST | /report-templates/{code}/preview | Download CSV/PDF preview with sample data |
POST | /report-templates/{code}/run | Queue async export (download or email) |
alerts_by_rules) enqueue a background job, store the file in object storage, and return 202 with result.jobId. Download later from Report export jobs (Reporting Descargables). They share the org export cooldown when applicable.
Authentication and tenant
string
required
Bearer YOUR_API_KEY — see Authentication.string
required
Production or sandbox organization UUID — see Environments.
Permissions
| Endpoint | Granular permission |
|---|---|
GET list / get | reports:read |
POST preview / run | reports:export |
List templates
GET http://api.gu1.ai/report-templates
string
Optional filter:
alerts, metrics, entities, transactions, investigations.Get a template
GET http://api.gu1.ai/report-templates/{code}
404 with REPORT_TEMPLATE_NOT_FOUND if the code does not exist.
Preview (sample data)
POST http://api.gu1.ai/report-templates/{code}/preview
string
csv (default) or pdf.string
Optional:
es, en, or pt (PDF copy).Content-Disposition: attachment (preview-{code}.csv|pdf).
Run a template
POST http://api.gu1.ai/report-templates/{code}/run
object
Template parameters (
lookbackDays, ruleIds, emailLocale, filters, etc.).string
Must be in the template
formats. Default: defaultFormat.string
required
download (queue job only) or email (queue job + send mail). Reporting UI always uses download.string[]
Required when
delivery is email.Response (202)
{
"success": true,
"result": {
"success": true,
"jobId": "…",
"status": "queued",
"delivery": "download"
}
}
Semantics: alerts_by_rules
Exports already-created alerts for the tenant whose alerted_at falls in the lookbackDays window.
ruleIds(UUID array, optional): when set, filterstrigger_rule_id IN (...). Empty = all rules.- Columns: entity, tax ID, alert, severity, status, score, rule, investigation number, case/alert link, date.
- Order: entity name, then alert date.
- Does not re-run the matrix or invent thresholds: only lists persisted alerts.
Rate limit
If another org export ran recently, the API may return 429 withEXPORT_RATE_LIMIT, Retry-After, and retryAfterSeconds / cooldownSeconds in error.details.
Example
{
"params": {
"lookbackDays": 30,
"ruleIds": ["aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"]
},
"format": "xlsx",
"delivery": "email",
"recipientEmails": ["ops@example.com"]
}
202 response (email)
{
"success": true,
"result": {
"success": true,
"code": "alerts_by_rules",
"delivery": "email",
"jobId": "…",
"status": "queued"
}
}
202 response (download)
{
"success": true,
"result": {
"success": true,
"code": "alerts_by_rules",
"delivery": "download",
"jobId": "…",
"status": "queued"
}
}
Automations
Scheduled delivery usessend_report (Generar reporte) with either:
reportPresetId(canonical): runs the frozen preset; always creates an S3 job. SetsendEmail: trueplusrecipientEmailsto also email the file.- Legacy:
reportTemplateCode+params, orreportTypewithout a preset.
/automations/builder?type=scheduled&reportPresetId=….
See Report export jobs for Descargables.
Configurable filters
Operational templates expose afield → operator → value builder. Send conditions in params.filters; every condition is combined with AND. An empty list includes all records. Saved report presets freeze the complete conditions.
Catalog-backed fields change their control according to the operator: equals receives one value and in receives an array. For example, country accepts { "operator": "equals", "value": "AR" } or { "operator": "in", "value": ["AR", "BR"] }.
{
"params": {
"filters": [
{ "id": "f1", "field": "tax_id", "operator": "in_custom_list", "value": "11111111-1111-4111-8111-111111111111" },
{ "id": "f2", "field": "age", "operator": "gte", "value": "18" },
{ "id": "f3", "field": "is_pep", "operator": "is_true", "value": "" }
]
},
"format": "xlsx",
"delivery": "download"
}
- Alerts: rule (
in), severity, status, affected type, score, false-positive flag, alert date and alert type. - Entities: type, status, exact Tax ID or custom-list membership, country, external ID, search, age, score, KYC status, matched rule, creation/enrichment dates, PEP, sanctions, adverse media, MEI, legal proceedings —including criminal proceedings—, shareholders, relationships, electoral activity, economic activities and active investigations.
- Transactions: type, status, payment method, score, amount, currency, date, matched rule, related Tax ID, origin/destination external IDs, self-transactions, missing risk evaluation, shadow-rule hits, search, flagged state and alert presence.
- Investigations: status, priority, typology, score, target type, creation/update dates and title/description search.
equals, contains, in, gte, lte, between, before, after, is_true, is_false, in_custom_list, and not_in_custom_list. The catalog returned by GET /report-templates includes filterFields with each template’s valid operators and options.Was this page helpful?