# FilesApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteFile**](#deletefile) | **DELETE** /files/{fileId} | Delete a file|
|[**updateFile**](#updatefile) | **PUT** /files/{fileId} | Update a file|

# **deleteFile**
> CreateAccountInvitations200Response deleteFile()

Permanently deletes a stored file and its underlying storage object, requiring the delete storage permission.

### Example

```typescript
import {
    FilesApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new FilesApi(configuration);

let fileId: string; //The file identifier (default to undefined)

const { status, data } = await apiInstance.deleteFile(
    fileId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **fileId** | [**string**] | The file identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **updateFile**
> UploadFile200Response updateFile(fileUpdateInputs)

Updates metadata for an existing stored file, such as its name, requiring the update storage permission.

### Example

```typescript
import {
    FilesApi,
    Configuration,
    FileUpdateInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new FilesApi(configuration);

let fileId: string; //The file identifier (default to undefined)
let fileUpdateInputs: FileUpdateInputs; //

const { status, data } = await apiInstance.updateFile(
    fileId,
    fileUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **fileUpdateInputs** | **FileUpdateInputs**|  | |
| **fileId** | [**string**] | The file identifier | defaults to undefined|


### Return type

**UploadFile200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

