Karma Types

Each karma award is tagged with a KarmaTypePositive or KarmaTypeNegative enum value so OApps can track domain-specific reputation separately from the total.

TypeDirectionDescription
JoinedOASISPositiveAwarded once on first login
JoinedOAPPPositiveFirst time an avatar joins an OApp
PlayedGamePositiveAwarded per game session by the OApp
CompletedQuestPositiveAwarded when a quest is completed
CompletedMissionPositiveAwarded when a mission is completed
GiftedKarmaPositiveKarma gifted from one avatar to another
SpreadingLovePositiveSocial positive actions
HelpingPeoplePositiveCooperative in-game behaviour
CreatedOAPPPositiveOApp developer reward
NegativeKarmaActivityNegativeGeneric negative action
HackingNegativeDetected exploit or cheat
StealingNegativeUnauthorised asset transfer

Award Karma

POST/avatar/AddKarmaToAvatar

Awards karma to an avatar. Requires a valid JWT. OApps should call this on significant positive player actions.

Request body

FieldTypeDescription
avatarIdrequiredguidTarget avatar ID
karmaTyperequiredstringKarmaTypePositive enum value
karmaSourceTyperequiredstringWhich OApp or system is awarding (e.g. OAPP, Quest)
karamSourceTitlestringHuman-readable label for the award event
karmaSourceDescstringExtended description shown in karma history
javascript
await oasis.karma.addKarmaToAvatar({
  avatarId:        avatar.id,
  karmaType:       'CompletedQuest',
  karmaSourceType: 'Quest',
  karamSourceTitle: 'The Lost Cavern',
  karmaSourceDesc:  'Completed the introductory quest chain'
});

Remove Karma

POST/avatar/RemoveKarmaFromAvatar

Deducts karma. Same body shape as Award but uses KarmaTypeNegative enum values for karmaType.

Get Karma for Avatar

GET/avatar/{id}/karma

Returns the full karma history and total for the given avatar ID.

Response result

FieldTypeDescription
karmaTotalnumberSummed karma across all sources
karmaAkashicRecordsarrayFull karma event history, newest first

Leaderboard

GET/avatar/GetAvatarsWithKarmaLessThan/{karmaAmount}
GET/avatar/GetAvatarsWithKarmaGreaterThan/{karmaAmount}

Filter avatars by karma threshold — useful for building leaderboards or gating OApp features behind reputation levels.

💡
Karma in your OApp

Award karma on game events that matter — quest completions, cooperation, creative contributions. Avoid awarding for trivial actions or players will game it. See Karma System concepts for design guidance.