> For the complete documentation index, see [llms.txt](https://docs.tradevest.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tradevest.ai/api-reference/user-management/users.md).

# Users

## Create User

> Create a user. Provided email needs to be unique.\
> \
> Data provided will be used to create credentials to access Partner Panel. Specifically, provided\
> email will be used to identify created account. This means that email needs to be unique.

```json
{"openapi":"3.0.1","info":{"title":"Users","version":"1.0"},"tags":[{"name":"Users","description":"Users domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","scopes":{}}}}},"schemas":{"CreateUserResult":{"title":"CreateUserResult","type":"object","properties":{"userId":{"type":"string","format":"uuid","description":"Unique user identification number in UUID format","readOnly":true}},"required":["userId"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"UserData":{"title":"UserData","type":"object","properties":{"gender":{"$ref":"#/components/schemas/GenderEnum"},"firstName":{"type":"string","maxLength":255,"pattern":"^\\S+( \\S+)*$","description":"All first names of the person according to the identification document"},"lastName":{"type":"string","maxLength":255},"birthDay":{"type":"string","format":"date"},"birthPlace":{"type":"string","maxLength":255},"birthCountry":{"$ref":"#/components/schemas/CountryEnum"},"nationalities":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/CountryEnum"}},"mainAddress":{"$ref":"#/components/schemas/Address"},"contact":{"$ref":"#/components/schemas/Contact"},"type":{"$ref":"#/components/schemas/UserTypeEnum"}},"required":["gender","firstName","lastName","birthDay","birthPlace","birthCountry","nationalities","mainAddress","contact","type"]},"GenderEnum":{"title":"GenderEnum","type":"string","description":"Gender","enum":["MALE","FEMALE","DIVERSE"]},"CountryEnum":{"title":"CountryEnum","type":"string","description":"Country code in **ISO 3166-1 alpha-2** standard","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","VG","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","HK","MO","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VI","WF","EH","YE","ZM","ZW","XK"]},"Address":{"title":"Address","type":"object","description":"Address","properties":{"street":{"type":"string","maxLength":255},"streetNumber":{"type":"string","maxLength":20},"city":{"type":"string","maxLength":255},"zip":{"type":"string","minLength":3,"maxLength":12},"state":{"type":"string","minLength":1,"maxLength":35},"country":{"$ref":"#/components/schemas/CountryEnum"},"additionalInfo":{"type":"string"}},"required":["street","streetNumber","city","zip","country"]},"Contact":{"title":"Contact","type":"object","description":"⚠️ **Important Note on Partial Updates:** Although update endpoints use the `PATCH` method, the `contact` object requires a **full representation** of the data. If optional fields (such as `fax` or `website`) are omitted from the request, they will be overwritten with `null` in the database. To preserve existing data, ensure all current contact values are included in your request payload.","properties":{"phone":{"type":"string","description":"Mobile telephone number","pattern":"^\\+[1-9][0-9]{0,24}$"},"email":{"type":"string","description":"E-mail address","maxLength":255,"pattern":"^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"},"fax":{"type":"string","description":"Fax number","minLength":3,"maxLength":20,"pattern":"^[\\+\\-\\(\\)\\d ]{3,20}$"},"website":{"type":"string","description":"website address","maxLength":320}},"required":["phone","email"]},"UserTypeEnum":{"title":"UserTypeEnum","type":"string","enum":["ADMIN"]}}},"paths":{"/users":{"post":{"summary":"Create User","operationId":"create-user","description":"Create a user. Provided email needs to be unique.\n\nData provided will be used to create credentials to access Partner Panel. Specifically, provided\nemail will be used to identify created account. This means that email needs to be unique.","tags":["Users"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserData"}}}}}}}}
```

## Reset user password

> Resend email with initial password if it is expired.

```json
{"openapi":"3.0.1","info":{"title":"Users","version":"1.0"},"tags":[{"name":"Users","description":"Users domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","scopes":{}}}}},"schemas":{"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/users/{userId}/reset-password":{"get":{"summary":"Reset user password","operationId":"reset-user-password","description":"Resend email with initial password if it is expired.","tags":["Users"],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}
```

## Reset user password

> Resend email with initial password if it is expired.

```json
{"openapi":"3.0.1","info":{"title":"Users","version":"1.0"},"tags":[{"name":"Users","description":"Users domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","scopes":{}}}}},"schemas":{"ResetPasswordRequest":{"title":"ResetPasswordRequest","type":"object","properties":{"email":{"type":"string","description":"E-mail address","maxLength":255,"pattern":"^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"}},"required":["email"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/v2/users/reset-password":{"post":{"summary":"Reset user password","operationId":"reset-user-password-v2","description":"Resend email with initial password if it is expired.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}
```

## GET /user-onboardings

> Get User Onboardings

```json
{"openapi":"3.0.1","info":{"title":"Users","version":"1.0"},"tags":[{"name":"Users","description":"Users domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","scopes":{}}}}},"schemas":{"UserOnboarding":{"title":"UserOnboarding","properties":{"onboardingId":{"type":"string","format":"uuid","readOnly":true},"status":{"$ref":"#/components/schemas/UserOnboardingStatusEnum"},"userId":{"type":"string","format":"uuid"},"createdOn":{"type":"string","format":"date-time","readOnly":true},"modifiedOn":{"type":"string","format":"date-time","readOnly":true}},"required":["onboardingId","status","userId","createdOn","modifiedOn"]},"UserOnboardingStatusEnum":{"title":"UserOnboardingStatusEnum","type":"string","enum":["CREATED","PENDING","APPROVED","REJECTED","RECEIVED","INVALID"],"readOnly":true},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/user-onboardings":{"get":{"summary":"Get User Onboardings","operationId":"get-user-onboardings","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"userId","in":"query","required":true,"description":"Unique identification number of onboarded user type in UUID format."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserOnboarding"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"tags":["Users"]}}}}
```

## POST /user-onboardings

> Start User Onboarding

```json
{"openapi":"3.0.1","info":{"title":"Users","version":"1.0"},"tags":[{"name":"Users","description":"Users domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","scopes":{}}}}},"schemas":{"StartUserOnboardingResult":{"title":"StartUserOnboardingResult","type":"object","properties":{"onboardingId":{"type":"string","format":"uuid","readOnly":true}},"required":["onboardingId"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"UserOnboardingData":{"title":"UserOnboardingData","type":"object","properties":{"userId":{"type":"string","format":"uuid"}},"required":["userId"]}}},"paths":{"/user-onboardings":{"post":{"summary":"Start User Onboarding","operationId":"start-user-onboarding","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartUserOnboardingResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOnboardingData"}}}},"tags":["Users"]}}}}
```

## GET /user-onboardings/{onboardingId}

> Get User Onboarding

```json
{"openapi":"3.0.1","info":{"title":"Users","version":"1.0"},"tags":[{"name":"Users","description":"Users domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","scopes":{}}}}},"schemas":{"UserOnboarding":{"title":"UserOnboarding","properties":{"onboardingId":{"type":"string","format":"uuid","readOnly":true},"status":{"$ref":"#/components/schemas/UserOnboardingStatusEnum"},"userId":{"type":"string","format":"uuid"},"createdOn":{"type":"string","format":"date-time","readOnly":true},"modifiedOn":{"type":"string","format":"date-time","readOnly":true}},"required":["onboardingId","status","userId","createdOn","modifiedOn"]},"UserOnboardingStatusEnum":{"title":"UserOnboardingStatusEnum","type":"string","enum":["CREATED","PENDING","APPROVED","REJECTED","RECEIVED","INVALID"],"readOnly":true},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/user-onboardings/{onboardingId}":{"get":{"summary":"Get User Onboarding","operationId":"get-user-onboarding","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOnboarding"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"tags":["Users"]}}}}
```

## Get Users

> Get list of users

```json
{"openapi":"3.0.1","info":{"title":"Users","version":"1.0"},"tags":[{"name":"Users","description":"Users domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","scopes":{}}}}},"schemas":{"Users":{"title":"Users","type":"object","properties":{"data":{"type":"array","description":"Array of users","items":{"$ref":"#/components/schemas/User"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"User":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","description":"Unique identification number in UUID format","readOnly":true},"globalId":{"type":"string","minLength":12,"maxLength":12,"description":"Global ID of the user"},"status":{"$ref":"#/components/schemas/UserStatusEnum"},"createdOn":{"type":"string","format":"date-time","description":"The date of creation","readOnly":true},"modifiedOn":{"type":"string","format":"date-time","description":"The date of last modification","readOnly":true},"gender":{"$ref":"#/components/schemas/GenderEnum"},"firstName":{"type":"string","maxLength":255,"pattern":"^\\S+( \\S+)*$","description":"All first names of the person according to the identification document"},"lastName":{"type":"string","maxLength":255},"birthDay":{"type":"string","format":"date"},"birthPlace":{"type":"string","maxLength":255},"birthCountry":{"$ref":"#/components/schemas/CountryEnum"},"nationalities":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/CountryEnum"}},"mainAddress":{"$ref":"#/components/schemas/Address"},"contact":{"$ref":"#/components/schemas/Contact"},"type":{"$ref":"#/components/schemas/UserTypeEnum"}},"required":["birthCountry","birthDay","birthPlace","contact","createdOn","firstName","gender","globalId","lastName","mainAddress","modifiedOn","nationalities","status","type","userId"],"title":"User"},"UserStatusEnum":{"title":"UserStatusEnum","type":"string","enum":["RECEIVED","INVALID","CREATED","ACTIVE","REJECTED","SUSPENDED","INACTIVE"],"description":"Current customer status","readOnly":true},"GenderEnum":{"title":"GenderEnum","type":"string","description":"Gender","enum":["MALE","FEMALE","DIVERSE"]},"CountryEnum":{"title":"CountryEnum","type":"string","description":"Country code in **ISO 3166-1 alpha-2** standard","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","VG","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","HK","MO","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VI","WF","EH","YE","ZM","ZW","XK"]},"Address":{"title":"Address","type":"object","description":"Address","properties":{"street":{"type":"string","maxLength":255},"streetNumber":{"type":"string","maxLength":20},"city":{"type":"string","maxLength":255},"zip":{"type":"string","minLength":3,"maxLength":12},"state":{"type":"string","minLength":1,"maxLength":35},"country":{"$ref":"#/components/schemas/CountryEnum"},"additionalInfo":{"type":"string"}},"required":["street","streetNumber","city","zip","country"]},"Contact":{"title":"Contact","type":"object","description":"⚠️ **Important Note on Partial Updates:** Although update endpoints use the `PATCH` method, the `contact` object requires a **full representation** of the data. If optional fields (such as `fax` or `website`) are omitted from the request, they will be overwritten with `null` in the database. To preserve existing data, ensure all current contact values are included in your request payload.","properties":{"phone":{"type":"string","description":"Mobile telephone number","pattern":"^\\+[1-9][0-9]{0,24}$"},"email":{"type":"string","description":"E-mail address","maxLength":255,"pattern":"^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"},"fax":{"type":"string","description":"Fax number","minLength":3,"maxLength":20,"pattern":"^[\\+\\-\\(\\)\\d ]{3,20}$"},"website":{"type":"string","description":"website address","maxLength":320}},"required":["phone","email"]},"UserTypeEnum":{"title":"UserTypeEnum","type":"string","enum":["ADMIN"]},"Pagination":{"title":"Pagination","type":"object","properties":{"cursor":{"type":"string","description":"String value used for pagination, which should be set in next page request."},"limit":{"type":"integer","description":"Maximum number of returned items"}},"required":["cursor","limit"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/users":{"get":{"summary":"Get Users","operationId":"get-users","description":"Get list of users","tags":["Users"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"parameters":[{"schema":{"type":"string"},"in":"query","name":"cursor","description":"String value used for pagination"},{"schema":{"type":"integer","minimum":1,"default":20},"in":"query","name":"limit","description":"Maximum number of items to return","required":true},{"schema":{"$ref":"#/components/schemas/UserTypeEnum"},"in":"query","name":"userType","description":"User type filter"},{"schema":{"$ref":"#/components/schemas/UserStatusEnum"},"in":"query","name":"userStatus","description":"User status filter"},{"schema":{"type":"string"},"in":"query","name":"firstName","description":"String value used for firstName","required":false},{"schema":{"type":"string"},"in":"query","name":"lasttName","description":"String value used for lastName","required":false},{"schema":{"type":"string"},"in":"query","name":"email","description":"String value used for email","required":false},{"schema":{"type":"string"},"in":"query","name":"userId","description":"Uuid value used for userId","required":false},{"schema":{"type":"string"},"in":"query","name":"globalId","description":"String value used for globalId","required":false}]}}}}
```

## Get User

> Get user

```json
{"openapi":"3.0.1","info":{"title":"Users","version":"1.0"},"tags":[{"name":"Users","description":"Users domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","scopes":{}}}}},"schemas":{"UserExtended":{"type":"object","properties":{"mfaType":{"$ref":"#/components/schemas/UserMfaTypeEnum"},"userId":{"type":"string","format":"uuid","description":"Unique identification number in UUID format","readOnly":true},"globalId":{"type":"string","minLength":12,"maxLength":12,"description":"Global ID of the user"},"status":{"$ref":"#/components/schemas/UserStatusEnum"},"createdOn":{"type":"string","format":"date-time","description":"The date of creation","readOnly":true},"modifiedOn":{"type":"string","format":"date-time","description":"The date of last modification","readOnly":true},"gender":{"$ref":"#/components/schemas/GenderEnum"},"firstName":{"type":"string","maxLength":255,"pattern":"^\\S+( \\S+)*$","description":"All first names of the person according to the identification document"},"lastName":{"type":"string","maxLength":255},"birthDay":{"type":"string","format":"date"},"birthPlace":{"type":"string","maxLength":255},"birthCountry":{"$ref":"#/components/schemas/CountryEnum"},"nationalities":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/CountryEnum"}},"mainAddress":{"$ref":"#/components/schemas/Address"},"contact":{"$ref":"#/components/schemas/Contact"},"type":{"$ref":"#/components/schemas/UserTypeEnum"}},"required":["birthCountry","birthDay","birthPlace","contact","createdOn","firstName","gender","globalId","lastName","mainAddress","mfaType","modifiedOn","nationalities","status","type","userId"],"title":"UserExtended"},"UserMfaTypeEnum":{"title":"UserMfaTypeEnum","type":"string","enum":["SMS","TOKEN"]},"UserStatusEnum":{"title":"UserStatusEnum","type":"string","enum":["RECEIVED","INVALID","CREATED","ACTIVE","REJECTED","SUSPENDED","INACTIVE"],"description":"Current customer status","readOnly":true},"GenderEnum":{"title":"GenderEnum","type":"string","description":"Gender","enum":["MALE","FEMALE","DIVERSE"]},"CountryEnum":{"title":"CountryEnum","type":"string","description":"Country code in **ISO 3166-1 alpha-2** standard","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","VG","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","HK","MO","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VI","WF","EH","YE","ZM","ZW","XK"]},"Address":{"title":"Address","type":"object","description":"Address","properties":{"street":{"type":"string","maxLength":255},"streetNumber":{"type":"string","maxLength":20},"city":{"type":"string","maxLength":255},"zip":{"type":"string","minLength":3,"maxLength":12},"state":{"type":"string","minLength":1,"maxLength":35},"country":{"$ref":"#/components/schemas/CountryEnum"},"additionalInfo":{"type":"string"}},"required":["street","streetNumber","city","zip","country"]},"Contact":{"title":"Contact","type":"object","description":"⚠️ **Important Note on Partial Updates:** Although update endpoints use the `PATCH` method, the `contact` object requires a **full representation** of the data. If optional fields (such as `fax` or `website`) are omitted from the request, they will be overwritten with `null` in the database. To preserve existing data, ensure all current contact values are included in your request payload.","properties":{"phone":{"type":"string","description":"Mobile telephone number","pattern":"^\\+[1-9][0-9]{0,24}$"},"email":{"type":"string","description":"E-mail address","maxLength":255,"pattern":"^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"},"fax":{"type":"string","description":"Fax number","minLength":3,"maxLength":20,"pattern":"^[\\+\\-\\(\\)\\d ]{3,20}$"},"website":{"type":"string","description":"website address","maxLength":320}},"required":["phone","email"]},"UserTypeEnum":{"title":"UserTypeEnum","type":"string","enum":["ADMIN"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/users/{userId}":{"get":{"summary":"Get User","operationId":"get-user","description":"Get user","tags":["Users"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExtended"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}
```

## Update User

> Update user

```json
{"openapi":"3.0.1","info":{"title":"Users","version":"1.0"},"tags":[{"name":"Users","description":"Users domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","scopes":{}}}}},"schemas":{"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"UserUpdate":{"title":"UserUpdate","type":"object","properties":{"lastName":{"type":"string","maxLength":255},"nationalities":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/CountryEnum"}},"mainAddress":{"$ref":"#/components/schemas/Address"},"contact":{"$ref":"#/components/schemas/ContactUpdate"},"status":{"$ref":"#/components/schemas/UserStatusUpdateEnum"},"mfaType":{"$ref":"#/components/schemas/UserMFATypeUpdateEnum"}}},"CountryEnum":{"title":"CountryEnum","type":"string","description":"Country code in **ISO 3166-1 alpha-2** standard","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","VG","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","HK","MO","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VI","WF","EH","YE","ZM","ZW","XK"]},"Address":{"title":"Address","type":"object","description":"Address","properties":{"street":{"type":"string","maxLength":255},"streetNumber":{"type":"string","maxLength":20},"city":{"type":"string","maxLength":255},"zip":{"type":"string","minLength":3,"maxLength":12},"state":{"type":"string","minLength":1,"maxLength":35},"country":{"$ref":"#/components/schemas/CountryEnum"},"additionalInfo":{"type":"string"}},"required":["street","streetNumber","city","zip","country"]},"ContactUpdate":{"title":"ContactUpdate","type":"object","description":"⚠️ **Important Note on Partial Updates:** Although this endpoint uses the `PATCH` method, the `contact` object requires a **full representation** of the data. If optional fields (such as `fax` or `website`) are omitted from the request, they will be overwritten with `null` in the database. To preserve existing data, ensure all current contact values are included in your request payload.","properties":{"phone":{"type":"string","description":"Mobile telephone number","pattern":"^\\+[1-9][0-9]{0,24}$"},"fax":{"type":"string","description":"Fax number","minLength":3,"maxLength":20,"pattern":"^[\\+\\-\\(\\)\\d ]{3,20}$"},"website":{"type":"string","description":"website address","maxLength":320}},"required":["phone"]},"UserStatusUpdateEnum":{"title":"UserStatusUpdateEnum","description":"Update to INACTIVE or SUSPENDED is possible only from ACTIVE status. It will disable user access to API. Update to ACTIVE is possible only from SUSPENDED. It will enable user access to API.","type":"string","enum":["INACTIVE","SUSPENDED","ACTIVE"]},"UserMFATypeUpdateEnum":{"title":"UserMFATypeUpdateEnum","description":"Sending request with `SMS` will switch MFA to SMS until the next time user login. After that method will be switched to TOTP again.","type":"string","enum":["SMS"]}}},"paths":{"/users/{userId}":{"patch":{"summary":"Update User","operationId":"update-user","description":"Update user","tags":["Users"],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tradevest.ai/api-reference/user-management/users.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
