Skip to content

Service · inherits Instance

AvatarEditorService

Official docs ↗

A service to support developer Avatar Editors.

About AvatarEditorService

AvatarEditorService is a service to support developer Avatar Editors. It provides methods to modify the player's platform avatar, request information about a user's inventory, and request information about the catalog.

For more information regarding the Avatar Editor, see Avatar Editor Service.

Throttling

The following endpoints on AvatarEditorService have experience-level throttling:

For each experience, this throttling allows you to send up to 100 requests per second to these AvatarEditorService endpoints, regardless of the number of servers or user count. Exceeding these limits returns a 429 Too Many Requests error.

Item Details Response

The following methods return item data in a shared response format:

{
  "Id": 0,
  "ItemType": "Asset",
  "AssetType": "Image",
  "BundleType": "BodyParts",
  "Name": "string",
  "Description": "string",
  "ProductId": 0,
  "ItemStatus": ["New"],
  "ItemRestrictions": ["Collectible"],

  "BundledItems": [
    {
      "Id": 0,
      "Name": "string",
      "Type": "Asset",
      "AssetType": "string",
      "SupportsHeadShapes": false,
      "Owned": false
    }
  ],
  "IsRecolorable": false,

  "CollectibleItemId": "string",
  "TotalQuantity": 0,
  "UnitsAvailableForConsumption": 0,
  "QuantityLimitPerUser": 0,
  "HasResellers": false,
  "OffSaleDeadline": null,

  "Price": 0,
  "PremiumPricing": {
    "PremiumDiscountPercentage": 0,
    "PremiumPriceInRobux": 0
  },
  "LowestPrice": 0,
  "LowestResalePrice": 0,
  "PriceStatus": "string",
  "SaleLocationType": "ShopAndAllExperiences",
  "PurchaseCount": 0,
  "FavoriteCount": 0,

  "CreatorType": "User",
  "CreatorTargetId": 0,
  "CreatorName": "string",
  "CreatorHasVerifiedBadge": false,

  "SupportsHeadShapes": false,

  "TimedOptions": [
    { "Duration": 259200, "Price": 30 },
    { "Duration": 604800, "Price": 40 },
    { "Duration": 1209600, "Price": 50 }
  ]
}
Basic Information
Bundle Information
Collectible Information
Pricing and Sale Information
Creator Information
Timed Options Information
SaleLocationType Values
Value Description
NotApplicable Default value, should not occur in practice.
ShopOnly Item can only be purchased in the Roblox catalog shop.
MyExperiencesOnly Item can only be purchased in the creator's experiences.
ShopAndMyExperiences Item can be purchased in the Roblox catalog shop or the creator's experiences.
ExperiencesById Item can only be purchased in a specific list of experiences.
ShopAndAllExperiences Item can be purchased in the Roblox catalog shop and all experiences.
ExperiencesDevApiOnly Item can only be purchased in experiences via developer APIs.
ShopAndExperiencesById Item can be purchased in the Roblox catalog shop or a whitelisted list of experiences.
itemRestrictions Values
itemRestrictions Limited or Unlimited
empty Unlimited
Collectible UGC Limited
Limited Roblox Limited
LimitedUnique Roblox Limited Unique

