Overview
PUT
/gamification/realms/{ecosystemId}/configgamificationUpdate a realm’s gamification config (admin, partial) — enabling it (false → true) triggers a retroactive replay
Replace a record in config by ecosystemId.
Auth: bearerAuth — calls run as the authenticated user.
Parameters
- ecosystemIdpathstring
Request body
application/json · optional
- enabledoptionalboolean
- skinoptional"rpg" | "plain"
- surfacesoptionalobject
- seasonsoptionalGamificationSeasons
null clears seasons; an object sets the window (anchor + lengthDays 1..366)
- timezoneoptionalstring
IANA zone for the realm's day/streak boundary
Example
{
"enabled": true,
"skin": "rpg",
"surfaces": {},
"seasons": {
"anchor": "string",
"lengthDays": 0
},
"timezone": "string"
}Responses
200
Updated config (with replay result when just enabled)
- configGamificationRealmConfig
- replayedoptionalGamificationReplayResult
Present only when enabling the realm triggered a retroactive replay
Example
{
"config": {
"ecosystemId": "string",
"enabled": true,
"skin": "rpg",
"surfaces": {},
"seasons": {
"anchor": "string",
"lengthDays": 0
},
"timezone": "string"
},
"replayed": {
"subjects": 0,
"badges": 0,
"xpGained": 0
}
}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"
}
}Code examples
cURL
curl -X PUT "https://api.agenticdeveloperhub.com/gamification/realms/{ecosystemId}/config" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"skin": "rpg",
"surfaces": {},
"seasons": {
"anchor": "string",
"lengthDays": 0
},
"timezone": "string"
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/gamification/realms/{ecosystemId}/config", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"enabled\": true,\n \"skin\": \"rpg\",\n \"surfaces\": {},\n \"seasons\": {\n \"anchor\": \"string\",\n \"lengthDays\": 0\n },\n \"timezone\": \"string\"\n}",
});
const data = await res.json();