Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
POST /v2/username — openapi
Change the user's username
Endpoint
Method: POST
Path: /v2/username
Servers:
https://auth.roblox.com
Request Body
The Roblox.Authentication.Api.Models.UsernameChangeRequest
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Roblox.Authentication.Api.Models.UsernameChangeRequest"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/Roblox.Authentication.Api.Models.UsernameChangeRequest"
}
}
},
"description": "The Roblox.Authentication.Api.Models.UsernameChangeRequest",
"required": true
} Responses
| Status | Description |
|---|---|
| 200 | OK |
| 400 | 5: You don't have enough Robux to change your username. 10: This username is already in use 11: Username not appropriate for Roblox 12: Usernames can be 3 to 20 characters long 13: Usernames can’t start or end with _ and can have at most one _ 14: Only a-z, A-Z, 0-9, and _ are allowed 15: Username is null 16: Username might contain private information 17: This username is not available 18: Username is same as current |
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed 1: PIN is locked. 2: A verified email is missing 3: Your password is incorrect. 100: Unknown birthday |
| 500 | 0: An unknown error occured. 5: You don't have enough Robux to change your username. |
| 503 | 4: The feature is currently not available. Please try again later. |
{
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Roblox.Web.WebAPI.ApiEmptyResponseModel"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/Roblox.Web.WebAPI.ApiEmptyResponseModel"
}
}
}
},
"400": {
"description": "5: You don't have enough Robux to change your username.\r\n10: This username is already in use\r\n11: Username not appropriate for Roblox\r\n12: Usernames can be 3 to 20 characters long\r\n13: Usernames can’t start or end with _ and can have at most one _\r\n14: Only a-z, A-Z, 0-9, and _ are allowed\r\n15: Username is null\r\n16: Username might contain private information\r\n17: This username is not available\r\n18: Username is same as current"
},
"401": {
"description": "0: Authorization has been denied for this request."
},
"403": {
"description": "0: Token Validation Failed\r\n1: PIN is locked.\r\n2: A verified email is missing\r\n3: Your password is incorrect.\r\n100: Unknown birthday"
},
"500": {
"description": "0: An unknown error occured.\r\n5: You don't have enough Robux to change your username."
},
"503": {
"description": "4: The feature is currently not available. Please try again later."
}
} Authentication
{
"security": [
{},
{
"roblox-legacy-cookie": []
}
],
"securitySchemes": {
"roblox-api-key": {
"type": "apiKey",
"description": "A configurable key that allows granular access to Roblox resources. See https://create.roblox.com/docs/cloud/auth/api-keys for more information.",
"name": "x-api-key",
"in": "header"
},
"roblox-legacy-cookie": {
"type": "apiKey",
"description": "A browser cookie that represents the identity of a Roblox user. DO NOT SHARE THIS. Sharing this will allow someone to log in as you and to steal your Robux and items. We do not recommend using cookies to call endpoints. When possible, use API keys with the x-api-key header or OAuth 2.0 instead for authentication.",
"in": "cookie",
"name": ".ROBLOSECURITY"
},
"roblox-oauth2": {
"type": "oauth2",
"description": "Build or authorize apps to access Roblox resources. See https://create.roblox.com/docs/cloud/auth/oauth2-overview for more information.",
"flows": {
"authorizationCode": {
"authorizationUrl": "https://apis.roblox.com/oauth/v1/authorize",
"tokenUrl": "https://apis.roblox.com/oauth/v1/token",
"refreshUrl": "https://apis.roblox.com/oauth/v1/token",
"scopes": {}
}
}
}
}
} Related Schemas
Complete Operation Definition
{
"tags": [
"Accounts"
],
"summary": "Change the user's username",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Roblox.Authentication.Api.Models.UsernameChangeRequest"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/Roblox.Authentication.Api.Models.UsernameChangeRequest"
}
}
},
"description": "The Roblox.Authentication.Api.Models.UsernameChangeRequest",
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Roblox.Web.WebAPI.ApiEmptyResponseModel"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/Roblox.Web.WebAPI.ApiEmptyResponseModel"
}
}
}
},
"400": {
"description": "5: You don't have enough Robux to change your username.\r\n10: This username is already in use\r\n11: Username not appropriate for Roblox\r\n12: Usernames can be 3 to 20 characters long\r\n13: Usernames can’t start or end with _ and can have at most one _\r\n14: Only a-z, A-Z, 0-9, and _ are allowed\r\n15: Username is null\r\n16: Username might contain private information\r\n17: This username is not available\r\n18: Username is same as current"
},
"401": {
"description": "0: Authorization has been denied for this request."
},
"403": {
"description": "0: Token Validation Failed\r\n1: PIN is locked.\r\n2: A verified email is missing\r\n3: Your password is incorrect.\r\n100: Unknown birthday"
},
"500": {
"description": "0: An unknown error occured.\r\n5: You don't have enough Robux to change your username."
},
"503": {
"description": "4: The feature is currently not available. Please try again later."
}
},
"servers": [
{
"url": "https://auth.roblox.com"
}
],
"x-roblox-engine-usability": {
"apiKeyWithHttpService": false
},
"security": [
{},
{
"roblox-legacy-cookie": []
}
],
"externalDocs": {
"url": "https://create.roblox.com/docs/cloud/reference/features/accounts#auth_post_v2_username"
}
}