Overview
The Badges feature in Snag Admin allows you to create and manage badges that users can earn by fulfilling specific condtions. These badges are displated on user profiles along with their progress towward unlocking them.
- Completing specific rules or set of rules
- Achieving a certain amount of loyalty points
- Unlocking another badge or set of badges
- Meeting any other custom conditions

Creating and Managing Badges
This recipe explains how to manage badges using the Snag API, including creating, updating and deleting badges but also assigning badges to users and revoking them.Fetching Badges
TheGET /api/loyalty/badges endpoint allows for fetching of loyalty badges created on your Snag account. This endpoint provides various filters to allow pagination. Badges are sorted by their creation date in descending order.
Example Request
Request- Note: for paginated requests be sure to add the
startingAfterproperty to subsequent requests.
Example Response
Creating a Badge
ThePOST /api/loyalty/badges endpoint allows for creating a new badge on your Snag account. This endpoint requires the following parameters:
organizationId: Your organization IDwebsiteId: Your website IDname: The name of the badgedescription: A description of the badgeimageUrl: The URL of the badge imagerules: An array of conditions that must be met to earn the badge
Updating a Badge
ThePOST /api/loyalty/badges/{id} endpoint allows for updating an existing badge on your Snag account.
The id parameter is required to identify the badge to update. We only allow updating the name, description, and imageUrl of the badge. The reason for this is to prevent any changes that could affect the badge’s conditions and user progress.
Deleting a Badge
TheDELETE /api/loyalty/badges/{id} endpoint allows for deleting an existing badge on your Snag account.
The id parameter is required to identify the badge to delete.
Rewarding User with a Badge
ThePOST /api/loyalty/badges/{id}/reward endpoint allows for rewarding a user with a badge on your Snag account.
The id parameter is required to identify the badge to reward, and either userId or walletAddress is required to identify the user to reward.
Revoking a Badge from a User
ThePOST /api/loyalty/badges/{id}/revoke endpoint allows to revoke a badge from a user on your Snag account.
The id parameter is required to identify the badge to revoke, and either userId or walletAddress is required to identify the user to revoke.
Assigning Badges via CSV
For manual badge assignment, upload a CSV file containing wallet addresses of users who should receive a specific badge. The uploaded file should follow this format:Important Notes
This system provides a flexible way to reward user engagement and encourage participation through achievements. The Badge feature is only available to websites with active loyalty programs. If you want to reward users who had already met the badge conditions before the badge was created, you must manually assign the badge using the Reward Badge API or upload a CSV file with their wallet addresses.Related pages
Loyalty Overview
Set up the loyalty program that powers badge conditions.
Leaderboards
Display user rankings alongside badge achievements.
Rewards Shop
Let users redeem points for NFTs, auctions, and more.
Quest Chaining
Chain rules together to create multi-step badge journeys.