Overview
POST/gamification/awardgamification

Award points to a subject (admin) — grants any newly-earned badges

Create a record in award.

Auth: bearerAuth — calls run as the authenticated user.

Request body

application/json · optional

  • subjectTypestring
  • subjectIdstring
  • amountinteger
  • reasonstring
  • sourceTypeoptionalstring
  • sourceIdoptionalstring
Example
{
  "subjectType": "string",
  "subjectId": "string",
  "amount": 0,
  "reason": "string",
  "sourceType": "string",
  "sourceId": "string"
}
Responses
201

Award result

  • awardedboolean

    false when the subject has opted out

  • totalinteger

    The subject’s new point total

  • newBadgesGamificationBadge[]
Example
{
  "awarded": true,
  "total": 0,
  "newBadges": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "icon": "string",
      "criteriaType": "string",
      "criteriaThreshold": 0,
      "pointValue": 0,
      "subjectType": "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"
  }
}
Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/gamification/award" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "subjectType": "string",
  "subjectId": "string",
  "amount": 0,
  "reason": "string",
  "sourceType": "string",
  "sourceId": "string"
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/gamification/award", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"subjectType\": \"string\",\n  \"subjectId\": \"string\",\n  \"amount\": 0,\n  \"reason\": \"string\",\n  \"sourceType\": \"string\",\n  \"sourceId\": \"string\"\n}",
});
const data = await res.json();