Create Risk Matrix
curl --request POST \
--url http://api.gu1.ai/risk-matrices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"category": "<string>",
"status": "<string>",
"scoringConfig": {},
"triggers": [
{}
],
"tags": [
{}
]
}
'import requests
url = "http://api.gu1.ai/risk-matrices"
payload = {
"name": "<string>",
"description": "<string>",
"category": "<string>",
"status": "<string>",
"scoringConfig": {},
"triggers": [{}],
"tags": [{}]
}
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({
name: '<string>',
description: '<string>',
category: '<string>',
status: '<string>',
scoringConfig: {},
triggers: [{}],
tags: [{}]
})
};
fetch('http://api.gu1.ai/risk-matrices', 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/risk-matrices",
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([
'name' => '<string>',
'description' => '<string>',
'category' => '<string>',
'status' => '<string>',
'scoringConfig' => [
],
'triggers' => [
[
]
],
'tags' => [
[
]
]
]),
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 := "http://api.gu1.ai/risk-matrices"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"status\": \"<string>\",\n \"scoringConfig\": {},\n \"triggers\": [\n {}\n ],\n \"tags\": [\n {}\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("http://api.gu1.ai/risk-matrices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"status\": \"<string>\",\n \"scoringConfig\": {},\n \"triggers\": [\n {}\n ],\n \"tags\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/risk-matrices")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"status\": \"<string>\",\n \"scoringConfig\": {},\n \"triggers\": [\n {}\n ],\n \"tags\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_bodyAPI Reference
Create Risk Matrix
Create a new risk matrix with triggers β using the gu1 risk scoring engine with configurable triggers, with examples for create use cases.
POST
/
risk-matrices
Create Risk Matrix
curl --request POST \
--url http://api.gu1.ai/risk-matrices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"category": "<string>",
"status": "<string>",
"scoringConfig": {},
"triggers": [
{}
],
"tags": [
{}
]
}
'import requests
url = "http://api.gu1.ai/risk-matrices"
payload = {
"name": "<string>",
"description": "<string>",
"category": "<string>",
"status": "<string>",
"scoringConfig": {},
"triggers": [{}],
"tags": [{}]
}
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({
name: '<string>',
description: '<string>',
category: '<string>',
status: '<string>',
scoringConfig: {},
triggers: [{}],
tags: [{}]
})
};
fetch('http://api.gu1.ai/risk-matrices', 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/risk-matrices",
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([
'name' => '<string>',
'description' => '<string>',
'category' => '<string>',
'status' => '<string>',
'scoringConfig' => [
],
'triggers' => [
[
]
],
'tags' => [
[
]
]
]),
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 := "http://api.gu1.ai/risk-matrices"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"status\": \"<string>\",\n \"scoringConfig\": {},\n \"triggers\": [\n {}\n ],\n \"tags\": [\n {}\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("http://api.gu1.ai/risk-matrices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"status\": \"<string>\",\n \"scoringConfig\": {},\n \"triggers\": [\n {}\n ],\n \"tags\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/risk-matrices")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"status\": \"<string>\",\n \"scoringConfig\": {},\n \"triggers\": [\n {}\n ],\n \"tags\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_bodyOverview
Creates a new risk matrix with scoring configuration and optional triggers.Request Body
string
required
Risk matrix name
string
Risk matrix description
string
default:"custom"
Category: aml, kyc, fraud, sanctions, transaction_monitoring, customer_risk, regulatory, custom
string
default:"draft"
Status: draft, active, shadow, inactive
object
Scoring configuration with thresholds
array
Array of trigger configurations
array
Array of tags for organization
Trigger Configuration
Each trigger can have:{
"name": "High Risk Trigger",
"description": "Create investigation when risk is high",
"condition": {
"field": "riskScore",
"operator": "gte",
"value": 80
},
"action": "create_investigation",
"priority": "HIGH"
}
Example
curl -X POST http://api.gu1.ai/risk-matrices \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Transaction Monitoring Matrix",
"description": "Monitor high-risk transactions",
"category": "transaction_monitoring",
"status": "active",
"scoringConfig": {
"minScore": 0,
"maxScore": 100,
"thresholds": {
"low": 30,
"medium": 60,
"high": 80
}
},
"triggers": [
{
"name": "Critical Risk Trigger",
"description": "Auto-create investigation for critical risk",
"condition": {
"field": "riskScore",
"operator": "gte",
"value": 90
},
"action": "create_investigation",
"priority": "CRITICAL"
},
{
"name": "Medium Risk Alert",
"description": "Create alert for medium risk",
"condition": {
"field": "riskScore",
"operator": "between",
"value": [60, 89]
},
"action": "create_alert",
"priority": "MEDIUM"
}
],
"tags": ["transaction", "aml"]
}'
Response
{
"riskMatrix": {
"id": "rm-new-123",
"name": "Transaction Monitoring Matrix",
"status": "active",
"triggers": [/* ... */]
},
"usingDefaultStrategy": false
}
Trigger Actions
- create_alert: Create an alert
- create_investigation: Create an investigation
- send_notification: Send notification to team
- block_entity: Block entity from processing
- request_approval: Request manual approval
- escalate: Escalate to supervisor
See Also
Was this page helpful?
βI