# Users

## Get profile

> Retrieves the profile of the authenticated client.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/profile/me":{"get":{"tags":["Users"],"summary":"Get profile","description":"Retrieves the profile of the authenticated client.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Profile retrieved successfully."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Collect User metrics

> Collects metrics for the authenticated client.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/dashboard/collect-metrics":{"get":{"tags":["Users"],"summary":"Collect User metrics","description":"Collects metrics for the authenticated client.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Metrics collected successfully."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Create directory

> Creates a new directory in the specified parent directory. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/directories":{"post":{"tags":["Users"],"summary":"Create directory","description":"Creates a new directory in the specified parent directory. Requires authentication.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"directory_id":{"type":"string","description":"The parent directory ID where the new directory will be created. If not provided, the new directory will be created in the root directory."},"name":{"type":"string","description":"The name of the new directory."}},"required":["name"]}}}},"parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true}],"responses":{"201":{"description":"Directory created successfully. Returns the created directory details."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Read directory

> Retrieves details of a specific directory by its ID. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/directories/{directory_id}":{"get":{"tags":["Users"],"summary":"Read directory","description":"Retrieves details of a specific directory by its ID. Requires authentication.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true},{"name":"directory_id","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the directory to retrieve. Pass 'root' to retrieve the root directory."}],"responses":{"200":{"description":"Directory details retrieved successfully."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Update directory

> Updates the name or parent directory of a specified directory. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/directories/{directory_id}":{"put":{"tags":["Users"],"summary":"Update directory","description":"Updates the name or parent directory of a specified directory. Requires authentication.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"directory_id":{"type":"string","description":"The target directory ID to move this directory to."},"name":{"type":"string","description":"The new name for the directory."}}}}}},"parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true},{"name":"directory_id","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the directory to update."}],"responses":{"200":{"description":"Directory updated successfully. Returns the updated directory details."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Delete directory

> Deletes a directory by its ID. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/directories/{directory_id}":{"delete":{"tags":["Users"],"summary":"Delete directory","description":"Deletes a directory by its ID. Requires authentication.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true},{"name":"directory_id","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the directory to delete."}],"responses":{"201":{"description":"Directory deleted successfully. Returns a success message."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Delete multiple directories

> Deletes multiple directories by their IDs. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/directories/delete":{"delete":{"tags":["Users"],"summary":"Delete multiple directories","description":"Deletes multiple directories by their IDs. Requires authentication.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"directory_ids":{"type":"array","items":{"type":"string"},"description":"List of directory IDs to delete."}}}}}},"responses":{"200":{"description":"Directories deleted successfully. Returns a success message with details."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Move multiple directories files

> Moves multiple directories to a specified directory. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/directories/move":{"post":{"tags":["Users"],"summary":"Move multiple directories files","description":"Moves multiple directories to a specified directory. Requires authentication.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_directory_id":{"type":"string","description":"The ID of the target directory to move the directories to."},"directory_ids":{"type":"array","items":{"type":"string"},"description":"List of directory IDs to move."}},"required":["target_directory_id","directory_ids"]}}}},"responses":{"200":{"description":"Directories moved successfully. Returns the updated file details."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Upload file

> Uploads a new file to the specified directory. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/files":{"post":{"tags":["Users"],"summary":"Upload file","description":"Uploads a new file to the specified directory. Requires authentication.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"directory_id":{"type":"string","description":"The ID of the directory to upload the file to. If not provided, the file will be uploaded to the root directory."},"passphrase":{"type":"string","description":"If provided, the file upload will be encrypted with this passphrase. Must be at least 8 characters long, include 1 uppercase letter, 1 number, and 1 special character (!@#$%^&*()_+). Encrypted files are limited to 50MB."}},"required":["file"]}}}},"parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true}],"responses":{"201":{"description":"File uploaded successfully. Returns the uploaded file details."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Download file

