Overview
PUT/gamification/subjects/{subjectType}/{subjectId}/preferencegamification

Set a subject’s opt-out (self for a user, or admin)

Replace a record in preference by subjectType, subjectId.

Auth: bearerAuth — calls run as the authenticated user.

Parameters
  • subjectTypepathstring
  • subjectIdpathstring
Request body

application/json · optional

  • optedOutboolean
Example
{
  "optedOut": true
}
Responses
200

Updated preference

  • subjectTypestring
  • subjectIdstring
  • optedOutboolean
Example
{
  "subjectType": "string",
  "subjectId": "string",
  "optedOut": true
}
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/subjects/{subjectType}/{subjectId}/preference" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "optedOut": true
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/gamification/subjects/{subjectType}/{subjectId}/preference", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"optedOut\": true\n}",
});
const data = await res.json();