---
title: "Upload a download artifact"
method: POST
path: "/repositories/{workspace}/{repo_slug}/downloads"
tags: ["Downloads"]
---

# Upload a download artifact

`POST /repositories/{workspace}/{repo_slug}/downloads`

Upload new download artifacts.

To upload files, perform a `multipart/form-data` POST containing one
or more `files` fields:

    $ echo Hello World > hello.txt
    $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt

When a file is uploaded with the same name as an existing artifact,
then the existing file will be replaced.

## Response `201`

The artifact was uploaded sucessfully.

## Other responses

- `400` — Bad Request.
- `403` — User is not authorized to write to the repository.
- `406` — Unsupported Content-Type. Use multiplart/form-data.

---

[API](https://skmtc.net/atlassian/apis/bitbucket-api.md) · [All operations](https://skmtc.net/atlassian/apis/bitbucket-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/bitbucket-api/revisions/135ca4814a92/schema)
