---
title: "PUT /components/v1/badge/{externalId}"
method: PUT
path: "/components/v1/badge/{externalId}"
tags: ["Badges"]
---

# PUT /components/v1/badge/{externalId}

`PUT /components/v1/badge/{externalId}`

Updates a badge.

## Request body

- union
  - EmblemBadgeUpdate — Update an emblem badge.
    - `name` string, required — Badge name.
    - `publisherBadgeId` string, required — Badge ID that you define.
    - `type` 'emblem', required — Badge type.
    - `badgeImageUrl` string, url — Badge image URL in PNG or JPEG format. For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL. External image URLs are saved and used as-is, and Appcharge doesn't download, copy, upload, or host them. Images must remain available at the provided URLs. We recommend uploading image files instead of using external URLs when possible.
  - RibbonBadgeUpdate — Update a ribbon badge.
    - `name` string, required — Badge name.
    - `publisherBadgeId` string, required — Badge ID that you define.
    - `type` 'ribbon', required — Badge type.
    - `imageUrl` string, url — Badge image URL in PNG or JPEG format. For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL. External image URLs are saved and used as-is, and Appcharge doesn't download, copy, upload, or host them. Images must remain available at the provided URLs. We recommend uploading image files instead of using external URLs when possible.
    - `text` string — Badge text.
    - `backgroundColor` object — Background color details.
      - `colorOne` string — Primary color for the background.
      - `colorTwo` string — Secondary color for the gradient background.
      - `gradientDirection` 'to top' | 'to bottom' | 'to left' | 'to right' | 'to top left' | 'to top right' | 'to bottom left' | 'to bottom right' — Direction of the gradient.
    - `textColor` object
      - `colorOne` string — Text color in hex format.

## Response `200`

Badge updated successfully.

- union
  - EmblemBadgeResponse
    - `id` string — Badge ID.
    - `name` string — Badge name.
    - `publisherBadgeId` string — Badge ID that you defined.
    - `type` 'emblem' — Badge type.
    - `badgeImageUrl` string, url — Badge image URL. For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL.
  - RibbonBadgeResponse
    - `id` string — Badge ID.
    - `name` string — Badge name.
    - `publisherBadgeId` string — Badge ID that you defined.
    - `type` 'ribbon' — Badge type.
    - `badgeImageUrl` string, url — Badge image URL. For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL.
    - `text` string — Badge text.
    - `backgroundColor` object — Background color details.
      - `colorOne` string — Primary color for the background.
      - `colorTwo` string — Secondary color for the gradient background.
      - `gradientDirection` 'to top' | 'to bottom' | 'to left' | 'to right' | 'to top left' | 'to top right' | 'to bottom left' | 'to bottom right' — Direction of the gradient.
    - `textColor` object
      - `colorOne` string — Text color in hex format.

## Other responses

- `400` — Bad request. Invalid input or validation failure.
- `404` — Badge not found.

---

[API](https://skmtc.net/appcharge/apis/grant-award.md) · [All operations](https://skmtc.net/appcharge/apis/grant-award/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/appcharge/grant-award/versions/b4f6759240d5/schema)
