## Update Campaign

This endpoint updates a campaign that has not yet started.

You cannot update a campaign that has already started.

**API Call Sample:**

**Request Schema:**

```json
{
  "$ref": "#/components/schemas/UpdateCampaignDto",
  "components": {
    "schemas": {
      "StrategyDataDto": {
        "type": "object",
        "properties": {
          "eligiblePlayersNumber": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of players that are eligible for this campaign (only for FIRST_N_PLAYERS)",
            "example": 777
          },
          "playerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "List of player IDs",
              "example": "player one",
              "maxLength": 255,
              "minLength": 0
            },
            "uniqueItems": true
          }
        }
      },
      "CampaignPromotionSettings": {
        "type": "object",
        "properties": {
          "expiresInEnabled": {
            "type": "boolean",
            "description": "Show/Hide Campaign/Feature Player Expiry Time."
          },
          "optOutConfirmationPopupEnabled": {
            "type": "boolean",
            "description": "Show/Hide Opt-Out Confirmation Popup."
          },
          "optOutEnabled": {
            "type": "boolean",
            "description": "Show/Hide Opt-Out Button and Function."
          },
          "valuedAtEnabled": {
            "type": "boolean",
            "description": "Show/Hide Value of Promotion."
          },
          "youWonEnabled": {
            "type": "boolean",
            "description": "Show/Hide Final Winning Value."
          },
          "playLaterEnabled": {
            "type": "boolean",
            "description": "Show/Hide Play Later Button."
          },
          "hideBetPanelDuringAwardedFeature": {
            "type": "boolean",
            "description": "Show/Hide Bet on Game (for Awarded Feature only)."
          }
        }
      },
      "UpdateCampaignDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Campaign name",
            "example": "New Year Promo",
            "maxLength": 255,
            "minLength": 1
          },
          "externalCampaignId": {
            "type": "string",
            "description": "Campaign ID set by the operator.",
            "example": "New Year Promo",
            "maxLength": 512,
            "minLength": 0
          },
          "gameId": {
            "type": "string",
            "deprecated": true,
            "description": "Game ID - DEPRECATED: Use gameIds field instead. This field will be removed in future API versions.",
            "example": "rp_140"
          },
          "gameIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "A list of game IDs.",
              "example": "rp_140",
              "minLength": 1
            },
            "uniqueItems": true
          },
          "startDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "The start time of the campaign in UTC. It must not be earlier than the current time.",
            "example": "2027-01-01T08:00:00Z"
          },
          "endDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "The end time of the campaign in UTC. It must be greater than startDateTime.",
            "example": "2027-01-02T08:00:00Z"
          },
          "expiresInDays": {
            "type": "integer",
            "format": "int32",
            "deprecated": true,
            "description": "Expires in x days from date of campaign start. \n\nThis field will be removed in future versions of the API and fields validForDays, startEvent and allowPostExpirationCompletion should be used instead",
            "example": 7
          },
          "bet": {
            "type": "number",
            "description": "Size of a single bet in major currency units, e.g. 1.00 for 1 EUR. For awarded features this should be the actual cost of the feature e.g. 1 EUR x 50 Multiplier = 50 EUR",
            "example": 50
          },
          "currencyCode": {
            "type": "string",
            "description": "ISO 4217 3-letter currency code.",
            "example": "EUR"
          },
          "betNumber": {
            "type": "integer",
            "format": "int32",
            "description": "Number of free bets/features for each participating player.",
            "example": 5
          },
          "countries": {
            "type": "array",
            "deprecated": true,
            "description": "A list of ISO 3166-2 country codes. \n\nThis filed will be removed in future versions of the API and we will no longer support this functionality.",
            "example": [
              "BR",
              "US",
              "FR"
            ],
            "items": {
              "type": "string",
              "deprecated": true
            }
          },
          "strategy": {
            "type": "string",
            "default": "PLAYER_LIST",
            "deprecated": true,
            "description": "PLAYER_LIST or FIRST_N_PLAYERS. \n\nThis field will be removed in future versions of the API and default to PLAYER_LIST as FIRST_N_PLAYERS will not be supported in the future.",
            "enum": [
              "PLAYER_LIST",
              "FIRST_N_PLAYERS"
            ],
            "example": "PLAYER_LIST"
          },
          "strategyData": {
            "$ref": "#/components/schemas/StrategyDataDto",
            "deprecated": true,
            "description": "Strategy specific data. \n\nThis field will be removed in future versions of the API and the following operation should be used to add players instead : PUT /campaign/{campaignId}/participant"
          },
          "rulesUrl": {
            "type": "string",
            "description": "Link for campaign rules",
            "example": "https://url-to-rules.com"
          },
          "validForDays": {
            "type": "integer",
            "format": "int32",
            "description": "The number of days the offer remains valid, starting from the date of the startEvent",
            "example": 7
          },
          "startEvent": {
            "type": "string",
            "description": "The event that marks the starting point for counting the validity period validForDays.",
            "enum": [
              "ASSIGN",
              "ACCEPT"
            ],
            "example": "ACCEPT"
          },
          "allowPostExpirationCompletion": {
            "type": "boolean",
            "description": "Defines if accepted promotion can be completed after the campaign end date.",
            "example": true
          },
          "promotionSettings": {
            "$ref": "#/components/schemas/CampaignPromotionSettings",
            "description": "Promotion settings (UI customization)."
          }
        },
        "required": [
          "bet",
          "betNumber",
          "currencyCode",
          "endDateTime",
          "name",
          "startDateTime"
        ]
      }
    }
  }
}
```

