---
title: "Transfer repository namespace"
method: PATCH
path: "/api/repos/{namespace}/{repo_name}/transfer"
tags: ["Repositories"]
---

# Transfer repository namespace

`PATCH /api/repos/{namespace}/{repo_name}/transfer`

## Request

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

Transfer a repository to a different namespace.

## Path parameters

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

## Request body

- TransferNamespaceRequest: The namespace a repository is being transferred into.
  - `namespace` string, required: The destination namespace, as addressed on disk. A UUID where a control plane owns namespaces, and the namespace's name where the server owns its own.
  - `namespace_name` string, nullable: What the destination namespace is called, where `namespace` addresses it by UUID instead. Recorded as the repository's namespace hint, and refused when it is not a valid namespace name. A server that owns its own namespaces takes the name from the `namespace` position and ignores this.

## Response `200`

Repository transferred successfully

- RepositoryResponse
  - `repository` RepositoryView, required
    - `is_empty` boolean, required
    - `min_version` string, nullable
    - `name` string, required
    - `namespace` string, required
    - `repo_uuid` string, uuid, nullable: The immutable UUID this repo's storage is addressed by. `None` for a repository whose identity backfill has not run.
    - `storage_kind` 'local' | 's3', required: Storage backend kind. Serializes as `"local"` / `"s3"` on the wire and on disk.
  - `status` string, required
  - `status_message` string, required

## Other responses

- `400`: Invalid body or target namespace
- `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)
