curl --request POST \
--url https://api.trycomp.ai/v1/risks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "Data breach vulnerability in user authentication system",
"description": "Weak password requirements could lead to unauthorized access to user accounts",
"category": "technology",
"status": "open",
"likelihood": "possible",
"impact": "major",
"residualLikelihood": "unlikely",
"residualImpact": "minor",
"treatmentStrategy": "mitigate"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Data breach vulnerability in user authentication system',
description: 'Weak password requirements could lead to unauthorized access to user accounts',
category: 'technology',
status: 'open',
likelihood: 'possible',
impact: 'major',
residualLikelihood: 'unlikely',
residualImpact: 'minor',
treatmentStrategy: 'mitigate'
})
};
fetch('https://api.trycomp.ai/v1/risks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/risks"
payload = {
"title": "Data breach vulnerability in user authentication system",
"description": "Weak password requirements could lead to unauthorized access to user accounts",
"category": "technology",
"status": "open",
"likelihood": "possible",
"impact": "major",
"residualLikelihood": "unlikely",
"residualImpact": "minor",
"treatmentStrategy": "mitigate"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "rsk_abc123def456",
"title": "Data breach vulnerability in user authentication system",
"description": "Weak password requirements could lead to unauthorized access to user accounts",
"category": "technology",
"department": "it",
"status": "open",
"likelihood": "possible",
"impact": "major",
"residualLikelihood": "unlikely",
"residualImpact": "minor",
"treatmentStrategyDescription": "Implement multi-factor authentication and strengthen password requirements",
"treatmentStrategy": "mitigate",
"organizationId": "org_abc123def456",
"assigneeId": "mem_abc123def456",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"authType": "api-key",
"authenticatedUser": {
"id": "usr_def456ghi789",
"email": "user@example.com"
}
}{
"message": [
"title should not be empty",
"description should not be empty",
"category must be a valid enum value"
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "Invalid or expired API key"
}{
"message": "Organization with ID org_abc123def456 not found"
}{
"message": "Internal server error"
}Create organization risk | Comp AI API
Create a risk record with ownership and context so compliance teams can track mitigation and remediation work.
curl --request POST \
--url https://api.trycomp.ai/v1/risks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "Data breach vulnerability in user authentication system",
"description": "Weak password requirements could lead to unauthorized access to user accounts",
"category": "technology",
"status": "open",
"likelihood": "possible",
"impact": "major",
"residualLikelihood": "unlikely",
"residualImpact": "minor",
"treatmentStrategy": "mitigate"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Data breach vulnerability in user authentication system',
description: 'Weak password requirements could lead to unauthorized access to user accounts',
category: 'technology',
status: 'open',
likelihood: 'possible',
impact: 'major',
residualLikelihood: 'unlikely',
residualImpact: 'minor',
treatmentStrategy: 'mitigate'
})
};
fetch('https://api.trycomp.ai/v1/risks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/risks"
payload = {
"title": "Data breach vulnerability in user authentication system",
"description": "Weak password requirements could lead to unauthorized access to user accounts",
"category": "technology",
"status": "open",
"likelihood": "possible",
"impact": "major",
"residualLikelihood": "unlikely",
"residualImpact": "minor",
"treatmentStrategy": "mitigate"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "rsk_abc123def456",
"title": "Data breach vulnerability in user authentication system",
"description": "Weak password requirements could lead to unauthorized access to user accounts",
"category": "technology",
"department": "it",
"status": "open",
"likelihood": "possible",
"impact": "major",
"residualLikelihood": "unlikely",
"residualImpact": "minor",
"treatmentStrategyDescription": "Implement multi-factor authentication and strengthen password requirements",
"treatmentStrategy": "mitigate",
"organizationId": "org_abc123def456",
"assigneeId": "mem_abc123def456",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"authType": "api-key",
"authenticatedUser": {
"id": "usr_def456ghi789",
"email": "user@example.com"
}
}{
"message": [
"title should not be empty",
"description should not be empty",
"category must be a valid enum value"
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "Invalid or expired API key"
}{
"message": "Organization with ID org_abc123def456 not found"
}{
"message": "Internal server error"
}Authorizations
API key for authentication
Body
Risk creation data
Risk title
"Data breach vulnerability in user authentication system"
Detailed description of the risk
"Weak password requirements could lead to unauthorized access to user accounts"
Risk category
customer, fraud, governance, operations, other, people, regulatory, reporting, resilience, technology, vendor_management "technology"
Current status of the risk
open, pending, closed, archived "open"
Likelihood of the risk occurring
very_unlikely, unlikely, possible, likely, very_likely "possible"
Impact if the risk materializes
insignificant, minor, moderate, major, severe "major"
Residual likelihood after treatment
very_unlikely, unlikely, possible, likely, very_likely "unlikely"
Residual impact after treatment
insignificant, minor, moderate, major, severe "minor"
Risk treatment strategy
accept, avoid, mitigate, transfer "mitigate"
Department responsible for the risk. Built-in values: none, admin, gov, hr, it, itsm, qms. Custom department names are also accepted.
64"it"
Description of the treatment strategy
"Implement multi-factor authentication and strengthen password requirements"
ID of the user assigned to this risk
"mem_abc123def456"
Response
Risk created successfully
Risk ID
"rsk_abc123def456"
Risk title
"Data breach vulnerability in user authentication system"
Risk description
"Weak password requirements could lead to unauthorized access to user accounts"
customer, governance, operations, other, people, regulatory, reporting, resilience, technology, vendor_management "technology"
none, admin, gov, hr, it, itsm, qms "it"
open, pending, closed, archived "open"
very_unlikely, unlikely, possible, likely, very_likely "possible"
insignificant, minor, moderate, major, severe "major"
very_unlikely, unlikely, possible, likely, very_likely "unlikely"
insignificant, minor, moderate, major, severe "minor"
"Implement multi-factor authentication and strengthen password requirements"
accept, avoid, mitigate, transfer "mitigate"
"org_abc123def456"
ID of the user assigned to this risk
"mem_abc123def456"
When the risk was created
When the risk was last updated
How the request was authenticated
api-key, session User information (only for session auth)
Show child attributes
Show child attributes
Was this page helpful?