**Response Schema:**

```json
{
  "$ref": "#/components/schemas/CampaignDto",
  "components": {
    "schemas": {
      "StrategyDataDto": {
        "type": "object",
        "properties": {
          "eligiblePlayersNumber": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of players that are eligible for this campaign (only for FIRST_N_PLAYERS)",
            "example": 777
          },
          "playerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "List of player IDs",
              "example": "player one",
              "maxLength": 255,
              "minLength": 0
            },
            "uniqueItems": true
          }
        }
      },
      "CampaignPromotionSettings": {
        "type": "object",
        "properties": {
          "expiresInEnabled": {
            "type": "boolean",
            "description": "Show/Hide Campaign/Feature Player Expiry Time."
          },
          "optOutConfirmationPopupEnabled": {
            "type": "boolean",
            "description": "Show/Hide Opt-Out Confirmation Popup."
          },
          "optOutEnabled": {
            "type": "boolean",
            "description": "Show/Hide Opt-Out Button and Function."
          },
          "valuedAtEnabled": {
            "type": "boolean",
            "description": "Show/Hide Value of Promotion."
          },
          "youWonEnabled": {
            "type": "boolean",
            "description": "Show/Hide Final Winning Value."
          },
          "playLaterEnabled": {
            "type": "boolean",
            "description": "Show/Hide Play Later Button."
          },
          "hideBetPanelDuringAwardedFeature": {
            "type": "boolean",
            "description": "Show/Hide Bet on Game (for Awarded Feature only)."
          }
        }
      },
      "CampaignDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "ID of the campaign.",
            "example": 7
          },
          "type": {
            "type": "string",
            "description": "Possible values: FREE_ROUNDS, AWARDED_FEATURE",
            "enum": [
              "FREE_ROUNDS",
              "AWARDED_FEATURE"
            ],
            "example": "FREE_ROUNDS"
          },
          "disabledAt": {
            "type": "string",
            "format": "date-time",
            "description": "Campaign deactivation time in UTC.",
            "example": "2027-01-03T10:00:00Z"
          },
          "disabledForcibly": {
            "type": "boolean",
            "description": "Whether the campaign was disabled forcibly.",
            "example": true
          },
          "name": {
            "type": "string",
            "description": "Campaign name",
            "example": "New Year Promo"
          },
          "externalCampaignId": {
            "type": "string",
            "description": "External campaign ID.",
            "example": "New Year Promo"
          },
          "gameId": {
            "type": "string",
            "deprecated": true,
            "description": "Game ID - DEPRECATED: Use gameIds field instead. This field will be removed in future API versions.",
            "example": "rp_140"
          },
          "gameIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "A list of game IDs.",
              "example": "rp_140"
            },
            "uniqueItems": true
          },
          "startDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "Campaign start time in UTC.",
            "example": "2027-01-01T08:00:00Z"
          },
          "endDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "Campaign end time in UTC.",
            "example": "2027-01-02T08:00:00Z"
          },
          "expiresInDays": {
            "type": "integer",
            "format": "int32",
            "deprecated": true,
            "description": "Expires in x days from date of campaign start. \n\nThis field will be removed in future versions of the API and fields validForDays, startEvent and allowPostExpirationCompletion should be used instead",
            "example": 7
          },
          "bet": {
            "type": "number",
            "description": "Size of a single bet in major currency units, e.g. 1.00 for 1 EUR. For awarded features will be the actual cost of the feature e.g. 1 EUR x 50 Multiplier = 50 EUR",
            "example": 50
          },
          "currencyCode": {
            "type": "string",
            "description": "ISO 4217 3-letter currency code.",
            "example": "EUR"
          },
          "betNumber": {
            "type": "integer",
            "format": "int32",
            "description": "Number of free bets/features for each participating player.",
            "example": 7
          },
          "strategy": {
            "type": "string",
            "default": "PLAYER_LIST",
            "deprecated": true,
            "description": "PLAYER_LIST or FIRST_N_PLAYERS. \n\nThis field will be removed in future versions of the API and default to PLAYER_LIST as FIRST_N_PLAYERS will not be supported in the future.",
            "enum": [
              "PLAYER_LIST",
              "FIRST_N_PLAYERS"
            ],
            "example": "PLAYER_LIST"
          },
          "strategyData": {
            "$ref": "#/components/schemas/StrategyDataDto",
            "deprecated": true,
            "description": "Strategy specific data. \n\nThis field will be removed in future versions of the API and the following operation should be used to add players instead : PUT /campaign/{campaignId}/participant"
          },
          "countries": {
            "type": "array",
            "deprecated": true,
            "items": {
              "type": "string",
              "deprecated": true,
              "description": "A list of ISO 3166-2 country codes. \n\nThis filed will be removed in future versions of the API and we will no longer support this functionality.",
              "example": [
                "BR",
                "US",
                "FR"
              ]
            }
          },
          "status": {
            "type": "string",
            "description": "Possible values: UPCOMING, ONGOING, ENDED, DISABLED.",
            "enum": [
              "UPCOMING",
              "ONGOING",
              "ENDED",
              "DISABLED"
            ],
            "example": "UPCOMING"
          },
          "rulesUrl": {
            "type": "string",
            "description": "Link for campaign rules.",
            "example": "https://url-to-rules.com"
          },
          "validForDays": {
            "type": "integer",
            "format": "int32",
            "description": "The number of days the offer remains valid, starting from the date of the startEvent",
            "example": 7
          },
          "startEvent": {
            "type": "string",
            "description": "The event that marks the starting point for counting the validity period validForDays.",
            "enum": [
              "ASSIGN",
              "ACCEPT"
            ],
            "example": "ACCEPT"
          },
          "allowPostExpirationCompletion": {
            "type": "boolean",
            "description": "Defines if accepted promotion can be completed after the campaign end date.",
            "example": true
          },
          "promotionSettings": {
            "$ref": "#/components/schemas/CampaignPromotionSettings",
            "description": "Promotion settings (UI customization)."
          }
        }
      }
    }
  }
}
```