# 创建属性

创建属性。

Endpoint: POST /v2/project/{project_id}/admin/attribute
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    项目ID。您可以在发布商帐户的项目名称旁找到此参数；使用项目时，也可以在浏览器地址栏中找到此参数。URL格式如下：https://publisher.xsolla.com//projects/。
    Example: 44056

## Request fields (application/json):

  - `external_id` (string, required)
    唯一属性ID。 external_id只能包含大小写英文字母、数字、短横线和下划线。

  - `name` (object, required)
    包含属性本地化名称的对象。编码按照ISO 3166-1的规定。

## Response 201 fields (application/json):

  - `external_id` (string)
    唯一属性ID。 external_id只能包含大小写英文字母、数字、短横线和下划线。

## 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"


