---
title: "Upload data chunk"
method: POST
path: "/api/repos/{namespace}/{repo_name}/commits/upload_chunk"
tags: ["Commits"]
---

# Upload data chunk

`POST /api/repos/{namespace}/{repo_name}/commits/upload_chunk`

## Request

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

Upload one chunk of a gzipped archive of commit history, unpacked once every chunk has arrived and the whole payload matches its hash.

## Path parameters

- `namespace` string, required
- `repo_name` string, required
- `hash` string, required
- `chunk_num` integer, required
- `total_chunks` integer, required
- `total_size` integer, required

## Request body `application/octet-stream`

- integer[]

## Response `200`

Chunk uploaded successfully

- StatusMessage
  - `oxen_version` string, nullable
  - `status` string, required
  - `status_message` string, required

---

[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/8021aa6fa5bc?raw)
