# Upload CloudFiles File

Upload a file to the CloudFiles library using the upload URL returned from the upload session. This step transfers the actual file to CloudFiles library.

> Kind: REST endpoint · Updated: Mar 6, 2026 · PUT {{upload-url-from-get-file-upload-session}}

Upload a file to the CloudFiles library using the upload URL returned from the upload session. This step transfers the actual file to CloudFiles library.

### Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| upload-url-from-get-file-upload-session | string | required |  |

### Header parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | optional | Replace the API_Key placeholder with your actual API key. |

## Example request

**cURL**
```bash
curl --request PUT \
     --url {{upload-url-from-get-file-upload-session}} \
     --header 'accept: application/json' \
     --header 'authorization: Bearer API_Key'
```

**JavaScript**
```js
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("authorization", "Bearer API_Key");

var requestOptions = {
   method: 'PUT',
   headers: myHeaders,
   redirect: 'follow'
};

fetch("{{upload-url-from-get-file-upload-session}}", requestOptions)
   .then(response => response.text())
   .then(result => console.log(result))
   .catch(error => console.log('error', error));
```

**Ruby**
```ruby
require "uri"
require "json"
require "net/http"

url = URI("{{upload-url-from-get-file-upload-session}}")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Put.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["authorization"] = "Bearer API_Key"

response = http.request(request)
puts response.read_body

```

**Python**
```py
import requests
import json

url = "{{upload-url-from-get-file-upload-session}}"

payload = {}
headers = {
   'accept': 'application/json',
   'content-type': 'application/json',
   'authorization': 'Bearer API_Key'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)

```
