---
title: "Create a PlayerAttributeDefinition."
method: POST
path: "/matchmaking-api/v1/matchmaking/player-attribute"
tags: ["Matchmaking"]
---

# Create a PlayerAttributeDefinition.

`POST /matchmaking-api/v1/matchmaking/player-attribute`

## Request body

- CreateMatchmakingPlayerAttributeDefinitionRequest — Request to create a new MatchmakingPlayerAttributeDefinition.
  - `universeId` integer — UniverseId for the new PlayerAttributeDefinition.
  - `name` string, nullable — Name of the new rule.
  - `dataType` 'Invalid' | 'Bool' | 'Number' | 'String' — Data type of a matchmaking attribute. Can be a bool, number, or string.
  - `defaultValue` MatchmakingAttributeValue — Matchmaking attribute value object for matchmaking rules.
    - `boolValue` boolean, nullable — Bool value of the attribute. One of BoolValue, NumericValue, or StringValue must be set.
    - `numericValue` number, double, nullable — Double value of the attribute. One of BoolValue, NumericValue, or StringValue must be set.
    - `stringValue` string, nullable — String value of the attribute. One of BoolValue, NumericValue, or StringValue must be set.
    - `type` 'Invalid' | 'Bool' | 'Number' | 'String' — Matchmaking attribute value type.
  - `attributeValueLocation` MatchmakingAttributeValueLocation — Describes where an attribute value exists.
    - `locationCase` 'Invalid' | 'DataStoreLocation' — The storage solution used for this MatchmakingPlayerAttributeDefinition.
    - `dataStoreLocation` DataStoreLocation — Describes where an attribute value exists in DataStore.
      - `dataStoreName` string, nullable — The DataStore name.
      - `scope` string, nullable — The scope of the key in DataStore.
      - `keyTemplate` string, nullable — The key of a DataStore value, with {UserId} replaced by the player's actual ID when fetching values.
      - `valuePath` string, nullable — A JSON path to a value if it lives in a JSON object.

## Response `200`

Success

- CreateMatchmakingPlayerAttributeDefinitionResponse — The response for creating a matchmaking player attribute definition.
  - `playerAttributeDefinition` MatchmakingPlayerAttributeDefinition — Describes a player attribute definition for matchmaking.
    - `id` string, nullable — The id of the attribute.
    - `universeId` integer — The universe id of the attribute.
    - `name` string, nullable — The name of the attribute.
    - `dataType` 'Invalid' | 'Bool' | 'Number' | 'String' — Data type of a matchmaking attribute. Can be a bool, number, or string.
    - `defaultValue` MatchmakingAttributeValue — Matchmaking attribute value object for matchmaking rules.
      - `boolValue` boolean, nullable — Bool value of the attribute. One of BoolValue, NumericValue, or StringValue must be set.
      - `numericValue` number, double, nullable — Double value of the attribute. One of BoolValue, NumericValue, or StringValue must be set.
      - `stringValue` string, nullable — String value of the attribute. One of BoolValue, NumericValue, or StringValue must be set.
      - `type` 'Invalid' | 'Bool' | 'Number' | 'String' — Matchmaking attribute value type.
    - `attributeValueLocation` MatchmakingAttributeValueLocation — Describes where an attribute value exists.
      - `locationCase` 'Invalid' | 'DataStoreLocation' — The storage solution used for this MatchmakingPlayerAttributeDefinition.
      - `dataStoreLocation` DataStoreLocation — Describes where an attribute value exists in DataStore.
        - `dataStoreName` string, nullable — The DataStore name.
        - `scope` string, nullable — The scope of the key in DataStore.
        - `keyTemplate` string, nullable — The key of a DataStore value, with {UserId} replaced by the player's actual ID when fetching values.
        - `valuePath` string, nullable — A JSON path to a value if it lives in a JSON object.
    - `createdTime` string, date-time — The aggregation function of the attribute.
    - `updatedTime` string, date-time — The time the attribute was last updated.

---

[API](https://skmtc.net/roblox/apis/roblox-api.md) · [All operations](https://skmtc.net/roblox/apis/roblox-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/roblox/roblox-api/versions/e15802062270/schema)
