Overview
POST/gamification/realms/{ecosystemId}/event-typesgamification

Register a realm custom event type (owner or admin) — 409 on a duplicate name

Create a record in event-types.

Auth: bearerAuth — calls run as the authenticated user.

Parameters
  • ecosystemIdpathstring
Request body

application/json · optional

  • namestring

    Custom event type key (≤64 chars); unique per realm

  • statKeystring

    The stat this event bumps (≤64 chars)

Example
{
  "name": "string",
  "statKey": "string"
}
Responses
201

The created event type

  • idstring
  • ecosystemIdstring
  • namestring

    The custom event_type key

  • statKeystring

    The gamification stat this event bumps

  • createdAtoptionalstring
  • updatedAtoptionalstring
Example
{
  "id": "string",
  "ecosystemId": "string",
  "name": "string",
  "statKey": "string",
  "createdAt": "string",
  "updatedAt": "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"
  }
}
409

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/gamification/realms/{ecosystemId}/event-types" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "statKey": "string"
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/gamification/realms/{ecosystemId}/event-types", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"name\": \"string\",\n  \"statKey\": \"string\"\n}",
});
const data = await res.json();