curl --request PATCH \
--url https://api.trycomp.ai/v1/risks/{id} \
--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",
"department": "it",
"status": "open",
"likelihood": "possible",
"impact": "major",
"residualLikelihood": "unlikely",
"residualImpact": "minor",
"treatmentStrategyDescription": "Implement multi-factor authentication and strengthen password requirements",
"treatmentStrategy": "mitigate",
"assigneeId": "mem_abc123def456"
}
'const options = {
method: 'PATCH',
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',
department: 'it',
status: 'open',
likelihood: 'possible',
impact: 'major',
residualLikelihood: 'unlikely',
residualImpact: 'minor',
treatmentStrategyDescription: 'Implement multi-factor authentication and strengthen password requirements',
treatmentStrategy: 'mitigate',
assigneeId: 'mem_abc123def456'
})
};
fetch('https://api.trycomp.ai/v1/risks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/risks/{id}"
payload = {
"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",
"assigneeId": "mem_abc123def456"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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",
"category must be a valid enum value",
"status must be a valid enum value"
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "Invalid or expired API key"
}{
"message": "Risk with ID rsk_abc123def456 not found in organization org_abc123def456"
}{
"message": "Internal server error"
}Update organization risk | Comp AI API
Update a risk record as mitigation work progresses so compliance reports reflect the current risk posture.
curl --request PATCH \
--url https://api.trycomp.ai/v1/risks/{id} \
--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",
"department": "it",
"status": "open",
"likelihood": "possible",
"impact": "major",
"residualLikelihood": "unlikely",
"residualImpact": "minor",
"treatmentStrategyDescription": "Implement multi-factor authentication and strengthen password requirements",
"treatmentStrategy": "mitigate",
"assigneeId": "mem_abc123def456"
}
'const options = {
method: 'PATCH',
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',
department: 'it',
status: 'open',
likelihood: 'possible',
impact: 'major',
residualLikelihood: 'unlikely',
residualImpact: 'minor',
treatmentStrategyDescription: 'Implement multi-factor authentication and strengthen password requirements',
treatmentStrategy: 'mitigate',
assigneeId: 'mem_abc123def456'
})
};
fetch('https://api.trycomp.ai/v1/risks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/risks/{id}"
payload = {
"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",
"assigneeId": "mem_abc123def456"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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",
"category must be a valid enum value",
"status must be a valid enum value"
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "Invalid or expired API key"
}{
"message": "Risk with ID rsk_abc123def456 not found in organization org_abc123def456"
}{
"message": "Internal server error"
}Authorizations
API key for authentication
Path Parameters
Risk ID
"rsk_abc123def456"
Body
Risk update 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"
Department responsible for the risk. Built-in values: none, admin, gov, hr, it, itsm, qms. Custom department names are also accepted.
64"it"
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"
Description of the treatment strategy
"Implement multi-factor authentication and strengthen password requirements"
Risk treatment strategy
accept, avoid, mitigate, transfer "mitigate"
ID of the user assigned to this risk
"mem_abc123def456"
Response
Risk updated 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?

