# Users

User management

## Get all users

> Retrieve list of all users

```json
{"openapi":"3.1.0","info":{"title":"Minit Money Enterprise API","version":"1.12.8"},"tags":[{"name":"Users","description":"User management"}],"servers":[{"url":"/api/v1","description":"API v1"},{"url":"/","description":"API v0 (Legacy)"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for tenant authentication"}},"schemas":{"UserListResponse":{"type":"array","items":{"$ref":"#/components/schemas/UserDetails"}},"UserDetails":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the user"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when user was created"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when user was last updated"},"deletedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when user was deleted (soft delete)"},"fullNames":{"type":"string","description":"User's full first and middle names"},"lastName":{"type":"string","description":"User's last name"},"dateOfBirth":{"type":"string","description":"Date of birth"},"documentType":{"type":"string","description":"Type of identification document"},"documentNumber":{"type":"string","description":"Identification document number"},"documentCountry":{"type":"string","description":"Country that issued the document"},"documentExpiryDate":{"type":"string","description":"Document expiry date"},"mobileNumber":{"type":"string","description":"Mobile phone number"},"isVerified":{"type":"boolean","description":"Whether the user has been verified"},"tenantId":{"type":"string","description":"Unique identifier of the tenant this user belongs to"},"azaId":{"type":["string","null"],"description":"External Aza Finance user ID"}}}}},"paths":{"/user":{"get":{"tags":["Users"],"summary":"Get all users","description":"Retrieve list of all users","operationId":"getUsers","responses":{"200":{"description":"Successfully retrieved list of users for the tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserListResponse"}}}}}}}}}
```

## Create user

> Create a new user

```json
{"openapi":"3.1.0","info":{"title":"Minit Money Enterprise API","version":"1.12.8"},"tags":[{"name":"Users","description":"User management"}],"servers":[{"url":"/api/v1","description":"API v1"},{"url":"/","description":"API v0 (Legacy)"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for tenant authentication"}},"schemas":{"CreateUserDto":{"type":"object","required":["fullNames","lastName","dateOfBirth","documentType","documentNumber","documentCountry","documentExpiryDate","mobileNumber"],"properties":{"fullNames":{"type":"string","description":"User's full first and middle names"},"lastName":{"type":"string","description":"User's last name"},"dateOfBirth":{"type":"string","description":"Date of birth in YYYY-MM-DD format"},"documentType":{"type":"string","description":"Type of identification document (e.g., passport, national_id)"},"documentNumber":{"type":"string","description":"Identification document number"},"documentCountry":{"type":"string","description":"Country that issued the document"},"documentExpiryDate":{"type":"string","description":"Document expiry date in YYYY-MM-DD format"},"mobileNumber":{"type":"string","description":"Mobile phone number in international E.164 format"}}},"UserDetails":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the user"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when user was created"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when user was last updated"},"deletedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when user was deleted (soft delete)"},"fullNames":{"type":"string","description":"User's full first and middle names"},"lastName":{"type":"string","description":"User's last name"},"dateOfBirth":{"type":"string","description":"Date of birth"},"documentType":{"type":"string","description":"Type of identification document"},"documentNumber":{"type":"string","description":"Identification document number"},"documentCountry":{"type":"string","description":"Country that issued the document"},"documentExpiryDate":{"type":"string","description":"Document expiry date"},"mobileNumber":{"type":"string","description":"Mobile phone number"},"isVerified":{"type":"boolean","description":"Whether the user has been verified"},"tenantId":{"type":"string","description":"Unique identifier of the tenant this user belongs to"},"azaId":{"type":["string","null"],"description":"External Aza Finance user ID"}}}}},"paths":{"/user":{"post":{"tags":["Users"],"summary":"Create user","description":"Create a new user","operationId":"createUser","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserDto"}}}},"responses":{"201":{"description":"User created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetails"}}}},"400":{"description":"Bad request - Invalid input data","content":{"application/json":{}}},"401":{"description":"Unauthorized - Invalid or missing API key"},"409":{"description":"Conflict - User already exists"},"500":{"description":"Internal server error"}}}}}}
```

