SysDeleteCampaign
Deletes a campaign, along with all of its scenarios, player participation records and collected metrics. This cannot be undone.
If the campaign is in progress (enabled and within its startAt/endAt window) and has an active A/B split — that is, the control scenario does not hold 100% of the weight — you must pass force as true to delete it.
| Service | Operation |
|---|---|
| campaign | SYS_DELETE_CAMPAIGN |
Method Parameters
| Parameter | Description |
|---|---|
| campaignCode | The campaign code to delete. |
| version | Version of the campaign being deleted. Pass -1 to delete regardless of the current version. |
| force | If true, allows deleting an in-progress campaign whose control scenario does not hold 100% of the weight. Defaults to false. |
Usage
http://localhost:3000
- C#
- C++
- Obj-C
- Java
- JavaScript
- Dart
- Roblox
- GDScript
- Lua
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
-- N/A
N/A
-- Cloud Code only. To view example, switch to the Cloud Code tab
var campaignCode = "SUMMER2026";
var version = -1;
var force = false;
var campaignProxy = bridge.getCampaignServiceProxy();
var postResult = campaignProxy.sysDeleteCampaign(campaignCode, version, force);
{
"service": "campaign",
"operation": "SYS_DELETE_CAMPAIGN",
"data": {
"campaignCode": "SUMMER2026",
"version": -1,
"force": false
}
}
JSON Response
{
"data": {
"campaignCode": "SUMMER2026"
},
"status": 200
}
Common Error Codes
Status Codes
| Code | Name | Description |
|---|---|---|
| 40345 | MISSING_RECORD | No campaign exists for the specified campaignCode. |
| 41062 | CAMPAIGN_VERSION_MISMATCH | The specified version no longer matches the campaign — it was updated by someone else. Re-read and retry. |
| 41054 | CAMPAIGN_UPDATE_ERROR | The campaign is in progress with active scenario weight allocations. Pass force as true to delete it. |
| 40616 | CLOUD_CODE_ONLY_METHOD | The method was called from a client. It can only be called from Cloud Code or S2S. |
| 40731 | FEATURE_NOT_SUPPORTED_BY_BILLING_PLAN | Billing plan does not include the Campaign feature. Requires a plan that includes Enterprise features. |