---
title: "Upload zip archive"
method: POST
path: "/api/repos/{namespace}/{repo_name}/import/upload/{resource}"
tags: ["Import"]
---

# Upload zip archive

`POST /api/repos/{namespace}/{repo_name}/import/upload/{resource}`

## Request

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

Upload and decompress a zip archive into the repository and commit the contents.

## Path parameters

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

## Request body `multipart/form-data`

- ZipUploadBody: Body for uploading a zip archive via multipart/form-data
  - `commit_message` string, nullable
  - `email` string, nullable
  - `file` string, binary, required
  - `name` string, nullable

## Response `200`

Zip archive decompressed and committed

- CommitResponse
  - `oxen_version` string, nullable
  - `status` string, required
  - `status_message` string, required
  - `commit` Commit, required
    - `author` string, required
    - `email` string, required
    - `id` string, required
    - `message` string, required
    - `parent_ids` string[], required
    - `timestamp` string, date-time, required

## Other responses

- `400`: Bad Request

---

[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)
