Delete Action
This method reverses a previously processed action. When an action is deleted, RapidMule rolls back everything that action granted for the player: awarded points, badges (including ranked badge chains), achieved levels, and any prizes/deliverables. If the action charged a cost, that cost is refunded.
Use this when an upstream event needs to be undone — for example a cancelled purchase, a chargeback, or a correction of incorrectly submitted data.
Endpoint
POST /v1/action/delete
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The name of the action to reverse. Must match the original action name |
referenceId | string | Yes | The unique reference id used when the original action was processed |
playerId | string | Yes | Unique identifier for the player the action belongs to |
multiplier | decimal | No | The multiplier used on the original action. Defaults to 1 |
timestamp | long | No | Unix timestamp in milliseconds. Defaults to current date time |
details | array | No | Container for Action Objects, matching the original action |
Example Request
{
"name": "purchase",
"referenceId": "order-f4a7c1b9-3e5d",
"playerId": "{{playerID}}",
"multiplier": 1
}
Response
Success Response
A successful reversal returns the standard envelope with code 200 and no data payload.
{
"code": 200
}
Request Example
curl -X POST https://api.rapidmule.com/v1/action/delete \
-H "AuthKey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "purchase",
"referenceId": "order-f4a7c1b9-3e5d",
"playerId": "{{playerID}}"
}'
Use Cases
- Cancelled Purchases: Roll back points and prizes when an order is refunded or voided
- Chargebacks: Reverse rewards tied to a disputed transaction
- Error Correction: Undo an action that was submitted with incorrect data
Error Codes
| Code | Description | Resolution |
|---|---|---|
| 1001 | Payload is null | Check request body |
| 1002 | Invalid Player | Verify playerId exists |
| 101 | Action is not reversible | The action or its rewards cannot be rolled back |
| 4001 | Invalid AuthKey | Verify API key |
| 4002 | Missing tenant domain | Client-tier keys must include a tenant domain |
| 4003 | Auth tier not allowed | Use a Server or Mobile key for this action |
| 4004 | Nested actions not allowed for Client tier | Send nested actions from a Server key |
Deleting an action permanently rolls back the points, badges, levels, and prizes it granted. Make sure the name, referenceId, and playerId exactly match the original request so the correct action is reversed.
For details on how actions are processed in the first place, see Process Action and Core Concepts - Actions.