curl -X POST https://api.example.com/api/assessments \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Q1 2026 Risk Assessment",
"companyName": "Acme Coffee Cooperative",
"companyType": "Cooperative",
"country": "Kenya",
"intakeMode": "UPLOAD"
}'
const response = await fetch('https://api.example.com/api/assessments', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Q1 2026 Risk Assessment',
companyName: 'Acme Coffee Cooperative',
companyType: 'Cooperative',
country: 'Kenya',
intakeMode: 'UPLOAD'
})
});
const assessment = await response.json();
import requests
response = requests.post(
'https://api.example.com/api/assessments',
headers={'Authorization': 'Bearer YOUR_TOKEN'},
json={
'name': 'Q1 2026 Risk Assessment',
'companyName': 'Acme Coffee Cooperative',
'companyType': 'Cooperative',
'country': 'Kenya',
'intakeMode': 'UPLOAD'
}
)
assessment = response.json()
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Q1 2026 Risk Assessment",
"companyName": "Acme Coffee Cooperative",
"companyType": "Cooperative",
"country": "Kenya",
"status": "DRAFT",
"intakeMode": "UPLOAD",
"progress": 0,
"version": 1,
"overallRiskScore": null,
"overallRiskLevel": null,
"userId": "auth0|123456789",
"createdAt": "2026-03-04T10:30:00.000Z",
"updatedAt": "2026-03-04T10:30:00.000Z"
}
Assessments
Create assessment
POST
/
api
/
assessments
curl -X POST https://api.example.com/api/assessments \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Q1 2026 Risk Assessment",
"companyName": "Acme Coffee Cooperative",
"companyType": "Cooperative",
"country": "Kenya",
"intakeMode": "UPLOAD"
}'
const response = await fetch('https://api.example.com/api/assessments', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Q1 2026 Risk Assessment',
companyName: 'Acme Coffee Cooperative',
companyType: 'Cooperative',
country: 'Kenya',
intakeMode: 'UPLOAD'
})
});
const assessment = await response.json();
import requests
response = requests.post(
'https://api.example.com/api/assessments',
headers={'Authorization': 'Bearer YOUR_TOKEN'},
json={
'name': 'Q1 2026 Risk Assessment',
'companyName': 'Acme Coffee Cooperative',
'companyType': 'Cooperative',
'country': 'Kenya',
'intakeMode': 'UPLOAD'
}
)
assessment = response.json()
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Q1 2026 Risk Assessment",
"companyName": "Acme Coffee Cooperative",
"companyType": "Cooperative",
"country": "Kenya",
"status": "DRAFT",
"intakeMode": "UPLOAD",
"progress": 0,
"version": 1,
"overallRiskScore": null,
"overallRiskLevel": null,
"userId": "auth0|123456789",
"createdAt": "2026-03-04T10:30:00.000Z",
"updatedAt": "2026-03-04T10:30:00.000Z"
}
Create a new risk assessment for a company.
Request body
string
required
Assessment name or identifier.Maximum length: 200 characters.
string
required
Name of the company being assessed.Maximum length: 200 characters.
string
Type or category of company (e.g., “Cooperative”, “Private Company”, “SME”).Maximum length: 100 characters.
string
Country where the company operates.Defaults to “Kenya” if not provided. Maximum length: 100 characters.
string
required
Method for collecting assessment data.Allowed values:
UPLOAD- Upload documents for automated analysisGUIDED_INTERVIEW- Step-by-step questionnaireMANUAL_ENTRY- Direct data entry
Response
string
Unique assessment identifier (UUID).
string
Assessment name.
string
Company name.
string
Company type.
string
Country of operation.
string
Current assessment status.Values:
DRAFT- Initial state, data collection in progressANALYZING- AI analysis in progressACTION_REQUIRED- Waiting for user input or gap resolutionCOMPLETE- Assessment and report complete
string
Data collection method used.
number
Completion percentage (0-100).
number
Version number for optimistic locking.
number
Aggregated risk score across all categories (0-100). Null until analysis is complete.
string
Overall risk classification. Null until analysis is complete.Values:
LOW, MODERATE, HIGH, CRITICALstring
ID of the user who created the assessment.
string
ISO 8601 timestamp of creation.
string
ISO 8601 timestamp of last update.
curl -X POST https://api.example.com/api/assessments \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Q1 2026 Risk Assessment",
"companyName": "Acme Coffee Cooperative",
"companyType": "Cooperative",
"country": "Kenya",
"intakeMode": "UPLOAD"
}'
const response = await fetch('https://api.example.com/api/assessments', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Q1 2026 Risk Assessment',
companyName: 'Acme Coffee Cooperative',
companyType: 'Cooperative',
country: 'Kenya',
intakeMode: 'UPLOAD'
})
});
const assessment = await response.json();
import requests
response = requests.post(
'https://api.example.com/api/assessments',
headers={'Authorization': 'Bearer YOUR_TOKEN'},
json={
'name': 'Q1 2026 Risk Assessment',
'companyName': 'Acme Coffee Cooperative',
'companyType': 'Cooperative',
'country': 'Kenya',
'intakeMode': 'UPLOAD'
}
)
assessment = response.json()
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Q1 2026 Risk Assessment",
"companyName": "Acme Coffee Cooperative",
"companyType": "Cooperative",
"country": "Kenya",
"status": "DRAFT",
"intakeMode": "UPLOAD",
"progress": 0,
"version": 1,
"overallRiskScore": null,
"overallRiskLevel": null,
"userId": "auth0|123456789",
"createdAt": "2026-03-04T10:30:00.000Z",
"updatedAt": "2026-03-04T10:30:00.000Z"
}
⌘I