> Downloads a file by its ID. Requires authentication. For encrypted files, use \`stream=false\` and provide the \`Passphrase\` header.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/files/{file_id}/download":{"get":{"tags":["Users"],"summary":"Download file","description":"Downloads a file by its ID. Requires authentication. For encrypted files, use `stream=false` and provide the `Passphrase` header.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true},{"name":"file_id","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the file to download."},{"name":"stream","in":"query","schema":{"type":"boolean"},"required":false,"description":"Set to `false` to download encrypted files. Defaults to `true` for streaming."},{"name":"Passphrase","in":"header","schema":{"type":"string"},"required":false,"description":"Passphrase to decrypt the file if it was uploaded with encryption."}],"responses":{"200":{"description":"File downloaded successfully. Returns the downloaded file."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Read file

> Retrieves details of a specific file by its ID. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/files/{file_id}":{"get":{"tags":["Users"],"summary":"Read file","description":"Retrieves details of a specific file by its ID. Requires authentication.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true},{"name":"file_id","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the file to retrieve."},{"name":"include_chunks","in":"query","schema":{"type":"boolean","default":false},"required":false,"description":"Set to true to include the IPFS chunks in the response. Defaults to false if not provided."}],"responses":{"200":{"description":"File details retrieved successfully."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Update file

> Updates the name or parent directory of a specified file. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/files/{file_id}":{"put":{"tags":["Users"],"summary":"Update file","description":"Updates the name or parent directory of a specified file. Requires authentication.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"directory_id":{"type":"string","description":"The target directory ID to move this file to."},"name":{"type":"string","description":"The new name for the file."}}}}}},"parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true},{"name":"file_id","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the file to update."}],"responses":{"200":{"description":"File updated successfully. Returns the updated file details."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Delete file

> Deletes a file by its ID. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/files/{file_id}":{"delete":{"tags":["Users"],"summary":"Delete file","description":"Deletes a file by its ID. Requires authentication.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true},{"name":"file_id","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the file to delete."}],"responses":{"201":{"description":"File deleted successfully. Returns a success message."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Delete multiple files

> Deletes multiple files by their IDs. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/files/delete":{"delete":{"tags":["Users"],"summary":"Delete multiple files","description":"Deletes multiple files by their IDs. Requires authentication.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_ids":{"type":"array","items":{"type":"string"},"description":"List of file IDs to delete."}}}}}},"responses":{"200":{"description":"Files deleted successfully. Returns a success message with details."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Move multiple files

> Moves multiple files to a specified directory. Requires authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/files/move":{"post":{"tags":["Users"],"summary":"Move multiple files","description":"Moves multiple files to a specified directory. Requires authentication.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"directory_id":{"type":"string","description":"The ID of the target directory to move the files to."},"file_ids":{"type":"array","items":{"type":"string"},"description":"List of file IDs to move."}},"required":["directory_id","file_ids"]}}}},"responses":{"200":{"description":"Files moved successfully. Returns the updated file details."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Generate temporary token

> Generates a temporary token with a specified duration for downloading a file. Requires a valid Bearer token for authentication.

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/files/{file_id}/generate-link":{"post":{"tags":["Users"],"summary":"Generate temporary token","description":"Generates a temporary token with a specified duration for downloading a file. Requires a valid Bearer token for authentication.","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true},{"name":"file_id","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the file to generate a link for."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"duration":{"type":"integer","description":"Duration of the link validity in seconds."}},"required":["duration"]}}}},"responses":{"200":{"description":"Successfully generated a temporary token."},"401":{"description":"Unauthorized. Invalid or missing Bearer token."},"404":{"description":"File not found."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```

## Share file

> Shares a file with specified access settings. Requires authentication. Request body is optional unless access is 'password' (requires password) or 'email' (requires emails).

```json
{"openapi":"3.0.0","info":{"title":"Koneksi API Services","version":"1.0.0"},"servers":[{"url":"https://uat.koneksi.co.kr","description":"UAT"},{"url":"https://staging.koneksi.co.kr","description":"Staging"}],"paths":{"/clients/v1/files/{file}/share":{"post":{"tags":["Users"],"summary":"Share file","description":"Shares a file with specified access settings. Requires authentication. Request body is optional unless access is 'password' (requires password) or 'email' (requires emails).","parameters":[{"name":"Client-ID","in":"header","schema":{"type":"string"},"required":true},{"name":"Client-Secret","in":"header","schema":{"type":"string"},"required":true},{"name":"file","in":"path","description":"The ID of the file to share.","required":true,"schema":{"type":"string"}},{"name":"access","in":"query","description":"The access level for the shared file (public, private, password, email).","required":true,"schema":{"type":"string","enum":["public","private","password","email"]}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"Password required for 'password' access. Must be at least 8 characters long, include 1 uppercase letter, 1 number, and 1 special character (!@#$%^&*()_+). Required if access is 'password'."},"emails":{"type":"array","items":{"type":"string"},"description":"List of email addresses for 'email' access. Required if access is 'email'. The email must have an account in Koneksi."}}}}}},"responses":{"200":{"description":"File shared successfully."},"400":{"description":"Bad request. Missing required fields (e.g., password for 'password' access, emails for 'email' access)."},"401":{"description":"Unauthorized. Valid Client-ID and Client-Secret required."},"500":{"description":"Server error. An error occurred while processing the request."}}}}}}
```
