Create a Bonus

Overview

This end point allows you to create a new XP bonus period.

Request URL

All parameters in the request must be sent as a POST HTTP request. Make all requests to the following URL:

https://xp.construct.net/createbonus.json

Authenticating The Request

This end point is for secret key authenticated requests only. Signed in players cannot call this end point.

secret string Required
Your games secret API key.

Request Parameters

gameID guid Required
The ID of the game you are making this request against. You can find the ID of your game in your Construct Game Services (CGS) account.
start int64 Required
The datetime the bonus will start as a unix time stamp (seconds since Jan 01 1970).
end int64 Required
The datetime the bonus will end as a unix time stamp (seconds since Jan 01 1970).
modifier string Required
The bonus multiplier. Must be a value between 1.1 and 100
title string
A title for the bonus which may be shown to the end users.
description string
A description for the bonus which may be shown to the end users.
language string
Provide this parameter to set the language that the title and description are written in. Permitted values are AR, BG, CS, DA, DE, EL, EN, ES, ET, FI, FR, HE, HU, ID, IT, JA, KO, LT, LV, NB, NL, PL, PT, RO, RU, SK, SL, SV, TH, TR, UK, VI, ZH. If not specified, your games default language will be used.
culture string Optional
Optionally specify a supported culture code for rendering various properties. If not specified, the culture code from your games default language will be used.

Success Response

Successful responses always return a HTTP 200 status code.

{
  "success": true,
  "bonus": { ... },
  "formattingCulture": "en-us"
}

Response Properties

success bool
If the request was successfull or not.
bonus XPBonus
An XP bonus object.
formattingCulture string
If some return values are culture specific, this property indicates what culture the values have been rendered as.

Failure Response

Unsuccessful responses always return HTTP 4xx status codes.

{
  "success": false,
  "errorMessage": "Your request failed due to...",
  "helpURL": "https://www.construct.net/en/game-services/manuals/game-services/xp/api-end-points/bonuses/create-bonus",
  "shouldRetry": false
}

Response Properties

success bool
If the request was successfull or not.
errorMessage string
An error message with more detailed information on why the request failed.
helpURL url (string)
A link to documentation which should provide help with the error.
shouldRetry bool
Should the client wait a short period of time and retry the request. Usually this is false, but returns true if the request failed due to rate limiting.
Game Services Manual 2026-02-26