Create Badge
Create a new badge.
- If automation is enabled, then the badge will be assigned to the users automatically.
- Automation may take time to reflect.
There are two types of badges automation -
- Automation by points threshold - When user reaches this points threshold, the badge will be assigned to the user automatically, if points fall below the threshold then it will be removed from the user.
- Automation by mango subscription - When user subscribes to any of these mangoes, then the badge will be assigned to the user automatically. If subscription expired or removed then it will be removed from the user.
Note Only one of the automation type can be enabled at a time.
Authorization
bearer In: header
Header Parameters
Host name of the dashboard, ex: mydomain.tagmango.com
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://api-prod-new.tagmango.com/api/v1/external/gamification/badges" \ -H "x-whitelabel-host: string" \ -H "Content-Type: application/json" \ -d '{ "name": "Hall Of Fame" }'{
"_id": "6659ca9e5f2acb7abfdcd8fd",
"creator": "6149b1e5612c4e5fd96041d3",
"name": "Hall Of Fame",
"description": "Something about the badge",
"imageUrl": "https://testing.tagmango.com/assets/badge-icon-922e7f499bc0045d7af8ac771eebe2fe.png",
"enableAutomation": true,
"pointsThreshold": 100,
"pointCategoryForAutomation": "lifetime",
"automationEnabledMangoes": [
"6659ca9e5f2acb7abfdcd8fd",
"6659ca9e5f2acb7abfdcd8fd"
],
"createdAt": "2024-05-31T13:03:26.375Z",
"updatedAt": "2024-07-19T12:32:51.071Z"
}{
"code": 400,
"type": "Bad request",
"statusMessage": "BAD_REQUEST",
"message": "Invalid request",
"success": false
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"success": false
}Get Badges GET
Get all created badges for creator
Update Badge PATCH
Update badge by using identifier. - If automation is enabled, then the badge will be assigned to the users automatically. - Automation may take time to reflect. There are two types of badges automation - 1. Automation by points threshold - When user reaches this points threshold, the badge will be assigned to the user automatically, if points fall below the threshold then it will be removed from the user. 2. Automation by mango subscription - When user subscribes to any of these mangoes, then the badge will be assigned to the user automatically. If subscription expired or removed then it will be removed from the user. **Note** Only one of the automation type can be enabled at a time.