Upload or replace a custom framework's Trust Portal badge image
POST
/v1/trust-portal/custom-frameworks/badge
const url = 'https://api.varman.io/v1/trust-portal/custom-frameworks/badge';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"customFrameworkId":"cfrm_6914cd0e16e4c7dccbb54426","fileName":"acme-framework-badge.png","fileType":"image/png","fileData":"example"}'};
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/trust-portal/custom-frameworks/badge \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "customFrameworkId": "cfrm_6914cd0e16e4c7dccbb54426", "fileName": "acme-framework-badge.png", "fileType": "image/png", "fileData": "example" }'Stores a PNG/JPEG/WebP badge (max 256KB) in the organization assets bucket. Does not change the framework’s portal visibility.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
customFrameworkId
required
Org-authored custom framework ID the badge belongs to
string
Example
cfrm_6914cd0e16e4c7dccbb54426fileName
required
Original file name (PNG, JPEG, or WebP)
string
Example
acme-framework-badge.pngfileType
required
MIME type of the image
string
Example
image/pngfileData
required
Base64 encoded image content (PNG/JPEG/WebP, max 256KB decoded)
string
Responses
Section titled “Responses”Badge uploaded successfully
Media typeapplication/json
object
success
required
boolean
badgeUrl
required
Signed URL to the uploaded badge for immediate display
string
Example generated
{ "success": true, "badgeUrl": "example"}