Teams #
The Teams API reference for Unity provides a complete catalog of functions for implementing collaborative team features. All documented functions share common authentication patterns, operate within team-scoped contexts, and maintain consistent parameter structures for managing team resources, competitive events, and shared progression systems. Learn more in the Teams concept guide.
Teams API #
The core Teams API is used to create teams, manage membership, handle join requests, and send chat messages.
Core Function Reference #
Function | Description |
---|---|
TeamsSystem | Initializes the teams system |
RefreshAsync | Refreshes the teams system with latest data from server |
CreateTeamAsync | Creates a new team |
ListTeamsAsync | Lists available teams by location |
SearchTeamsAsync | Searches for teams by name/shortcode |
JoinTeamAsync | Joins a team (by ID or Team object) |
GetTeamMembersAsync | Gets members of specified team |
ApproveJoinRequestAsync | Approves a single join request |
ApproveJoinRequestsAsync | Approves multiple join requests |
RejectJoinRequestAsync | Rejects a single join request |
RejectJoinRequestsAsync | Rejects multiple join requests |
PromoteUsersAsync | Promotes team members to admin |
LeaveTeamAsync | Leaves a team (by ID or Team object) |
DeleteTeamAsync | Deletes a team |
SendChatMessageAsync | Sends a chat message to team |
CancellationToken
which may be used to cancel the request.Initialization #
The teams system relies on the Nakama System and an ILogger
, both must be passed in as dependencies via the constructor.
|
|
Subscribe to changes #
You can listen for changes in the teams system so that you can respond appropriately, such as updating the UI, by implementing the IObserver
pattern, or use the SystemObserver<T>
type which handles it for you.
|
|
Refresh the teams system #
To ensure the teams system has the latest information from Nakama you can refresh it.
|
|
Get current team #
Get the user’s current team.
|
|
Also determine if the user is an Admin or Superadmin of their current team.
|
|
Get current team members #
Get the user’s current team members.
|
|
Get team members from other teams #
Get the team members in other teams by passing the team id or a team object.
|
|
Get chat history #
Get the chat history for the user’s team.
|
|
Create a team #
Create a team for the user.
|
|
List available teams #
List available teams by location.
|
|
Search for teams #
Search for teams based on their name or shortcode.
|
|
Join a team #
Join a team for the user either by passing the team id or by passing a team object.
|
|
List join requests #
List join requests for the user’s current team
|
|
Approve join requests #
Approve a single join request, either by passing the user id of the user requesting to join, or by directly passing the group user object.
|
|
Also approve multiple join requests at once.
|
|
Reject join requests #
Reject a single join request, either by passing the user id of the user requesting to join, or by directly passing the group user object.
|
|
Also reject multiple join requests at once.
|
|
Promote team members #
Promote team members if the user has sufficient privileges.
|
|
Leave team #
Leave a team for the user either by passing the team id.
|
|
Or by passing a team object.
|
|
Delete team #
Delete a team, providing the user has sufficient priviledges.
|
|
Send chat message #
Send a chat message to the user’s team.
|
|
Team Achievements #
The Team Achievements API enables teams to work together toward shared goals and unlock rewards through collective effort.
Function Reference
Function | Description |
---|---|
GetAchievementsAsync | Gets all available achievements and their current progress for the team |
UpdateAchievementsAsync | Submits progress updates for multiple achievements |
ClaimAchievementsAsync | Claims completed achievements to receive rewards (admins only) |
The Achievement object #
Attribute | Type | Definition |
---|---|---|
Id | string | Unique identifier for this achievement |
Name | string | Display name of the achievement (may be an i18n code) |
Description | string | Descriptive text explaining the achievement goal (may be an i18n code) |
Category | string | Category grouping for organizing achievements |
Count | long | Current progress toward completion |
MaxCount | long | Target value required for completion |
ClaimTimeSec | long | Unix timestamp when achievement reward was claimed, 0 if not claimed |
TotalClaimTimeSec | long | Unix timestamp when total achievement reward was claimed, 0 if not claimed |
CurrentTimeSec | long | Unix timestamp for the current server time |
ExpireTimeSec | long | Unix timestamp when achievement expires, 0 if it does not expire |
ResetTimeSec | long | Unix timestamp when achievement will reset |
StartTimeSec | long | Unix timestamp when achievement becomes available, 0 if immediately available |
EndTimeSec | long | Unix timestamp when achievement stops accepting updates, 0 if it does not end |
PreconditionIds | string[] | Array of achievement IDs that must be completed before this one becomes available |
AvailableRewards | AvailableRewards | Potential rewards and their probabilities for completion |
Reward | Reward | Reward received after claiming, null if not claimed |
AvailableTotalReward | AvailableRewards | Potential rewards for total completion (including sub-achievements) |
TotalReward | Reward | Reward received for total completion, null if not claimed |
SubAchievements | Map<string, SubAchievement> | Collection of sub-achievements within this achievement |
AdditionalProperties | Map<string, string> | Custom metadata and configuration properties |
AutoClaim | bool | Whether the achievement reward is automatically given upon completion |
AutoClaimTotal | bool | Whether the total reward is automatically given upon completing all sub-achievements |
AutoReset | bool | Whether the achievement automatically resets after completion |
Get team achievements #
|
|
Retrieves all available achievements and their current progress for the team.
Results
IAchievementList
: Complete collection of team achievements with progress data
Permissions
- Requires active team membership (member or admin)
Example
|
|
Update team achievements #
|
|
Submits progress updates for multiple achievements simultaneously.
Parameters
achievementIds
(string[]
, required): Array of achievement identifiers to update- Constraints: Each ID must match a configured team achievement
progressIncrement
(long
, required): Amount to add to current progress- Behavior: Negative values reduce progress, cannot go below 0
Results
IAchievementsUpdateAck
: Updated achievement data reflecting new progress values
Permissions
- Requires active team membership (member or admin)
Implementation Notes
- Progress updates are applied atomically across all specified achievements
- Achievements with auto-claim enabled are automatically claimed when completed
- Recurring achievements reset progress after completion
- Updates are ignored for already-completed achievements unless they support multiple completions
Example
|
|
Claim team achievements #
|
|
Claims completed achievements to receive configured rewards.
Parameters
achievementIds
(string[]
, required): Array of achievement identifiers to claim- Constraints: Each ID must match a completed team achievement
Results
IAchievementsUpdateAck
: Updated achievement data with claim timestamps and reward information
Permissions
- Requires admin or superadmin role within the team
- Regular members cannot claim achievements
Implementation Notes
- Achievements must be completed (progress >= count) before claiming
- Each achievement can only be claimed once per completion cycle
- Recurring achievements become available for new progress after claiming
- Operation is idempotent for already-claimed achievements
Example
|
|
Team Event Leaderboards #
The Team Event Leaderboards API enables teams to compete in time-limited events with tier-based matchmaking and cohort competition.
Function Reference
Function | Description |
---|---|
ListEventLeaderboardsAsync | Lists all available event leaderboards for the team |
GetEventLeaderboardAsync | Gets detailed information about a specific event leaderboard |
RollEventLeaderboardAsync | Enrolls the team into a cohort for an event with tier-based matchmaking |
UpdateEventLeaderboardAsync | Submits individual member scores that contribute to the team’s total |
ClaimEventLeaderboardRewardAsync | Claims rewards after an event ends based on final team ranking |
The TeamEventLeaderboard object #
Attribute | Type | Definition |
---|---|---|
Id | string | Event leaderboard identifier |
Name | string | Display name of the event leaderboard (may be an i18n code) |
Description | string | Descriptive text explaining the event (may be an i18n code) |
Category | string | Category grouping for filtering events |
Ascending | bool | Score ordering direction (true = lowest first, false = highest first) |
Operator | string | Score submission operator (INCREMENT, DECREMENT, SET, BEST) |
Tier | int | Current tier level for matchmaking (0 = lowest tier) |
StartTimeSec | long | Unix timestamp when the current event iteration started |
EndTimeSec | long | Unix timestamp when the current event iteration ends |
ExpiryTimeSec | long | Unix timestamp when rewards expire and new iteration begins |
AvailableRewards | AvailableRewards | Potential rewards and their probabilities for current rank |
RewardTiers | Map<int, EventLeaderboardRewardTiers> | Reward structure for each tier of this event leaderboard |
ChangeZones | Map<int, EventLeaderboardChangeZone> | Per-tier promotion/demotion zones, if configured |
ClaimTimeSec | long | Unix timestamp when rewards were claimed, 0 if not claimed |
Reward | Reward | Reward received after claiming, null if not claimed |
AdditionalProperties | Map<string, string> | Custom metadata and configuration properties |
Count | long | Current participant count in the cohort |
MaxCount | long | Maximum participant count for the cohort |
MaxNumScore | long | Maximum number of score submissions per participant |
Scores | TeamEventLeaderboardScore[] | Array of all team scores in the cohort |
IsActive | bool | Whether new scores can be submitted to this event |
CanClaim | bool | Whether rewards are available to claim |
CanRoll | bool | Whether the team can enroll in a new iteration |
MatchmakerProperties | Struct | Extra matchmaker properties for this cohort |
CurrentTimeSec | long | Unix timestamp for the current server time |
CohortId | string | ID of the cohort this team is competing in, empty if not enrolled |
BackingId | string | Backing ID for underlying score tracking |
Contributions | TeamEventLeaderboardContribution[] | Array of individual member contributions to team score |
TeamEventLeaderboardScore #
Attribute | Type | Definition |
---|---|---|
Id | string | Team ID for this leaderboard participant |
Name | string | Team name |
AvatarUrl | string | Team avatar URL |
CreateTimeSec | long | Unix timestamp when team first joined this event |
UpdateTimeSec | long | Unix timestamp when team last submitted a score |
Rank | long | Position in cohort rankings (1 = first place) |
Score | long | Team’s total score |
Subscore | long | Team’s subscore for tiebreaking |
NumScores | long | Number of score submissions made by this team |
Metadata | string | JSON metadata from team’s last score submission |
TeamEventLeaderboardContribution #
Attribute | Type | Definition |
---|---|---|
Id | string | User ID of contributing team member |
Username | string | Username of contributing member |
DisplayName | string | Display name of contributing member |
AvatarUrl | string | Avatar URL of contributing member |
CreateTimeSec | long | Unix timestamp when member first contributed |
UpdateTimeSec | long | Unix timestamp of member’s last contribution |
Score | long | Member’s aggregate contribution to team score |
Subscore | long | Member’s aggregate contribution to team subscore |
NumScores | long | Number of score submissions made by this member |
Metadata | string | JSON metadata from member’s last score submission |
List team event leaderboards #
|
|
Retrieves all available event leaderboards for the team, including both active and enrollable events.
Results
ITeamEventLeaderboards
: Collection containing all event leaderboards
Permissions
- Requires active team membership (member or admin)
Example
|
|
Get team event leaderboard #
|
|
Retrieves detailed information about a specific event leaderboard including team standings, scores, and member contributions.
Parameters
leaderboardId
(string
, required): Event leaderboard identifier- Constraints: Must match a configured event leaderboard ID
Results
ITeamEventLeaderboard
: Complete event leaderboard data with scores and contributions
Permissions
- Requires active team membership (member or admin)
Implementation Notes
- May fail if the event has reached maximum participants or has other enrollment constraints
Example
|
|
Roll into team event leaderboard #
|
|
Enrolls the team into a cohort for an event that has not yet started, with automatic tier-based matchmaking.
Parameters
leaderboardId
(string
, required): Event leaderboard identifier- Constraints: Must match a configured event leaderboard ID
Results
ITeamEventLeaderboard
: Event leaderboard data after enrollment
Permissions
- Requires active team membership (member or admin)
Implementation Notes
- Teams are automatically matched with others in the same tier
- Cohort assignment is permanent for the duration of the event
- Cannot re-roll while an active event is in progress
- Tier progression is based on previous event performance
Example
|
|
Update team event leaderboard score #
|
|
Submits individual member scores that contribute to the team’s total score based on the event’s operator configuration. (See: Score Operators)
Parameters
leaderboardId
(string
, required): Event leaderboard identifier- Constraints: Must match a configured event leaderboard ID
score
(long
, required): Primary score to submit. Accepts negative values, but beware of interactions with the event leaderboard’s configured operator e.g., a negative score combined with the DECR operator will increase the score.subscore
(long
, optional): Secondary score for tiebreaking- Default behavior: Uses 0 if not provided
metadata
(Dictionary<string, string>
, optional): Custom data associated with this submission- Default behavior: Empty metadata if not provided;
null
dictionary becomes empty JSON object - Constraints: Values must be JSON-serializable strings
- Default behavior: Empty metadata if not provided;
Results
ITeamEventLeaderboard
: Updated event leaderboard data with new rankings
Permissions
- Requires active team membership (member or admin)
Implementation Notes
- Scores are aggregated according to the event’s operator (SUM, MAX, MIN, etc.)
- Team must be enrolled in the event before submitting scores
- Submissions are only accepted during the active event window
- Individual contributions are tracked separately from team totals
- Teams may only submit up to
MaxNumScore
as defined in the config
Example
|
|
Claim team event leaderboard rewards #
|
|
Claims rewards after an event ends based on the team’s final ranking and tier placement.
Parameters
leaderboardId
(string
, required): Event leaderboard identifier- Constraints: Must match a configured event leaderboard ID
Results
ITeamEventLeaderboard
: Event leaderboard data with claimed reward information
Permissions
- Requires active team membership (member or admin)
Implementation Notes
- Rewards can only be claimed after the event has ended but before the reward expires
- Rewards are distributed based on final rank within the cohort
- Each event can only be claimed once per team
- Operation is idempotent - multiple claims return the same result
Example
|
|
Team Inventory #
The Team Inventory API enables teams to manage shared items, view item properties, consume items for rewards, and grant items to the group inventory.
Function Reference
Function | Description |
---|---|
GetItemCodexAsync | Gets all available item definitions and configurations |
GetItemsAsync | Gets the team’s current inventory with item instances |
ConsumeItemsAsync | Consumes items from inventory and receives configured rewards |
GrantItemsAsync | Adds items to the team’s inventory |
UpdateItemsAsync | Updates custom properties of existing inventory items |
The Inventory object #
Attribute | Type | Definition |
---|---|---|
Items | Map<string, InventoryItem> | Collection of inventory items keyed by instance ID |
InventoryItem #
Attribute | Type | Definition |
---|---|---|
Id | string | Unique identifier for this item type |
InstanceId | string | Unique identifier for this specific item instance |
Name | string | Display name of the item (may be an i18n code) |
Description | string | Descriptive text explaining the item (may be an i18n code) |
Category | string | Category grouping for organizing items |
ItemSets | string[] | Array of item set identifiers this item belongs to |
Count | long | Current quantity of this item in the inventory |
MaxCount | long | Maximum quantity that can be owned for this item type |
Stackable | bool | Whether multiple instances can be combined into a single stack |
Consumable | bool | Whether this item can be consumed for rewards |
ConsumeAvailableRewards | AvailableRewards | Potential rewards and probabilities when consuming this item |
StringProperties | Map<string, string> | Custom text-based properties for this item instance |
NumericProperties | Map<string, double> | Custom numeric properties for this item instance |
OwnedTimeSec | long | Unix timestamp when the team acquired this item |
UpdateTimeSec | long | Unix timestamp when this item was last modified |
Get team item codex #
|
|
Retrieves the item catalog/reference for a team i.e., a list of all possible items that could exist in the team’s inventory system, not the items the team actually owns.
Results
IInventoryList
: Complete catalog of item definitions and metadata
Permissions
- Requires active team membership (member or admin)
Example
|
|
Get team items #
|
|
Retrieves the team’s current inventory with all owned item instances.
Results
IInventoryList
: Team’s inventory containing owned items with quantities and properties
Permissions
- Requires active team membership (member or admin)
Example
|
|
Consume team items #
|
|
Consumes items from the team inventory and receives configured rewards.
Parameters
itemsToConsume
(Dictionary<string, long>
, required): Map of item IDs to quantities to consume- Constraints: Item IDs must exist in team inventory with sufficient quantities
instancesToConsume
(Dictionary<string, long>
, required): Map of instance IDs to quantities to consume- Constraints: Instance IDs must exist in team inventory with sufficient quantities
overConsume
(bool
, required): Whether to allow consuming more items than available- Behavior: If true, consumes all available items even if less than requested
Results
IInventoryConsumeRewards
: Rewards received from consumption and updated inventory state
Permissions
- Requires admin role within the team
- Regular members cannot consume team inventory items
Implementation Notes
- Items must be marked as consumable in their configuration
- Consumption is atomic: either all specified items are consumed or none are
- Rewards are determined by item configuration and applied immediately
- Non-consumable items cannot be consumed regardless of parameters
Example
|
|
Grant team items #
|
|
Adds items to the team’s shared inventory.
Parameters
itemsToGrant
(Dictionary<string, long>
, required): Map of item IDs to quantities to grant- Constraints: Item IDs must be configured in the team inventory system
- Behavior: Respects maximum count limits and stacking rules per item
Results
IInventoryUpdateAck
: Confirmation of granted items and updated inventory state
Permissions
- Requires admin role within the team
- Regular members cannot grant items to team inventory
Implementation Notes
- Items are subject to maximum count limits defined in configuration
- Stackable items will be combined with existing instances when possible
- Non-stackable items create individual instances for each quantity
- Granting beyond maximum limits will result in partial grants up to the limit
Example
|
|
Update team item properties #
|
|
Updates custom properties of existing inventory items.
Parameters
itemsToUpdate
(Dictionary<string, UpdateInventoryItemProperties>
, required): Map of instance IDs to property updates- Constraints: Instance IDs must exist in team inventory
- Behavior: Only updates specified properties, leaves others unchanged
UpdateInventoryItemProperties Properties
StringProperties
(Dictionary<string, string>
, optional): Text-based properties to updateNumericProperties
(Dictionary<string, double>
, optional): Numeric properties to update
Results
IInventoryUpdateAck
: Confirmation of updates and current item state
Permissions
- Requires admin role within the team
- Regular members cannot update team inventory item properties
Implementation Notes
- Only custom properties can be updated, not core item attributes like count or category
- Property updates are merged with existing properties
- Setting a property value to null or empty removes that property
- Property names and value types must match configuration constraints
Example
|
|
Team Mailbox #
The Team Mailbox API manages deferred reward delivery for teams, providing secure storage and controlled claiming of rewards sent to the team’s shared mailbox.
Function Reference
Function | Description |
---|---|
ListMailboxAsync | Retrieves paginated list of mailbox entries for the team |
ClaimMailboxRewardAsync | Claims rewards from a specific mailbox entry and optionally deletes it |
DeleteMailboxAsync | Removes one or more mailbox entries without claiming rewards |
The MailboxList object #
Attribute | Type | Definition |
---|---|---|
Entries | MailboxEntry[] | Array of mailbox entries for this team |
Cursor | string | Pagination cursor to fetch more results, empty if no more |
MailboxEntry #
Attribute | Type | Definition |
---|---|---|
Id | string | Unique identifier for this mailbox entry |
Reward | Reward | Reward object containing currencies, items, and other assets |
CreateTimeSec | long | Unix timestamp when this entry was created |
UpdateTimeSec | long | Unix timestamp when this entry was last modified |
ExpiryTimeSec | long | Unix timestamp when this entry expires and becomes invalid |
ClaimTimeSec | long | Unix timestamp when this entry was claimed, 0 if unclaimed |
CanClaim | bool | Whether this entry’s reward can currently be claimed |
List team mailbox entries #
|
|
Retrieves a paginated list of mailbox entries for the team, including both claimed and unclaimed rewards.
Parameters
limit
(int
, optional): Maximum number of entries to return per page- Default behavior: Returns up to 100 entries if not specified
- Constraints: Must be between 1 and 100; values outside this range are clamped
Results
IMailboxList
: Paginated collection of mailbox entries with cursor for additional pages
Permissions
- Requires active team membership (member or admin)
- Cannot access mailbox from teams where user is banned or has pending membership
Implementation Notes
- Results are ordered by creation time (newest first)
- Expired entries are automatically filtered from results
- Pagination cursor enables efficient traversal of large mailbox collections
Example
|
|
Claim team mailbox entry #
|
|
Claims the reward from a specific mailbox entry and optionally removes the entry from the mailbox after successful claiming.
Parameters
mailboxId
(string
, required): Unique identifier of the mailbox entry to claim- Constraints: Must be a valid entry ID that exists in the team’s mailbox
deleteAfterClaim
(bool
, optional): Whether to remove the entry after claiming- Default behavior: Entry is deleted after claiming if not specified
- Use case: Set to false to keep entry for record-keeping or reference
Results
IMailboxEntry
: Updated mailbox entry with claim timestamp and reward details
Permissions
- Requires active team membership (member or admin)
- All team members can claim rewards from the shared mailbox
Implementation Notes
- Entry must be claimable (
CanClaim
= true) and not expired - Rewards are added directly to team resources (wallet, inventory, etc.)
- Operation is idempotent - claiming the same entry multiple times returns the same result
- Claimed entries cannot be unclaimed once processed
Example
|
|
Delete team mailbox entries #
|
|
Removes one or more mailbox entries without claiming their rewards, useful for clearing expired or unwanted entries.
Parameters
entryIds
(string[]
, required): Array of mailbox entry identifiers to delete- Constraints: All entry IDs must exist in the team’s mailbox
- Behavior: Non-existent entries are silently ignored without causing errors
Results
Task
: Completion task with no return value
Permissions
- Requires admin or superadmin role within the team
- Regular members cannot delete mailbox entries
Implementation Notes
- Deleted entries and their rewards are permanently lost and cannot be recovered
- Operation is atomic: either all specified entries are deleted or none are
- Useful for mailbox maintenance and removing expired promotional rewards
Example
|
|
Team Stats #
The Team Stats API provides tracking and managing public and private stats for teams.
Function Reference
Function | Description |
---|---|
GetStatsAsync | Gets the current team’s public and private statistics |
UpdateStatsAsync | Updates public and/or private statistics with various operations |
The TeamStat object #
Attribute | Type | Definition |
---|---|---|
Name | string | The unique identifier for this stat |
Public | bool | Indicates whether this stat is publicly visible (true ) or private (false ) |
UpdateTimeSec | long | Unix timestamp when this stat was last modified |
Value | long | Current value of the stat |
Count | long | Number of values that have been submitted for this stat |
Total | long | Total of all submitted values for this stat |
Min | long | Smallest value that has ever been submitted for this stat |
Max | long | Largest value that has ever been submitted for this stat |
First | long | First value that was submitted for this stat |
Last | long | Latest value that was submitted for this stat |
AdditionalProperties | Struct | Custom metadata and configuration properties associated with this stat |
Get team stats #
|
|
Retrieves the current team’s complete stats data, including both public and private stats.
Result
- Returns
IStatList
: Complete stats object containing public and private stat collections - Updates local
PrivateStats
andPublicStats
properties - Notifies observers
Permissions
- Requires active team membership (member or admin)
- Cannot retrieve stats from teams where user is banned or has pending membership
Example
|
|
Update team stats #
|
|
Modifies team stats using various mathematical operations, supporting both individual and batch updates.
Parameters
privateStats
(List<UpdateStat>
, optional): Collection of private stat modifications- Default behavior: No private stats updated if null or empty
publicStats
(List<UpdateStat>
, optional): Collection of public stat modifications- Default behavior: No public stats updated if null or empty
UpdateStat Properties
Name
(string
, required): Stat identifier matching configuration- Constraints: Must exist in team stats configuration; alphanumeric and underscore only. Case-sensitive
Value
(long
, required): Numeric value for the operationOperator
(StatOperator
, required): Mathematical operation to perform
Results
- Updates local
PrivateStats
andPublicStats
properties - Notifies observers
- Generates publisher events for cross-system integrations
Permissions
- Requires admin or superadmin role within the team
- Regular members cannot directly update team statistics
Implementation Notes
- All stat names must be pre-configured in the team configuration
- Operations are atomic: either all updates succeed or all fail
- Concurrent updates by different admins may require retry logic
- Stat values are clamped to int64 range to prevent overflow
Example
|
|
Stat Update Operators
Operation | Behavior | Considerations |
---|---|---|
SET | Overwrites current value | Values exceeding int64 range are clamped, null treated as 0 |
DELTA | Adds/subtracts from current | Negative results allowed; overflow protection applied, null treated as 0 |
MIN | Updates only if new < current | Works with negative values |
MAX | Updates only if new > current | Works with negative values |
Team Store #
The Team Store API enables teams to browse and purchase items using shared team currencies and view active promotional modifiers.
Function Reference
Function | Description |
---|---|
GetStoreAsync | Gets available store items and active promotional modifiers for the team |
The TeamStore object #
Attribute | Type | Definition |
---|---|---|
StoreItems | TeamStoreItem[] | Array of items available for purchase in the team store |
ActiveRewardModifiers | ActiveRewardModifier[] | Array of currently active promotional modifiers affecting rewards |
CurrentTimeSec | long | Unix timestamp for the current server time |
TeamStoreItem #
Attribute | Type | Definition |
---|---|---|
Id | string | Unique identifier for this store item |
Name | string | Display name of the store item (may be an i18n code) |
Description | string | Descriptive text explaining the item (may be an i18n code) |
Category | string | Category grouping for organizing store items |
Cost | TeamStoreItemCost | Currency requirements and pricing information for this item |
AvailableRewards | AvailableRewards | Potential rewards and their probabilities when purchasing this item |
AdditionalProperties | Map<string, string> | Custom metadata and configuration properties |
Unavailable | bool | Whether the item is visible but cannot be purchased |
Get team store #
|
|
Retrieves available store items and active promotional modifiers for the team.
Results
ITeamStore
: Complete store data including items and active promotions
Permissions
- Requires active team membership (member or admin)
Implementation Notes
- Store items may have availability restrictions based on team level or achievements
- Active reward modifiers automatically apply to relevant purchases
- Item prices and availability can change based on server-side configuration updates
Example
|
|
Team Wallet #
The Team Wallet API manages shared currency resources for teams, enabling collective resource accumulation and administrative control over team finances.
Function Reference
Function | Description |
---|---|
GetWalletAsync | Retrieves current team wallet balances for all currencies |
GrantAsync | Adds specified currency amounts to the team’s shared wallet |
The TeamWallet object #
Attribute | Type | Definition |
---|---|---|
Id | string | Team identifier this wallet belongs to |
Currencies | Map<string, long> | Current currency balances in the team’s shared wallet |
UpdateTimeSec | long | Unix timestamp when the wallet was last modified |
Get team wallet #
|
|
Retrieves the current balances for all currencies in the team’s shared wallet.
Results
Dictionary<string, long>
: Currency balances keyed by currency identifier- Notifies observers
Permissions
- Requires active team membership (member or admin)
Example
|
|
Grant team currencies #
|
|
Adds the specified currency amounts to the team’s shared wallet, supporting multiple currencies in a single operation.
Parameters
currencies
(Dictionary<string, long>
, required): Currency amounts to add to the team wallet- Constraints: Currency identifiers must match team wallet configuration; values must be positive
- Key format: Currency identifier strings (e.g., “coins”, “gems”, “tokens”)
- Value format: Positive integer amounts to add
Results
- Updates local
Wallet
property with new balances - Notifies observers
- Generates publisher events for currency tracking
Permissions
- Requires admin or superadmin role within the team
- Regular members cannot directly modify team wallet
Implementation Notes
- All currency identifiers must be pre-configured in the team wallet setup
- Operations are atomic: either all currency grants succeed or all fail
- Currency values are added to existing balances, not replaced
- Negative values are not supported - use other systems for currency deduction
Example
|
|