Methods 22

  • CheckApplyDefaultClothingAsync(humanoidDescription: HumanoidDescription) → HumanoidDescriptionYieldsUsed to apply default clothing to the HumanoidDescription if necessary.

    Returns a new HumanoidDescription with the Shirt and Pants properties updated if necessary. Returns nil if default clothing was not needed.

    Default clothing is necessary if the HumanoidDescription does not currently have Shirt and Pants equipped and the body colors are too similar.

  • ConformToAvatarRulesAsync(humanoidDescription: HumanoidDescription) → HumanoidDescriptionYieldsReturns a copy of the given HumanoidDescription that conforms to the platform Avatar rules.

    This method also remaps classic face and classic head assets to their corresponding Dynamic Head asset IDs, with the appropriate HeadShape pre-applied. This remapping happens automatically and requires no code changes.

  • GetAccessoryType(avatarAssetType: AvatarAssetType) → AccessoryTypeReturns the AccessoryType that corresponds to the given AvatarAssetType.

    Returns the AccessoryType that corresponds to the given AvatarAssetType, which is useful for grouping avatar assets by the accessory slot they occupy.

    The mapping covers accessory asset types — for example, AvatarAssetType.HairAccessory maps to AccessoryType.Hair, and layered-clothing types such as AvatarAssetType.ShirtAccessory map to AccessoryType.Shirt. An AvatarAssetType that does not correspond to an accessory (for example, an animation or a body part) returns AccessoryType.Unknown.

    This method returns immediately; it does not yield or perform a web request.

  • GetAvatarRulesAsync() → DictionaryYieldsReturns the platform Avatar rules for things such as scaling, default shirts and pants, number of wearable assets.

    This function returns the platform Avatar rules for things like scaling, default shirts and pants, number of wearable assets, ect.

    The returned table includes the following fields:

    {
      "PlayerAvatarTypes": [
        "R6"
      ],
      "Scales": {},
      "WearableAssetTypes": [
        {
          "MaxNumber": 0,
          "Id": 0,
          "Name": "string"
        }
      ],
      "BodyColorsPalette": [
        {
          "BrickColorId": 0,
          "NexColor": "string",
          "Name": "string"
        }
      ],
      "BasicBodyColorsPalette": [
        {
          "BrickColorId": 0,
          "HexColor": "string",
          "Name": "string"
        }
      ],
      "MinimumDeltaEBodyColorDifference": 0,
      "ProportionsAndBodyTypeEnabledForUser": true,
      "DefaultClothingAssetLists": {
        "DefaultShirtAssetIds": [
          0
        ],
        "DefaultPantAssetIds": [
          0
        ]
      },
      "BundlesEnabledForUser": true,
      "EmotesEnabledForUser": true
    }
    
  • GetBatchItemDetailsAsync(itemIds: Array, itemType: AvatarItemType) → ArrayYieldsGets the item details for a list of items at once.

    Gets the item details for a list of items at once. More efficient than AvatarEditorService.GetItemDetailsAsync if you need to get the item details for multiple items.

    Returns an array of items (see Item Details Response above in summary). Each item includes the TimedOptions field when the asset supports timed ownership.

  • GetBundlesByAssetIdAsync(assetId: int64, limit: int64 = 10) → CatalogPagesYieldsReturns a CatalogPages object containing bundles that include the given asset.

    Returns a paginated list of bundles that contain the specified asset. Results are returned in ascending order by date created. Each page entry uses the Item Details Response format (see service description above).

  • GetFavoriteAsync(itemId: int64, itemType: AvatarItemType) → booleanYieldsReturns if the Players.LocalPlayer has favorited the given bundle or asset.

    This function returns if the Players.LocalPlayer has favorited the given bundle or asset.

  • GetHeadShapesAsync() → ArrayYieldsReturns an array of head shape names that the Players.LocalPlayer owns.

    Each head shape corresponds to a classic head owned by the user and can be applied to any Dynamic Head that supports shape swapping (see BodyPartDescription.HeadShape).

    This method requires the user to have accepted the AvatarEditorService.PromptAllowInventoryReadAccess prompt.

  • GetInventoryAsync(assetTypes: Array) → InventoryPagesYieldsReturns an InventoryPages object with information about owned items in the users inventory with the given AvatarAssetTypes.

    Returns an InventoryPages object with information about owned items in the users inventory with the given AvatarAssetTypes.

    The returned table includes the following fields:

    [
        {
          "AssetId": 0,
          "AssetType": "string",
          "Created": "string",
          "Name": "string",
          "CreatedTime": DateTime,
          "ExpirationTime": DateTime,
        }
    ]
    
  • GetItemDetailsAsync(itemId: int64, itemType: AvatarItemType) → DictionaryYieldsReturns the item details for the given item.

    This function returns the item details for the given item. It accepts two parameters - the first indicating the ID of the item being retrieved and the second indicating its AvatarItemType.

    The response includes all fields from Item Details Response (see above in summary), plus the following additional fields specific to single-item queries:

  • GetOutfitDetailsAsync(outfitId: int64) → DictionaryYieldsReturns the outfit details for the given outfit.

    This function returns the outfit details for the given outfit. It accepts one parameter: the ID of the outfit.

    Data returns in the following format:

    {
      "Assets": [
        {
          "AssetType": {
            "Id": 31,
            "Name": "RightLeg"
          },
          "CurrentVersionId": 16447385805,
          "Id": 11584239464,
          "Name": "Anime Female - Right Leg",
          "SupportsHeadShapes": false
        }
      ],
      "BodyColors": {
        "HeadColor": Color3(204, 142, 105),
        "LeftArmColor": Color3(204, 142, 105),
        "LeftLegColor": Color3(204, 142, 105),
        "RightArmColor": Color3(204, 142, 105),
        "RightLegColor": Color3(204, 142, 105),
        "TorsoColor": Color3(204, 142, 105)
      },
      "Id": 14703770624,
      "IsEditable": true,
      "Name": "Your Costume",
      "OutfitType": "Avatar",
      "PlayerAvatarType": "R15",
      "Scale": {
        "BodyType": 0,
        "Depth": 1,
        "Head": 1,
        "Height": 1,
        "Proportion": 0,
        "Width": 1
      },
    }
    
  • GetOutfitsAsync(outfitSource: OutfitSource = All, outfitType: OutfitType = All) → OutfitPagesYieldsReturns outfit data for the Players.LocalPlayer.

    This function returns outfit data for the Players.LocalPlayer. This would be used with Players.GetHumanoidDescriptionFromOutfitIdAsync to update the players character to the outfit. Access to this would also depend on AvatarEditorService.PromptAllowInventoryReadAccess being accepted by the user.

    The returned table includes the following fields:

    [
        {
          "Id": 0,
          "Name": "string",
          "IsEditable": true
        }
    ]
    
  • GetRecommendedAssetsAsync(assetType: AvatarAssetType, contextAssetId: int64 = 0) → ArrayYieldsReturns a list of recommended assets based on a given AssetType and asset ID.

    Returns a list of recommended assets based on a given AssetType and asset ID. Use this to gather a list of similar assets to the asset provided. Take a look at the code sample below for more information on possible usages for this function.

    Data is in the format:

    [
        {
          "Item": {
            "AssetId": 0,
            "Name": "string",
            "Price": 0,
            "PremiumPrice": 0
          },
          "Creator": {
            "CreatorId": 0,
            "CreatorType": "string",
            "Name": "string"
          },
          "Product": {
            "Id": 0,
            "PriceInRobux": 0,
            "IsForSale": true,
            "IsResellable": true,
            "IsLimited": true,
            "IsLimitedUnique": true,
            "TotalPrivateSales": 0,
            "OffsaleDeadline": "string",
            "IsFree": true
          }
        }
    ]
    
  • GetRecommendedBundlesAsync(bundleId: int64) → ArrayYieldsReturns a list of recommended bundles for a given bundle id.

    This function returns a list of recommended bundles for a given bundle id.

    Data is in the format:

    [
        {
          "Id": 0,
          "Name": "string",
          "Description": "string",
          "BundleType": "string",
          "Items": [
            {
              "Owned": true,
              "Id": 0,
              "Name": "string",
              "Type": "string",
              "AssetType": "string",
              "SupportsHeadShapes": false
            }
          ],
          "Creator": {
            "Id": 0,
            "Name": "string",
            "Type": "string"
          },
          "Product": {
            "Id": 0,
            "Type": "string",
            "IsPublicDomain": true,
            "IsForSale": true,
            "PriceInRobux": 0,
            "PremiumPricing": {
              "PremiumDiscountPercentage": 0,
              "PremiumPriceInRobux": 0
            }
          }
        }
    ]
    
  • PromptAllowInventoryReadAccess() → ()Prompts the Players.LocalPlayer to allow the developer to read what items the user has in their inventory and other avatar editor related information.

    Prompts the Players.LocalPlayer to allow the developer to read what items the user has in their inventory and other avatar editor related information. The prompt needs to be confirmed by the user for the developer to use AvatarEditorService.GetInventoryAsync, AvatarEditorService.GetOutfitsAsync and AvatarEditorService.GetFavoriteAsync. Permission does not persist between sessions.

  • PromptCreateOutfit(outfit: HumanoidDescription, rigType: HumanoidRigType, outfitOptions: Dictionary = nil, outfitType: Variant) → ()Prompts the Players.LocalPlayer to save the given HumanoidDescription as an outfit.

    Prompts the Players.LocalPlayer to save the given HumanoidDescription as an outfit. Does not yield. The result can be retrieved by listening to the AvatarEditorService.PromptCreateOutfitCompleted event.

  • PromptDeleteOutfit(outfitId: int64) → ()Prompts the Players.LocalPlayer to delete the given outfit.

    Prompts the Players.LocalPlayer to delete the given outfit. Does not yield. The result can be retrieved by listening to the AvatarEditorService.PromptDeleteOutfitCompleted event.

  • PromptRenameOutfit(outfitId: int64) → ()Prompts the Players.LocalPlayer to rename the given outfit.

    Prompts the Players.LocalPlayer to rename the given outfit. Does not yield. The result can be retrieved by listening to the AvatarEditorService.PromptRenameOutfitCompleted event.

  • PromptSaveAvatar(humanoidDescription: HumanoidDescription, rigType: HumanoidRigType) → ()Prompts the Players.LocalPlayer to update their avatar based on the given HumanoidDescription and HumanoidRigType of R6 or R15.

    This function prompts the Players.LocalPlayer to update their avatar based on the given HumanoidDescription and HumanoidRigType (R6 or R15). Does not yield and can get the result by listening to the PromptSaveAvatarCompleted event. This is similar to how other prompts such as PromptPurchase work.

  • PromptSetFavorite(itemId: int64, itemType: AvatarItemType, shouldFavorite: boolean) → ()Prompts the Players.LocalPlayer to favorite or unfavorite the given asset or bundle.

    This function prompts the Players.LocalPlayer to favorite or unfavorite the given asset or bundle.

  • PromptUpdateOutfit(outfitId: int64, updatedOutfit: HumanoidDescription, rigType: HumanoidRigType) → ()Prompts the Players.LocalPlayer to update the given outfit.

    Prompts the Players.LocalPlayer to update the given outfit with the given HumanoidDescription.

  • SearchCatalogAsync(searchParameters: CatalogSearchParams) → CatalogPagesYieldsReturns a CatalogPages object containing the result of the given search.

    This function returns a CatalogPages object containing the result of the given search.

    Each item in the returned pages uses the Item Details Response format (see above in summary), including the TimedOptions field for assets that support timed ownership.

    Use SalesTypeFilter.TimedOptions in CatalogSearchParams to filter results to only items with timed options available.

