# PortainerApi.UploadApi All URIs are relative to *http://portainer.domain/api* Method | HTTP request | Description ------------- | ------------- | ------------- [**uploadTLS**](UploadApi.md#uploadTLS) | **POST** /upload/tls/{certificate} | Upload TLS files # **uploadTLS** > uploadTLS(certificate, folder, opts) Upload TLS files Use this endpoint to upload TLS files. **Access policy**: administrator ### Example ```javascript var PortainerApi = require('portainer_api'); var defaultClient = PortainerApi.ApiClient.instance; // Configure API key authorization: jwt var jwt = defaultClient.authentications['jwt']; jwt.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //jwt.apiKeyPrefix = 'Token'; var apiInstance = new PortainerApi.UploadApi(); var certificate = "certificate_example"; // String | TLS file type. Valid values are 'ca', 'cert' or 'key'. var folder = "folder_example"; // String | Folder where the TLS file will be stored. Will be created if not existing. var opts = { 'file': "/path/to/file.txt" // File | The file to upload. }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.uploadTLS(certificate, folder, opts, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **certificate** | **String**| TLS file type. Valid values are 'ca', 'cert' or 'key'. | **folder** | **String**| Folder where the TLS file will be stored. Will be created if not existing. | **file** | **File**| The file to upload. | [optional] ### Return type null (empty response body) ### Authorization [jwt](../README.md#jwt) ### HTTP request headers - **Content-Type**: multipart/form-data - **Accept**: application/json