---
title: "Upload or replace a custom framework's Trust Portal badge image"
method: POST
path: "/v1/trust-portal/custom-frameworks/badge"
tags: ["Trust Portal"]
---

# Upload or replace a custom framework's Trust Portal badge image

`POST /v1/trust-portal/custom-frameworks/badge`

Stores a PNG/JPEG/WebP badge (max 256KB) in the organization assets bucket. Does not change the framework's portal visibility.

## Request body

- UploadCustomFrameworkBadgeDto
  - `customFrameworkId` string, required — Org-authored custom framework ID the badge belongs to
  - `fileName` string, required — Original file name (PNG, JPEG, or WebP)
  - `fileType` string, required — MIME type of the image
  - `fileData` string, required — Base64 encoded image content (PNG/JPEG/WebP, max 256KB decoded)

## Response `201`

Badge uploaded successfully

- CustomFrameworkBadgeResponseDto
  - `success` boolean, required
  - `badgeUrl` string, required — Signed URL to the uploaded badge for immediate display

---

[API](https://skmtc.net/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.net/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/revisions/726b9523fb22/schema)
