Upload or replace a custom framework's Trust Portal badge image
curl --request POST \
--url https://api.trycomp.ai/v1/trust-portal/custom-frameworks/badge \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"customFrameworkId": "cfrm_6914cd0e16e4c7dccbb54426",
"fileName": "acme-framework-badge.png",
"fileType": "image/png",
"fileData": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customFrameworkId: 'cfrm_6914cd0e16e4c7dccbb54426',
fileName: 'acme-framework-badge.png',
fileType: 'image/png',
fileData: '<string>'
})
};
fetch('https://api.trycomp.ai/v1/trust-portal/custom-frameworks/badge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/trust-portal/custom-frameworks/badge"
payload = {
"customFrameworkId": "cfrm_6914cd0e16e4c7dccbb54426",
"fileName": "acme-framework-badge.png",
"fileType": "image/png",
"fileData": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"badgeUrl": "<string>"
}Trust Portal
Upload or replace a custom framework's Trust | Comp AI API
Stores a PNG/JPEG/WebP badge (max 256KB) in the organization assets bucket. Does not change the framework’s portal visibility.
POST
/
v1
/
trust-portal
/
custom-frameworks
/
badge
Upload or replace a custom framework's Trust Portal badge image
curl --request POST \
--url https://api.trycomp.ai/v1/trust-portal/custom-frameworks/badge \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"customFrameworkId": "cfrm_6914cd0e16e4c7dccbb54426",
"fileName": "acme-framework-badge.png",
"fileType": "image/png",
"fileData": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customFrameworkId: 'cfrm_6914cd0e16e4c7dccbb54426',
fileName: 'acme-framework-badge.png',
fileType: 'image/png',
fileData: '<string>'
})
};
fetch('https://api.trycomp.ai/v1/trust-portal/custom-frameworks/badge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/trust-portal/custom-frameworks/badge"
payload = {
"customFrameworkId": "cfrm_6914cd0e16e4c7dccbb54426",
"fileName": "acme-framework-badge.png",
"fileType": "image/png",
"fileData": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"badgeUrl": "<string>"
}Authorizations
API key for authentication
Body
application/json
Org-authored custom framework ID the badge belongs to
Example:
"cfrm_6914cd0e16e4c7dccbb54426"
Original file name (PNG, JPEG, or WebP)
Example:
"acme-framework-badge.png"
MIME type of the image
Example:
"image/png"
Base64 encoded image content (PNG/JPEG/WebP, max 256KB decoded)
Was this page helpful?

