---
search:
  tags:
    - artifacts
    - PUT
seo:
  description: >-
    Uploads a cache artifact identified by the hash specified on the path.…
    Reference for the PUT /artifacts/{hash} endpoint in the Turborepo Remote
    Cache API.
sidebar:
  label: Upload a cache artifact
  badge: PUT
title: Upload a cache artifact
type: openapi-operation
---
Uploads a cache artifact identified by the `hash` specified on the path. The cache artifact can then be downloaded with the provided `hash`.

The request body should contain a gzip-compressed tarball of the task outputs. The server should store this data and make it available for subsequent downloads.

`PUT /artifacts/{hash}`

**Request body** (`application/octet-stream`, required)

The artifact data as a gzip-compressed tarball

**Responses**

- `200` — Artifact uploaded successfully (alternative success response)
- `202` — Artifact accepted for storage
- `400` — Bad request. One or more of the provided values in the request query, headers, or body is invalid.
- `401` — Unauthorized. The request is missing a valid authentication token or the token is invalid.
- `403` — Forbidden. The authenticated user does not have permission to access this resource.

Response example, 200:

```json
{
  "urls": [
    "http://example.com"
  ]
}
```
