Skip to main content
Version: 6.1.0

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.

ServiceOperation
campaignSYS_DELETE_CAMPAIGN

Method Parameters​

ParameterDescription
campaignCodeThe campaign code to delete.
versionVersion of the campaign being deleted. Pass -1 to delete regardless of the current version.
forceIf true, allows deleting an in-progress campaign whose control scenario does not hold 100% of the weight. Defaults to false.

Usage​

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"campaignCode": "SUMMER2026"
},
"status": 200
}
Common Error Codes

Status Codes​

CodeNameDescription
40345MISSING_RECORDNo campaign exists for the specified campaignCode.
41062CAMPAIGN_VERSION_MISMATCHThe specified version no longer matches the campaign — it was updated by someone else. Re-read and retry.
41054CAMPAIGN_UPDATE_ERRORThe campaign is in progress with active scenario weight allocations. Pass force as true to delete it.
40616CLOUD_CODE_ONLY_METHODThe method was called from a client. It can only be called from Cloud Code or S2S.
40731FEATURE_NOT_SUPPORTED_BY_BILLING_PLANBilling plan does not include the Campaign feature. Requires a plan that includes Enterprise features.