# Upload zip files to a raw repository using rest API

**URL:** https://community.sonatype.com/t/upload-zip-files-to-a-raw-repository-using-rest-api/5220
**Category:** Sonatype Nexus Repository
**Tags:** nexus-repository
**Created:** [October 26, 2020, 6:37pm UTC](https://community.sonatype.com/t/upload-zip-files-to-a-raw-repository-using-rest-api/5220 "2020-10-26T18:37:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![demianpelos](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@demianpelos](https://community.sonatype.com/u/demianpelos)
#### Post date: [October 26, 2020, 6:37pm UTC](https://community.sonatype.com/t/upload-zip-files-to-a-raw-repository-using-rest-api/5220/1 "2020-10-26T18:37:09Z")

</div>

I need to upload some zip files to a repository, we are using Raw since they are just files that later on we will download and we are only keeping them for versioning

so i have a local zip file and a repository in nexus, how can i upload it using API, do i need to create a folder in the repository first? or when i upload it the file i can specify the path and the API will create the folder structure in Nexus and put the zip file there?

i been trying to understand but shows mavens and other software’s

[https://help.sonatype.com/repomanager3/rest-and-integration-api/assets-api](https://help.sonatype.com/repomanager3/rest-and-integration-api/assets-api)

thanks guys.

---

<div class="post-metadata">

### Author: ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)
#### Post date: [October 26, 2020, 7:17pm UTC](https://community.sonatype.com/t/upload-zip-files-to-a-raw-repository-using-rest-api/5220/2 "2020-10-26T19:17:14Z")

</div>

The folders don’t really exist and are just a presentation detail for the UI so there is nothing to create there.

---

<div class="post-metadata">

### Author: ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)
#### Post date: [October 26, 2020, 7:20pm UTC](https://community.sonatype.com/t/upload-zip-files-to-a-raw-repository-using-rest-api/5220/3 "2020-10-26T19:20:00Z")

</div>

If you haven’t, experiment with the Upload section in the UI internally it should use the same code as REST API for uploads so should hopefully give an idea of what is required.

Limitations of Swagger made documenting the method difficult but this is a help page under Components - [Components API](https://help.sonatype.com/repomanager3/rest-and-integration-api/components-api#ComponentsAPI-UploadComponent)
