Cases
Create a case
POST
/
api
/
v1
/
cases
Create a case
curl --request POST \
--url https://sandbox.clausum.ai/api/v1/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"incident_date": "2023-12-25",
"amount": 1,
"description": "<string>",
"victim_name": "<string>",
"victim_email": "jsmith@example.com",
"priority": "normal"
}
'import requests
url = "https://sandbox.clausum.ai/api/v1/cases"
payload = {
"incident_date": "2023-12-25",
"amount": 1,
"description": "<string>",
"victim_name": "<string>",
"victim_email": "jsmith@example.com",
"priority": "normal"
}
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({
incident_date: '2023-12-25',
amount: 1,
description: '<string>',
victim_name: '<string>',
victim_email: 'jsmith@example.com',
priority: 'normal'
})
};
fetch('https://sandbox.clausum.ai/api/v1/cases', 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://sandbox.clausum.ai/api/v1/cases",
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([
'incident_date' => '2023-12-25',
'amount' => 1,
'description' => '<string>',
'victim_name' => '<string>',
'victim_email' => 'jsmith@example.com',
'priority' => 'normal'
]),
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://sandbox.clausum.ai/api/v1/cases"
payload := strings.NewReader("{\n \"incident_date\": \"2023-12-25\",\n \"amount\": 1,\n \"description\": \"<string>\",\n \"victim_name\": \"<string>\",\n \"victim_email\": \"jsmith@example.com\",\n \"priority\": \"normal\"\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://sandbox.clausum.ai/api/v1/cases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"incident_date\": \"2023-12-25\",\n \"amount\": 1,\n \"description\": \"<string>\",\n \"victim_name\": \"<string>\",\n \"victim_email\": \"jsmith@example.com\",\n \"priority\": \"normal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.clausum.ai/api/v1/cases")
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 \"incident_date\": \"2023-12-25\",\n \"amount\": 1,\n \"description\": \"<string>\",\n \"victim_name\": \"<string>\",\n \"victim_email\": \"jsmith@example.com\",\n \"priority\": \"normal\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_number": "CLM-CL-2024-000001",
"incident_date": "2023-12-25",
"incident_type": "<string>",
"amount": 123,
"currency": "<string>",
"description": "<string>",
"victim_name": "<string>",
"jurisdiction": "<string>",
"regulator": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Supabase session JWT for dashboard / management endpoints, obtained after user sign-in.
Body
application/json
Available options:
phishing, ingenieria_social, transferencia_no_autorizada, robo_identidad, fraude_interno, otro Required range:
x >= 0Available options:
CLP, MXN, BRL, PEN, COP, UYU, ARS, USD Available options:
CL, MX, BR, PE, CO, UY, AR Maximum string length:
5000Available options:
baja, normal, alta, urgente Response
Case created
Example:
"CLM-CL-2024-000001"
Available options:
borrador, en_revision, enviado, resuelto, archivado Available options:
baja, normal, alta, urgente ⌘I
Create a case
curl --request POST \
--url https://sandbox.clausum.ai/api/v1/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"incident_date": "2023-12-25",
"amount": 1,
"description": "<string>",
"victim_name": "<string>",
"victim_email": "jsmith@example.com",
"priority": "normal"
}
'import requests
url = "https://sandbox.clausum.ai/api/v1/cases"
payload = {
"incident_date": "2023-12-25",
"amount": 1,
"description": "<string>",
"victim_name": "<string>",
"victim_email": "jsmith@example.com",
"priority": "normal"
}
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({
incident_date: '2023-12-25',
amount: 1,
description: '<string>',
victim_name: '<string>',
victim_email: 'jsmith@example.com',
priority: 'normal'
})
};
fetch('https://sandbox.clausum.ai/api/v1/cases', 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://sandbox.clausum.ai/api/v1/cases",
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([
'incident_date' => '2023-12-25',
'amount' => 1,
'description' => '<string>',
'victim_name' => '<string>',
'victim_email' => 'jsmith@example.com',
'priority' => 'normal'
]),
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://sandbox.clausum.ai/api/v1/cases"
payload := strings.NewReader("{\n \"incident_date\": \"2023-12-25\",\n \"amount\": 1,\n \"description\": \"<string>\",\n \"victim_name\": \"<string>\",\n \"victim_email\": \"jsmith@example.com\",\n \"priority\": \"normal\"\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://sandbox.clausum.ai/api/v1/cases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"incident_date\": \"2023-12-25\",\n \"amount\": 1,\n \"description\": \"<string>\",\n \"victim_name\": \"<string>\",\n \"victim_email\": \"jsmith@example.com\",\n \"priority\": \"normal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.clausum.ai/api/v1/cases")
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 \"incident_date\": \"2023-12-25\",\n \"amount\": 1,\n \"description\": \"<string>\",\n \"victim_name\": \"<string>\",\n \"victim_email\": \"jsmith@example.com\",\n \"priority\": \"normal\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_number": "CLM-CL-2024-000001",
"incident_date": "2023-12-25",
"incident_type": "<string>",
"amount": 123,
"currency": "<string>",
"description": "<string>",
"victim_name": "<string>",
"jurisdiction": "<string>",
"regulator": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}