---
title: "Batch upload files (Multipart)"
method: POST
path: "/api/repos/{namespace}/{repo_name}/versions"
tags: ["Version Files"]
---

# Batch upload files (Multipart)

`POST /api/repos/{namespace}/{repo_name}/versions`

## Request

- Base URL: `https://hub.oxen.ai`
- URL: `https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/versions`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/oxen/apis/oxen-server/docs/api/repos/:namespace/:repo_name/versions/post.ts> (a function with typed inputs; its response is checked against the schema)

Upload multiple files via multipart form, identified by their content hashes.

## Path parameters

- `namespace` string, required
- `repo_name` string, required

## Request body `multipart/form-data`

- UploadVersionFile
  - `file` string, binary, required

## Response `200`

Files successfully uploaded (check err_files for failures)

- ErrorFilesResponse
  - `oxen_version` string, nullable
  - `status` string, required
  - `status_message` string, required
  - `err_files` ErrorFileInfo[]
    - `error` string, required
    - `hash` string, required
    - `path` string, nullable

## Other responses

- `400`: Invalid multipart request
- `404`: Repository not found

---

[API](https://skmtc.dev/oxen/apis/oxen-server.md) - [All operations](https://skmtc.dev/oxen/apis/oxen-server/llms.txt) - [OpenAPI document](https://skmtc.dev/oxen/apis/oxen-server/revisions/2ae578129949?raw)
