Xsolla-logo
  • 文档
  • 创建帐户

Create game

post/web/backpack/merchants/{merchantId}/projects/{projectId}/games

Creates a game entity for a specified project.

Securitybearer
Request
path Parameters
merchantId
required
integer <uint32>

Merchant ID. You can find this parameter in your Publisher Account:

  • in the Project settings > Webhooks section.
  • in the Company settings > Company section.
  • in the URL in the browser address bar on any Publisher Account page. The URL has the following format: https://publisher.xsolla.com/<merchant ID>/<Publisher Account section>.
projectId
required
integer <uint32>

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

header Parameters
X-HOST-ID
required
string <uuid>

A unique header issued by Xsolla. To obtain it, please contact the integration team at integration@xsolla.com or your Customer Success Manager at csm@xsolla.com. Provide them with the project ID and merchant ID. Keep X-HOST-ID confidential, as it is part of the authentication key.

Request Body schema: application/json

A JSON object containing game information.

merchant_id
required
integer <uint32>
Deprecated
project_id
required
integer <uint32>
Deprecated
external_game_id
string

The external identifier uniquely assigned by you to represent the game. Used in other requests to associate items, keys, and currencies with a game. Enables grouping items, keys, and currencies under one game in the Metaframe widget.

game_name
string

The name of the game.

game_image_url
string

The URL pointing to the image representing the associated game. It's recommended to upload images that weigh no more than 1 MB. This image is displayed to players in the Metaframe widget.

Responses
201

Game entity was successfully created.

400

Bad request.

500

Internal server error.

Request samples
application/json
{
  • "external_game_id": "string",
  • "game_name": "string",
  • "game_image_url": "string",
  • "merchant_id": 0,
  • "project_id": 0
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}