Overview
PUT
/gamification/realms/{ecosystemId}/badges/{id}gamificationUpdate a realm-owned badge (admin) — 404 for a platform default
Replace a record in badges by ecosystemId, id.
Auth: bearerAuth — calls run as the authenticated user.
Parameters
- ecosystemIdpathstring
- idpathstring
Request body
application/json · optional
- namestring
- descriptionstring
- iconstring
- statKeystring
- comparatoroptional">=" | ">" | "="
- thresholdinteger
- badgeLinestring
- tier"none" | "bronze" | "silver" | …
- pointValueinteger
- hiddenoptionalboolean
Example
{
"name": "string",
"description": "string",
"icon": "string",
"statKey": "string",
"comparator": ">=",
"threshold": 0,
"badgeLine": "string",
"tier": "none",
"pointValue": 0,
"hidden": false
}Responses
200
The updated realm badge row
- idstring
- namestring
- descriptionstring
- iconstring
- statKeyoptionalstring?
The stat the rule watches
- comparatoroptional">=" | ">" | "="
- thresholdoptionalinteger?
- badgeLineoptionalstring?
Groups the tiers of one line
- tieroptional"none" | "bronze" | "silver" | …
- pointValueinteger
XP granted when earned
- hiddenoptionalboolean
- activeoptionalboolean
- subjectTypeoptionalstring?
- ecosystemIdoptionalstring?
NULL = platform default; else the realm
Example
{
"id": "string",
"name": "string",
"description": "string",
"icon": "string",
"statKey": "string",
"comparator": ">=",
"threshold": 0,
"badgeLine": "string",
"tier": "none",
"pointValue": 0,
"hidden": true,
"active": true,
"subjectType": "string",
"ecosystemId": "string"
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}403
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}404
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X PUT "https://api.agenticdeveloperhub.com/gamification/realms/{ecosystemId}/badges/{id}" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"icon": "string",
"statKey": "string",
"comparator": ">=",
"threshold": 0,
"badgeLine": "string",
"tier": "none",
"pointValue": 0,
"hidden": false
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/gamification/realms/{ecosystemId}/badges/{id}", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"name\": \"string\",\n \"description\": \"string\",\n \"icon\": \"string\",\n \"statKey\": \"string\",\n \"comparator\": \">=\",\n \"threshold\": 0,\n \"badgeLine\": \"string\",\n \"tier\": \"none\",\n \"pointValue\": 0,\n \"hidden\": false\n}",
});
const data = await res.json();