curl --request POST \
--url https://api.trycomp.ai/v1/vendors \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "CloudTech Solutions Inc.",
"description": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers.",
"category": "cloud",
"status": "not_assessed",
"inherentProbability": "possible",
"inherentImpact": "moderate",
"residualProbability": "unlikely",
"residualImpact": "minor"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'CloudTech Solutions Inc.',
description: 'Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers.',
category: 'cloud',
status: 'not_assessed',
inherentProbability: 'possible',
inherentImpact: 'moderate',
residualProbability: 'unlikely',
residualImpact: 'minor'
})
};
fetch('https://api.trycomp.ai/v1/vendors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/vendors"
payload = {
"name": "CloudTech Solutions Inc.",
"description": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers.",
"category": "cloud",
"status": "not_assessed",
"inherentProbability": "possible",
"inherentImpact": "moderate",
"residualProbability": "unlikely",
"residualImpact": "minor"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "vnd_abc123def456",
"name": "CloudTech Solutions Inc.",
"description": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers.",
"category": "cloud",
"status": "not_assessed",
"inherentProbability": "possible",
"inherentImpact": "moderate",
"residualProbability": "unlikely",
"residualImpact": "minor",
"website": "https://www.cloudtechsolutions.com",
"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": [
"name should not be empty",
"description should not be empty",
"category must be a valid enum value",
"website must be a URL address"
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "Invalid or expired API key"
}{
"message": "Organization with ID org_abc123def456 not found"
}{
"message": "Internal server error"
}Create vendor | Comp AI API
Create a vendor record so teams can track third-party risk, assessment evidence, owner, category, and compliance status.
curl --request POST \
--url https://api.trycomp.ai/v1/vendors \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "CloudTech Solutions Inc.",
"description": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers.",
"category": "cloud",
"status": "not_assessed",
"inherentProbability": "possible",
"inherentImpact": "moderate",
"residualProbability": "unlikely",
"residualImpact": "minor"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'CloudTech Solutions Inc.',
description: 'Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers.',
category: 'cloud',
status: 'not_assessed',
inherentProbability: 'possible',
inherentImpact: 'moderate',
residualProbability: 'unlikely',
residualImpact: 'minor'
})
};
fetch('https://api.trycomp.ai/v1/vendors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/vendors"
payload = {
"name": "CloudTech Solutions Inc.",
"description": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers.",
"category": "cloud",
"status": "not_assessed",
"inherentProbability": "possible",
"inherentImpact": "moderate",
"residualProbability": "unlikely",
"residualImpact": "minor"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "vnd_abc123def456",
"name": "CloudTech Solutions Inc.",
"description": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers.",
"category": "cloud",
"status": "not_assessed",
"inherentProbability": "possible",
"inherentImpact": "moderate",
"residualProbability": "unlikely",
"residualImpact": "minor",
"website": "https://www.cloudtechsolutions.com",
"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": [
"name should not be empty",
"description should not be empty",
"category must be a valid enum value",
"website must be a URL address"
],
"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
Vendor creation data
Vendor name
"CloudTech Solutions Inc."
Detailed description of the vendor and services provided
"Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers."
Vendor category
cloud, infrastructure, software_as_a_service, finance, marketing, sales, hr, other "cloud"
Assessment status of the vendor
not_assessed, in_progress, assessed "not_assessed"
Inherent probability of risk before controls
very_unlikely, unlikely, possible, likely, very_likely "possible"
Inherent impact of risk before controls
insignificant, minor, moderate, major, severe "moderate"
Residual probability after controls are applied
very_unlikely, unlikely, possible, likely, very_likely "unlikely"
Residual impact after controls are applied
insignificant, minor, moderate, major, severe "minor"
Vendor website URL
"https://www.cloudtechsolutions.com"
Whether the vendor is a sub-processor
ID of the user assigned to manage this vendor
"mem_abc123def456"
Response
Vendor created successfully
Vendor ID
"vnd_abc123def456"
Vendor name
"CloudTech Solutions Inc."
Vendor description
"Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers."
cloud, infrastructure, software_as_a_service, finance, marketing, sales, hr, other "cloud"
not_assessed, in_progress, assessed "not_assessed"
very_unlikely, unlikely, possible, likely, very_likely "possible"
insignificant, minor, moderate, major, severe "moderate"
very_unlikely, unlikely, possible, likely, very_likely "unlikely"
insignificant, minor, moderate, major, severe "minor"
"https://www.cloudtechsolutions.com"
"org_abc123def456"
ID of the user assigned to manage this vendor
"mem_abc123def456"
When the vendor was created
When the vendor 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?

