Create organization risk
const url = 'https://api.varman.io/v1/risks';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"title":"Data breach vulnerability in user authentication system","description":"Weak password requirements could lead to unauthorized access to user accounts","category":"customer","department":"it","status":"open","likelihood":"very_unlikely","impact":"insignificant","residualLikelihood":"very_unlikely","residualImpact":"insignificant","treatmentStrategyDescription":"Implement multi-factor authentication and strengthen password requirements","treatmentStrategy":"accept","assigneeId":"mem_abc123def456"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.varman.io/v1/risks \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "title": "Data breach vulnerability in user authentication system", "description": "Weak password requirements could lead to unauthorized access to user accounts", "category": "customer", "department": "it", "status": "open", "likelihood": "very_unlikely", "impact": "insignificant", "residualLikelihood": "very_unlikely", "residualImpact": "insignificant", "treatmentStrategyDescription": "Implement multi-factor authentication and strengthen password requirements", "treatmentStrategy": "accept", "assigneeId": "mem_abc123def456" }'Create a risk record with ownership and context so compliance teams can track mitigation and remediation work.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Risk creation data
object
Risk title
Example
Data breach vulnerability in user authentication systemDetailed description of the risk
Example
Weak password requirements could lead to unauthorized access to user accountsRisk category
Example
technologyDepartment responsible for the risk. Built-in values: none, admin, gov, hr, it, itsm, qms. Custom department names are also accepted.
Example
itCurrent status of the risk
Example
openLikelihood of the risk occurring
Example
possibleImpact if the risk materializes
Example
majorResidual likelihood after treatment
Example
unlikelyResidual impact after treatment
Example
minorDescription of the treatment strategy
Example
Implement multi-factor authentication and strengthen password requirementsRisk treatment strategy
Example
mitigateID of the user assigned to this risk
Example
mem_abc123def456Responses
Section titled “Responses”Risk created successfully
object
Risk ID
Risk title
Risk description
ID of the user assigned to this risk
When the risk was created
When the risk was last updated
How the request was authenticated
User information (only for session auth)
object
Example
{ "id": "rsk_abc123def456", "title": "Data breach vulnerability in user authentication system", "description": "Weak password requirements could lead to unauthorized access to user accounts", "category": "customer", "department": "none", "status": "open", "likelihood": "very_unlikely", "impact": "insignificant", "residualLikelihood": "very_unlikely", "residualImpact": "insignificant", "treatmentStrategyDescription": "Implement multi-factor authentication and strengthen password requirements", "treatmentStrategy": "accept", "organizationId": "org_abc123def456", "assigneeId": "mem_abc123def456", "authType": "api-key", "authenticatedUser": { "id": "usr_def456ghi789", "email": "user@example.com" }}Bad request - Invalid input data
object
Example
{ "message": [ "title should not be empty", "description should not be empty", "category must be a valid enum value" ], "error": "Bad Request", "statusCode": 400}Unauthorized - Invalid authentication or insufficient permissions
object
Example
{ "message": "Invalid or expired API key"}Organization not found
object
Example
{ "message": "Organization with ID org_abc123def456 not found"}Internal server error
object
Example
{ "message": "Internal server error"}