Xsolla-logo

Create game achievement

post/achievements

Creates an achievement for the game.

SecurityBearer
Request
Request Body schema: application/json
code
required
string <= 256 characters [A-Za-z0-9_]+

Unique achievement ID in the game. May be used while granting an achievement to a user for usability.

title
required
string

Achievement name. Set your default value for the case when the user has logged in from a country for which there is no localized content.

description
required
string

Description of the achievement. Set your default value for the cases when the achievement has no localization content or the user has logged in from a country for which there is no localized content.

lock_image
required
string

Image URL for a locked achievement.

unlock_image
required
string

Image URL for an unlocked achievement.

hidden
required
boolean

Indicates whether the achievement is shown to the user or not if it was not granted to them. If value is false then all achievements including not granted ones will be shown to the user.

game_id
required
integer

Game ID which the achievement belongs to.

required
Array of objects

List of localized content of achievements(title and description)for the specified country.

Responses
200

OK

400

(Bad Request) Invalid request parameters

403

Authentication token is invalid

422

(Unprocessable Entity) Semantic errors in request

429

(Too Many Requests) Too many requests are sent during the rate limit period

Request samples
application/json
{
  • "code": "string",
  • "description": "string",
  • "game_id": 0,
  • "hidden": true,
  • "localized_content": [
    ],
  • "lock_image": "string",
  • "title": "string",
  • "unlock_image": "string"
}
Response samples
application/json
{
  • "id": 0
}