TANITARDevelopers
WebhooksEvent catalogGamification

gamification.xp.granted

Version 1 of the gamification.xp.granted webhook event.

The gamification.xp.granted event.

Event typegamification.xp.granted
Schema version1
Routing keyevent.gamification.xp.granted.v1
Produced byGamification
Schemaurn:defendr:contract:gamification:xp-granted:1

data fields

FieldTypeRequiredDescription
accountIdstringyes
playerIdstringyes
amountintegeryes
totalXpintegeryes
levelintegeryes
previousLevelintegeryes
levelsGainedintegeryes
source"mission", "replay", "chest", "battle-pass"yes
grantedAtstring (date-time)yes

Some fields are required only in particular states. The JSON Schema below is authoritative.

Example delivery

Signed with the example secret whsec_placeholder_example_webhooks_signing_secret, so you can check your verifier against it. See Verifying signatures.

POST /your/webhook/endpoint HTTP/1.1
content-type: application/json
webhook-id: whd_00000000-0000-4000-8000-000000000020
webhook-timestamp: 1800000000
webhook-signature: v1,qza2M/mC/LZ7NhV0W9Ec03VEj5INZn7wtyAnFdWFBk0=
tanitar-event-type: gamification.xp.granted
tanitar-schema-version: 1
tanitar-delivery-attempt: 1

{"messageId":"evt_00000000-0000-4000-8000-000000000020","kind":"event","type":"gamification.xp.granted","schemaVersion":1,"occurredAt":"2027-01-15T10:00:00.000Z","producer":"gamification-service","accountId":"acc_11111111-1111-4111-8111-111111111111","correlationId":"corr_00000000-0000-4000-8000-000000000020","data":{"accountId":"acct_demo","playerId":"player_demo","amount":300,"totalXp":300,"level":2,"previousLevel":1,"levelsGained":1,"source":"mission","grantedAt":"2026-09-08T00:00:00.000Z"}}

The same body, formatted:

{
  "messageId": "evt_00000000-0000-4000-8000-000000000020",
  "kind": "event",
  "type": "gamification.xp.granted",
  "schemaVersion": 1,
  "occurredAt": "2027-01-15T10:00:00.000Z",
  "producer": "gamification-service",
  "accountId": "acc_11111111-1111-4111-8111-111111111111",
  "correlationId": "corr_00000000-0000-4000-8000-000000000020",
  "data": {
    "accountId": "acct_demo",
    "playerId": "player_demo",
    "amount": 300,
    "totalXp": 300,
    "level": 2,
    "previousLevel": 1,
    "levelsGained": 1,
    "source": "mission",
    "grantedAt": "2026-09-08T00:00:00.000Z"
  }
}

JSON Schema

urn:defendr:contract:gamification:xp-granted:1
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:defendr:contract:gamification:xp-granted:1",
  "title": "Gamification experience granted event payload",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "accountId",
    "playerId",
    "amount",
    "totalXp",
    "level",
    "previousLevel",
    "levelsGained",
    "source",
    "grantedAt"
  ],
  "properties": {
    "accountId": {
      "type": "string",
      "minLength": 1
    },
    "playerId": {
      "type": "string",
      "minLength": 1
    },
    "amount": {
      "type": "integer",
      "minimum": 1
    },
    "totalXp": {
      "type": "integer",
      "minimum": 0
    },
    "level": {
      "type": "integer",
      "minimum": 1
    },
    "previousLevel": {
      "type": "integer",
      "minimum": 1
    },
    "levelsGained": {
      "type": "integer",
      "minimum": 0
    },
    "source": {
      "enum": [
        "mission",
        "replay",
        "chest",
        "battle-pass"
      ]
    },
    "grantedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}

On this page