---
title: "Push a package archive"
method: PUT
path: "/api/hosted/{ecosystem}/{name}/{version}"
tags: ["hosted"]
---

# Push a package archive

`PUT /api/hosted/{ecosystem}/{name}/{version}`

## Request

- Base URL: `/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/hosted/{ecosystem}/{name}/{version}`
- Auth: API key in header `Authorization`

Stores the request body as the archive for name@version. It is served in place of the upstream archive with the same version and is never evicted. Generic files are pushed to /api/hosted/generic/{name}/{version}/{file} and served at /generic/hosted/{name}/{version}/{file}. A file that was already pushed is refused with 409; delete it first to push it again.

## Path parameters

- `ecosystem` string, required
- `name` string, required
- `version` string, required

## Query parameters

- `sha256` string

## Response `201`

Created

- ServerHostedPushResponse
  - `ecosystem` string
  - `filename` string
  - `name` string
  - `pushed_at` string
  - `sha256` string
  - `size` integer
  - `version` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `409`: Conflict
- `413`: Request Entity Too Large

## Changes

- **2026-10-22** `a6ec3c8adcb1`: 2 info
  - added the new optional `query` request parameter `sha256`
  - added the non-success response with the status `409`
- **2026-10-14** `a97aa2ddd79b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/git-pkgs/apis/git-pkgs-proxy-api/changes/api/hosted/:ecosystem/:name/:version/put.md)

---

[API](https://skmtc.dev/git-pkgs/apis/git-pkgs-proxy-api.md) - [All operations](https://skmtc.dev/git-pkgs/apis/git-pkgs-proxy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/git-pkgs/apis/git-pkgs-proxy-api/revisions/17b399ab97cc?raw)
