# Create game Creates a game in the project. Endpoint: POST /v2/project/{project_id}/admin/items/game Version: 2.0.0 Security: basicAuth ## Path parameters: - `project_id` (integer, required) Project ID. You can find this parameter in your Publisher Account next to the name of the project. Example: 44056 ## Request fields (application/json): - `sku` (string, required) Unique item ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores. Example: "com.xsolla.game_1" - `name` (object,null, required) Object with localizations for item’s name. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character language codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the [documentation](/doc/shop-builder/references/supported-languages/). - `description` (object,null) Object with localizations for item’s description. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character locale codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the [documentation](/doc/shop-builder/references/supported-languages/). - `long_description` (object,null) Object with localizations for long description of item. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character locale codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both variants for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the [documentation](/doc/shop-builder/references/supported-languages/). - `image_url` (string) Image URL. Example: "http://image.png" - `media_list` (array) Game additional assets such as screenshots, gameplay video, etc. Example: [{"type":"image","url":"http://image.png"},{"type":"video","url":"http://video.png"}] - `media_list.type` (string) Type of media: image/video. Enum: "image", "video" - `media_list.url` (string) Resource file. Example: "https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg" - `order` (integer) Game order priority in the list. Example: 1 - `groups` (array) Groups the item belongs to. Example: ["new_games"] - `groups.external_id` (string, required) Example: "horror" - `attributes` (array) List of attributes. Attention. You can't specify more than 20 attributes for the item. Any attempts to exceed the limit result in an error. - `attributes.external_id` (string, required) Unique attribute ID. The external_id may contain only lowercase and uppercase Latin alphanumeric characters, dashes, and underscores. Example: "attribute_1" - `attributes.name` (object) Object with localizations for attribute's name. Keys are specified in ISO 3166-1. Example: {"en":"Genre","de":"Genre"} - `attributes.values` (array, required) Attention. You can't create more than 6 values for each attribute. Any attempts to exceed the limit result in an error. Example: [{"external_id":"strategy","value":{"en":"Strategy","de":"Strategie"}},{"external_id":"action","value":{"en":"Action","de":"Aktion"}}] - `attributes.values.external_id` (string, required) Unique value ID for an attribute. The external_id may only contain lowercase Latin alphanumeric characters, dashes, and underscores. Example: "attribute_value" - `attributes.values.value` (object, required) Object with localizations of the value's name. Keys are specified in ISO 3166-1. Example: {"en":"Strategy","de":"Strategie"} - `is_enabled` (boolean) If disabled, item cannot be purchased and accessed through inventory. Example: true - `is_show_in_store` (boolean) Item is available for purchase. Example: true - `unit_items` (array, required) Game keys for different DRMs. Example: [{"sku":"com.xsolla.game_key_1","name":{"en-US":"Game key name","ru-RU":"Название игрового ключа"},"drm_sku":"steam_key_1","prices":[{"amount":35.5,"currency":"USD","is_enabled":true,"is_default":true}],"vc_prices":[{"amount":35.5,"sku":"com.xsolla.gold_1","is_enabled":true,"is_default":true}],"is_enabled":true,"is_free":false,"is_show_in_store":true,"pre_order":{"release_date":"2020-08-11T10:00:00+03:00","is_enabled":true,"description":"Some description"},"regions":[{"id":12},{"id":64}],"limits":{"per_user":{"total":5},"per_item":{"total":10000,"available":5000,"reserved":500,"sold":4500}},"periods":[{"date_from":"2020-08-11T10:00:00+03:00","date_until":"2020-08-11T20:00:00+03:00"}]}] - `unit_items.attributes` (array) List of attributes. Example: [{"external_id":"attribute_external_id","name":{"en":"Attribute name","de":"Attributname"},"values":[{"external_id":"value_1","name":{"en":"value 1","de":"wert 1"}},{"external_id":"value_2","name":{"en":"value 2","de":"wert 2"}}]}] - `unit_items.attributes.values` (array, required) Example: [{"external_id":"value_1","name":{"en":"value 1","de":"wert 1"}},{"external_id":"value_2","name":{"en":"value 2","de":"wert 2"}}] - `unit_items.is_free` (boolean) If true, the item is free. - `unit_items.prices` (array, required) Prices in real currencies. - `unit_items.prices.amount` (number, required) Example: 1299.99 - `unit_items.prices.currency` (string, required) Item price currency. Three-letter code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). Check the documentation for detailed information about [currencies supported by Xsolla](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/). Example: "RUB" - `unit_items.prices.is_default` (boolean, required) Default price is used to build catalog if no price in user's currency is specified. - `unit_items.prices.is_enabled` (boolean, required) - `unit_items.vc_prices` (array) - `unit_items.vc_prices.is_default` (boolean, required) - `unit_items.drm_sku` (string, required) DRM unique ID. Example: "steam" - `unit_items.pre_order` (object) Pre-order settings. - `unit_items.pre_order.release_date` (string, required) Game key release date in the ISO 8601 format. - `unit_items.pre_order.is_enabled` (boolean, required) If disabled, the item is not a pre-order. - `unit_items.pre_order.description` (string) Additional information for the pre-order, which will be emailed. - `unit_items.regions` (array) - `unit_items.regions.id` (integer) Example: 1 - `unit_items.limits` (object) Item limits. - `unit_items.limits.per_user` (any) Item limitation for a separate user. - `unit_items.limits.per_item` (integer,null) Global item limitation. Example: 10 - `unit_items.limits.recurrent_schedule` (object,null) Limit refresh period. - `unit_items.limits.recurrent_schedule.per_user` (any) - `unit_items.periods` (array,null) Item sales period. - `unit_items.periods.date_from` (string) Date when the specified item will be available for sale. Example: "2020-08-11T10:00:00+03:00" - `unit_items.periods.date_until` (string,null) Date when the specified item will become unavailable for sale. Can be null. Example: "2020-08-11T20:00:00+03:00" ## Response 201 fields (application/json): - `item_id` (integer) Example: 101 - `sku` (string) Example: "com.xsolla.game_1" ## Response 401 fields (application/json): - `statusCode` (integer) Example: 401 - `errorCode` (integer) Example: 1020 - `errorMessage` (string) Example: "[0401-1020]: Error in Authentication method occurred" ## Response 422 fields (application/json): - `statusCode` (integer) Example: 422 - `errorCode` (integer) Example: 1102 - `errorMessage` (string) Example: "[0401-1102]: Unprocessable Entity. The property `property_name` is required" - `transactionId` (string) Example: "x-x-x-x-transactionId-mock-x-x-x"