> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

> **Deprecated.** This method is deprecated. Replacement: https://dev.wix.com/docs/api-reference/crm/members-contacts/members/activity/badges-v4/get-badge.md Planned removal date: 2026-04-18.

# GetBadge

# Package: activity

# Namespace: BadgesServiceV3

# Method link: https://dev.wix.com/docs/api-reference/crm/members-contacts/members/activity/badges/get-badge?apiView=SDK.md

## Permission Scopes:
Read Badges: SCOPE.DC-MEMBERS.READ-BADGES

## Introduction

Retrieves a badge.

---

## REST API

### Schema

```
 Method: getBadge
 Description: Retrieves a badge.
 URL: https://www.wixapis.com/members/v3/badges/{id}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  id
 Method parameters: 
   param name: id | type:   none | required: true 
 Return type: GetBadgeResponse
  - name: badge | type: Badge | description: Badge.  
     - name: id | type: string | description: Badge GUID.  | read-only: true | validation: format GUID
     - name: title | type: string | description: Text displayed on the badge.  
     - name: description | type: string | description: Badge description.  
     - name: backgroundColor | type: string | description: Badge background color in hexadecimal RGB format. <br/><br/> Uppercase letters only.<br/> Example: `#FFFFFF`.  | validation: format COLOR_HEX
     - name: textColor | type: string | description: Badge text color in hexadecimal RGB format. <br/><br/> Uppercase letters only.<br/> Example: `#C81B53`.  | validation: format COLOR_HEX
     - name: icon | type: string | description: URL of the badge icon image. <br/><br/>  It is recommended to use an `SVG` image format as it's resolution independent and looks good at any scale.  
     - name: permissionsEnabled | type: boolean | description: Whether the badge has special permissions to access specific members-only pages. <br/><br/> When `true`, members with the badge receive special permissions, and Wix users can [manage badge permissions in the dashboard](https://support.wix.com/en/article/site-members-creating-and-managing-member-badges?tabs=Dashboard-2#managing-member-badges). When `false`, members with the badge receive no special permissions.  
     - name: slug | type: string | description: Slugified name. Used to represent the badge in a URL.  | read-only: true 
     - name: createdDate | type: string | description: Date the badge was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date the badge was updated.  | read-only: true | validation: format date-time


```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.members.badges.getBadge(_id)
 Description: Retrieves a badge.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  _id
 Method parameters: 
   param name: _id | type: string | description: Badge GUID. | required: true | validation: format GUID
 Return type: PROMISE<Badge>
  - name: _id | type: string | description: Badge GUID.  | read-only: true | validation: format GUID
  - name: title | type: string | description: Text displayed on the badge.  
  - name: description | type: string | description: Badge description.  
  - name: backgroundColor | type: string | description: Badge background color in hexadecimal RGB format. <br/><br/> Uppercase letters only.<br/> Example: `#FFFFFF`.  | validation: format COLOR_HEX
  - name: textColor | type: string | description: Badge text color in hexadecimal RGB format. <br/><br/> Uppercase letters only.<br/> Example: `#C81B53`.  | validation: format COLOR_HEX
  - name: icon | type: string | description: URL of the badge icon image. <br/><br/>  It is recommended to use an `SVG` image format as it's resolution independent and looks good at any scale.  
  - name: permissionsEnabled | type: boolean | description: Whether the badge has special permissions to access specific members-only pages. <br/><br/> When `true`, members with the badge receive special permissions, and Wix users can [manage badge permissions in the dashboard](https://support.wix.com/en/article/site-members-creating-and-managing-member-badges?tabs=Dashboard-2#managing-member-badges). When `false`, members with the badge receive no special permissions.  
  - name: slug | type: string | description: Slugified name. Used to represent the badge in a URL.  | read-only: true 
  - name: _createdDate | type: Date | description: Date the badge was created.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date the badge was updated.  | read-only: true 


```

### Examples

### Get badge details
```javascript
import { badges } from '@wix/members';

/* Sample _id value: '50dca3d3-f142-44ca-87e9-d9302e1d4dd5' */

export async function myGetBadgeFunction(_id) {
  try {
    const badge = await badges.getBadge(_id);

    console.log('Retrieved badge: ', badge);
    return badge;
  } catch (error) {
    console.error(error);
    // Handle the error
  }
}

/* Promise resolves to: 
 * {
 *  "_createdDate": "2024-01-18T10:27:14.878Z",
 *  "_id": "215be5d9-4b32-4861-9eb5-2152930dd0b4",
 *  "_updatedDate": "2024-01-18T10:27:14.878Z",
 *  "backgroundColor": "#13785C",
 *  "description": "Most comments on site.",
 *  "icon": "https://static.wixstatic.com/shapes/11062b_73d6472a03884c758f9d39f83a1218c2.svg",
 *  "permissionsEnabled": false,
 *  "slug": "top-commenter",
 *  "textColor": "#FFFFFF",
 *  "title": "Top commenter"
 * }
 */
```

### getBadge (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { badges } from '@wix/members';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { badges },
  // Include the auth strategy and host as relevant
});


async function getBadge(_id) {
  const response = await myWixClient.badges.getBadge(_id);
};
```

---