## Get user by ID

> Retrieve user by ID

```json
{"openapi":"3.1.0","info":{"title":"Minit Money Enterprise API","version":"1.12.8"},"tags":[{"name":"Users","description":"User management"}],"servers":[{"url":"/api/v1","description":"API v1"},{"url":"/","description":"API v0 (Legacy)"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for tenant authentication"}},"schemas":{"UserDetails":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the user"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when user was created"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when user was last updated"},"deletedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when user was deleted (soft delete)"},"fullNames":{"type":"string","description":"User's full first and middle names"},"lastName":{"type":"string","description":"User's last name"},"dateOfBirth":{"type":"string","description":"Date of birth"},"documentType":{"type":"string","description":"Type of identification document"},"documentNumber":{"type":"string","description":"Identification document number"},"documentCountry":{"type":"string","description":"Country that issued the document"},"documentExpiryDate":{"type":"string","description":"Document expiry date"},"mobileNumber":{"type":"string","description":"Mobile phone number"},"isVerified":{"type":"boolean","description":"Whether the user has been verified"},"tenantId":{"type":"string","description":"Unique identifier of the tenant this user belongs to"},"azaId":{"type":["string","null"],"description":"External Aza Finance user ID"}}}}},"paths":{"/user/{id}":{"get":{"tags":["Users"],"summary":"Get user by ID","description":"Retrieve user by ID","operationId":"getUserById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved user details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetails"}}}},"404":{"description":"User not found","content":{"application/json":{}}}}}}}}
```

## Update user

> Update user by ID

```json
{"openapi":"3.1.0","info":{"title":"Minit Money Enterprise API","version":"1.12.8"},"tags":[{"name":"Users","description":"User management"}],"servers":[{"url":"/api/v1","description":"API v1"},{"url":"/","description":"API v0 (Legacy)"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for tenant authentication"}},"schemas":{"UserDetails":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the user"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when user was created"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when user was last updated"},"deletedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when user was deleted (soft delete)"},"fullNames":{"type":"string","description":"User's full first and middle names"},"lastName":{"type":"string","description":"User's last name"},"dateOfBirth":{"type":"string","description":"Date of birth"},"documentType":{"type":"string","description":"Type of identification document"},"documentNumber":{"type":"string","description":"Identification document number"},"documentCountry":{"type":"string","description":"Country that issued the document"},"documentExpiryDate":{"type":"string","description":"Document expiry date"},"mobileNumber":{"type":"string","description":"Mobile phone number"},"isVerified":{"type":"boolean","description":"Whether the user has been verified"},"tenantId":{"type":"string","description":"Unique identifier of the tenant this user belongs to"},"azaId":{"type":["string","null"],"description":"External Aza Finance user ID"}}}}},"paths":{"/user/{id}":{"put":{"tags":["Users"],"summary":"Update user","description":"Update user by ID","operationId":"updateUser","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"User updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetails"}}}},"400":{"description":"Bad request - Invalid input data or user has been verified","content":{"application/json":{}}},"401":{"description":"Unauthorized - Invalid or missing API key"},"404":{"description":"Not found - User does not exist"},"500":{"description":"Internal server error"}}}}}}
```

## Delete user

> Delete user by ID

```json
{"openapi":"3.1.0","info":{"title":"Minit Money Enterprise API","version":"1.12.8"},"tags":[{"name":"Users","description":"User management"}],"servers":[{"url":"/api/v1","description":"API v1"},{"url":"/","description":"API v0 (Legacy)"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for tenant authentication"}}},"paths":{"/user/{id}":{"delete":{"tags":["Users"],"summary":"Delete user","description":"Delete user by ID","operationId":"deleteUser","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"User deleted successfully","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized - Invalid or missing API key"},"404":{"description":"Not found - User does not exist"},"500":{"description":"Internal server error"}}}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.minitmoney.enterprises/raas-api/users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
