> For the complete documentation index, see [llms.txt](https://docs.discloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.discloud.com/en/api-and-sdks/api-overview/user.md).

# User

Get your Discloud account information through the API.

## Get current user information

> Returns information about the authenticated user

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"User","description":"Operations about users"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"UserResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"user":{"$ref":"#/components/schemas/User"}}},"User":{"type":"object","properties":{"userID":{"type":"string","description":"The unique identifier of the user"},"username":{"type":"string","nullable":true,"description":"The user's username"},"avatar":{"type":"string","nullable":true,"description":"URL of the user's avatar"},"totalRamMb":{"type":"integer","description":"Total RAM allocated to the user (in MB)"},"ramUsedMb":{"type":"integer","description":"RAM currently being used by the user (in MB)"},"subdomains":{"type":"array","items":{"type":"string"},"description":"List of subdomains owned by the user"},"customdomains":{"type":"array","items":{"type":"string"},"description":"List of custom domains owned by the user"},"apps":{"type":"array","items":{"type":"string"},"description":"List of application IDs owned by the user"},"plan":{"type":"string","description":"The subscription plan of the user"},"locale":{"type":"string","description":"The language/locale"},"lastDataLeft":{"type":"object","properties":{"days":{"type":"integer","description":"Days remaining in the current plan"},"hours":{"type":"integer","description":"Hours remaining in the current plan"},"minutes":{"type":"integer","description":"Minutes remaining in the current plan"},"seconds":{"type":"integer","description":"Seconds remaining in the current plan"}},"description":"Time remaining in the current plan"},"planDataEnd":{"type":"string","description":"End date of the current plan, or \"Subscription\" for subscription plans"}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/user":{"get":{"tags":["User"],"summary":"Get current user information","description":"Returns information about the authenticated user","operationId":"getCurrentUser","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Update user locale

> Updates the user's preferred language/locale

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"User","description":"Operations about users"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"LocaleResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"locale":{"type":"string","enum":["pt-BR","en-US"]}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}},"LocaleErrorResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"localeList":{"type":"array","items":{"type":"string"}}}}}},"paths":{"/locale/{locale}":{"put":{"tags":["User"],"summary":"Update user locale","description":"Updates the user's preferred language/locale","operationId":"updateUserLocale","parameters":[{"name":"locale","in":"path","required":true,"description":"The locale to set for the user","schema":{"type":"string","enum":["pt-BR","en-US"]}}],"responses":{"200":{"description":"Locale successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocaleResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Invalid locale specified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocaleErrorResponse"}}}}}}}}}
```

## Get user data for the VS Code extension

> Returns the authenticated user's data together with the data of their applications (appsStatus) and the IDs of the applications they moderate (appsTeam). Route used by the Discloud extension for VS Code.

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"User","description":"Operations about users"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"VscodeUserResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"user":{"type":"object","properties":{"userID":{"type":"string","description":"The unique identifier of the user"},"username":{"type":"string","nullable":true,"description":"The user's username"},"avatar":{"type":"string","nullable":true,"description":"URL of the user's avatar"},"plan":{"type":"string","description":"The subscription plan of the user"},"locale":{"type":"string","description":"The language/locale"},"totalRamMb":{"type":"integer","description":"Total RAM allocated to the user (in MB)"},"ramUsedMb":{"type":"integer","description":"RAM currently being used by the user (in MB)"},"apps":{"type":"array","items":{"type":"string"},"description":"List of application IDs owned by the user"},"appsTeam":{"type":"array","items":{"type":"string"},"description":"List of application IDs the user moderates"},"subdomains":{"type":"array","items":{"type":"string"},"description":"List of subdomains owned by the user"},"customdomains":{"type":"array","items":{"type":"string"},"description":"List of custom domains owned by the user"},"appsStatus":{"type":"array","description":"Data of each of the user's applications","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"integer","description":"Type of the application (0 = bot, 1 = site)"},"online":{"type":"boolean"},"ram":{"type":"integer"},"ramKilled":{"type":"boolean"},"exitCode":{"type":"integer"},"lang":{"type":"string"},"mainFile":{"type":"string"},"avatarURL":{"type":"string"},"autoRestart":{"type":"boolean"},"apts":{"type":"array","items":{"type":"string"}},"clusterName":{"type":"string"},"version":{"type":"string"}}}}}}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/vscode":{"get":{"tags":["User"],"summary":"Get user data for the VS Code extension","description":"Returns the authenticated user's data together with the data of their applications (appsStatus) and the IDs of the applications they moderate (appsTeam). Route used by the Discloud extension for VS Code.","operationId":"getVscodeUser","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VscodeUserResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
