Gamification
Assign Badges To User
Assign badges to a user.
- This endpoint can be used to assign badges to a user.
- It doesn't support revoking badges.
Authorization
bearer AuthorizationBearer <token>
In: header
Path Parameters
userId*string
Unique identifier of the subscriber
Header Parameters
x-whitelabel-host*string
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
application/json
application/json
curl -X PATCH "https://api-prod-new.tagmango.com/api/v1/external/gamification/badges/646dd0eb159d8b7a7f5a9c29/assign" \ -H "x-whitelabel-host: string" \ -H "Content-Type: application/json" \ -d '{ "badges": [ "6657092c8142bfe0656481bf", "6659cac25f2acb7abfdcdb20", "66617711715449eae2f4e096" ] }'{
"message": "Operation completed successfully",
"success": true
}{
"code": 400,
"type": "Bad Request",
"statusMessage": "BAD_REQUEST",
"success": false,
"message": "Invalid request",
"result": "Invalid request"
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"result": "Invalid token",
"success": false
}{
"code": 403,
"type": "Forbidden",
"statusMessage": "FORBIDDEN",
"errorCode": "WORKSHOP_MANGO_FORBIDDEN",
"message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"success": false
}{
"code": 429,
"type": "Too Many Requests",
"statusMessage": "TOO_MANY_REQUESTS",
"message": "Request limit exceeded. try after 10 seconds",
"result": "Request limit exceeded. try after 10 seconds",
"success": false
}