Skip to main content
Version: 6.0.0

SysUpdateCampaignJson

Updates only the free-form campaignJson custom payload on a campaign. No other campaign field can be modified through this call — the schedule, trigger, target, scenario weights and A/B settings are all left untouched, and a concurrent edit to any of them in the Design Portal will not be overwritten.

The campaign must not have ended. The updated payload is picked up by already-authenticated players on their next GetMyCampaigns call — they do not need to re-authenticate.

ServiceOperation
campaignSYS_UPDATE_CAMPAIGN_JSON

Method Parameters

ParameterDescription
campaignCodeThe campaign code whose campaignJson is being updated.
versionVersion of the campaign being updated. Pass -1 to update regardless of the current version.
campaignJsonThe new campaignJson custom payload. This replaces the existing payload entirely — it is not merged. Pass null to clear it. Oversized payloads are rejected; see the note below.
info

campaignJson is returned to every player enrolled in the campaign, so keep it to the data your client actually needs. The maximum serialized size is governed by an application property — contact support if you need the limit adjusted.

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"campaignCode": "CHRISTMAS2026",
"version": 4,
"updatedAt": 1786737600000
},
"status": 200
}

The returned version is the campaign's new version after the update. Feed it into your next call's version parameter if you want to detect a concurrent change rather than overwrite it.

Common Error Codes

Status Codes

CodeNameDescription
40345MISSING_RECORDNo campaign exists for the specified campaignCode.
40001INVALID_REQUESTThe campaign has ended and can no longer be modified.
41062CAMPAIGN_VERSION_MISMATCHThe specified version no longer matches the campaign — it was updated by someone else. Re-read and retry.
41064CAMPAIGN_JSON_TOO_LARGEThe serialized campaignJson exceeds the maximum size allowed for the app.
40731FEATURE_NOT_SUPPORTED_BY_BILLING_PLANBilling plan does not include the Campaign feature. Requires a plan that includes Enterprise features.