Skip to main content

Powerups

Powerups are player-owned boosts — for example a temporary points multiplier — that a player can activate and deactivate. These endpoints let you list a player's powerups and toggle their active state.

List Powerups​

Returns the powerups a player owns. When the player owns none, data is an empty array.

Endpoint​

POST /v1/powerup/list

Request Body​

ParameterTypeRequiredDescription
playerIdstringYesUnique identifier for the player

Response​

{
"code": 200,
"data": [
{
"uid": "FD2ABC92-FFCA-4FB9-8AE5-F8FA648017CC",
"prizeLabel": "Points Booster",
"prizeImageName": "https://rapidmulestorage.blob.core.windows.net/images/072c8a3e-7950-41cc-88bb-37a7769b3e29_fire.png",
"multiplier": 1.5,
"isActive": true,
"isActivated": true,
"isValid": true,
"initialUseCount": 5,
"remainingUseCount": 5,
"powerupMaxUseCount": 5,
"powerupTimeoutSeconds": 2592000,
"neverExpires": false,
"activatedAt": 1783504573,
"createdAt": 1783504573,
"expiresAt": 1786096573,
"remainingSeconds": 2555594,

Response Fields​

FieldTypeDescription
uidstringUnique identifier of the powerup instance
prizeLabelstringDisplay name of the powerup
prizeImageNamestringURL to the powerup image
multipliernumberThe multiplier applied when active
isActivebooleanWhether the powerup is currently usable
isActivatedbooleanWhether the powerup is currently activated
isValidbooleanWhether the powerup is still valid (owned, not expired, uses remaining)
initialUseCountnumberTotal uses the powerup was granted with
remainingUseCountnumberUses remaining
powerupMaxUseCountnumberMaximum uses configured for the powerup
powerupTimeoutSecondsnumberLifetime of the powerup in seconds once granted
neverExpiresbooleanWhether the powerup never expires
activatedAtlongUnix timestamp (seconds) the powerup was activated, or null
createdAtlongUnix timestamp (seconds) the powerup was granted
expiresAtlongUnix timestamp (seconds) the powerup expires
remainingSecondslongSeconds remaining before expiry
targetPrizesarrayDeliverables the powerup applies to (empty = all)
targetPrizes[].targetPrizeUidstringUID of the targeted deliverable
targetPrizes[].targetPrizeLabelstringName of the targeted deliverable
targetPrizes[].targetPrizeImageNamestringURL to the targeted deliverable image
targetPrizes[].deliveryMethodnumberHow the targeted deliverable is delivered

Request Example​

curl -X POST https://api.rapidmule.com/v1/powerup/list \
-H "AuthKey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"playerId": "{{playerID}}"}'

Activate Powerup​

Activates a powerup the player owns.

Endpoint​

POST /v1/powerup/activate

Request Body​

ParameterTypeRequiredDescription
playerIdstringYesUnique identifier for the player
powerupUIdstringYesUID of the powerup instance to activate

Response​

{
"code": 200,
"data": "Powerup activated"
}

Request Example​

curl -X POST https://api.rapidmule.com/v1/powerup/activate \
-H "AuthKey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"playerId": "{{playerID}}", "powerupUId": "{{powerupID}}"}'

Deactivate Powerup​

Deactivates a currently active powerup.

Endpoint​

POST /v1/powerup/deactivate

Request Body​

ParameterTypeRequiredDescription
playerIdstringYesUnique identifier for the player
powerupUIdstringYesUID of the powerup instance to deactivate

Response​

{
"code": 200,
"data": "Powerup deactivated"
}

Request Example​

curl -X POST https://api.rapidmule.com/v1/powerup/deactivate \
-H "AuthKey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"playerId": "{{playerID}}", "powerupUId": "{{powerupID}}"}'

Use Cases​

  • Powerup Inventory: Show a player their owned boosts with list
  • Boost Toggle: Let players turn a multiplier on before a session with activate
  • Cleanup: Turn a boost off with deactivate when it is no longer needed

Error Codes​

CodeDescriptionResolution
1002Missing required fieldProvide playerId / powerupUId
4001Invalid AuthKeyVerify API key
9020Player not foundVerify playerId exists
9021Powerup not found, not owned, or already activeCheck the powerup before activating
9023Powerup not found, not owned, or not activeCheck the powerup before deactivating
Related Endpoints