Events 7

  • PromptAllowInventoryReadAccessCompletedAvatarEditorService.PromptAllowInventoryReadAccessCompleted:Connect(function(result))Fires when the AvatarEditorService.PromptAllowInventoryReadAccess prompt is responded to by the user.

    This event fires when the AvatarEditorService.PromptAllowInventoryReadAccess prompt is responded to by the user. It can only return the Success or PermissionDenied enum statuses as it does not perform any web requests which could fail.

  • PromptCreateOutfitCompletedAvatarEditorService.PromptCreateOutfitCompleted:Connect(function(result, failureType))Fires when the PromptSaveOutfit operation is completed.

    This event fires when the PromptSaveOutfit operation is completed. It gives a status enum indicating whether the prompt succeeded, failed or permission was not granted by the user.

  • PromptDeleteOutfitCompletedAvatarEditorService.PromptDeleteOutfitCompleted:Connect(function(result))Fires when the PromptDeleteOutfit operation is completed.

    Fires when the PromptDeleteOutfit operation is completed. It gives a status enum indicating whether the prompt succeeded, failed or permission was not granted by the user.

  • PromptRenameOutfitCompletedAvatarEditorService.PromptRenameOutfitCompleted:Connect(function(result))Fires when the PromptRenameOutfit operation is completed.

    Fires when the PromptRenameOutfit operation is completed. It gives a status enum indicating whether the prompt succeeded, failed or permission was not granted by the user.

  • PromptSaveAvatarCompletedAvatarEditorService.PromptSaveAvatarCompleted:Connect(function(result, humanoidDescription))Fires when the AvatarEditorService.PromptSaveAvatar operation is completed.

    This event fires when the AvatarEditorService.PromptSaveAvatar operation is completed. It gives a status enum indicating whether the prompt succeeded, failed or permission was not granted by the user.

  • PromptSetFavoriteCompletedAvatarEditorService.PromptSetFavoriteCompleted:Connect(function(result))Fires when the AvatarEditorService.PromptSetFavorite operation is completed.

    Fires when the AvatarEditorService.PromptSetFavorite operation is completed. It gives a status enum indicating whether the prompt succeeded, failed or permission was not granted by the user.

  • PromptUpdateOutfitCompletedAvatarEditorService.PromptUpdateOutfitCompleted:Connect(function(result))Fires when the AvatarEditorService.PromptUpdateOutfit operation is completed.

    Fires when the AvatarEditorService.PromptUpdateOutfit operation is completed. It gives a status enum indicating whether the prompt succeeded, failed or permission was not granted by the user.

AvatarEditorService also has every member of Instance. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.