---
title: "Request URL(s) to upload new package file upload(s) to."
method: POST
path: "/files/{owner}/{repo}/"
tags: ["files"]
---

# Request URL(s) to upload new package file upload(s) to.

`POST /files/{owner}/{repo}/`

Request URL(s) to upload new package file upload(s) to.

## Request body

- PackageFileUploadRequest
  - `filename` string, required — Filename for the package file upload.
  - `md5_checksum` string — MD5 checksum for a POST-based package file upload.
  - `method` 'put_parts' | 'put' | 'post' | 'presigned' | 'unsigned_put' — The method to use for package file upload.
  - `sha256_checksum` string — SHA256 checksum for a PUT-based package file upload.

## Response `202`

The upload request was accepted

- PackageFileUpload
  - `identifier` string, uri — The identifier for the file to use when creating packages
  - `upload_fields` object, nullable — The dictionary of fields that must be sent with POST uploads
  - `upload_headers` object, nullable — The dictionary of headers that must be sent with uploads
  - `upload_querystring` string, nullable — The querystring to use for the next-step POST or PUT upload
  - `upload_url` string, uri — The URL to use for the next-step POST or PUT upload

## Other responses

- `400` — Request could not be processed (see detail).
- `404` — Namespace (owner) or repository not found
- `422` — Missing or invalid parameters (see detail).

---

[API](https://skmtc.dev/cloudsmith/apis/cloudsmith-api-v1.md) · [All operations](https://skmtc.dev/cloudsmith/apis/cloudsmith-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cloudsmith/cloudsmith-api-v1/revisions/4d7879df9b2f/schema)
