# Upload a package

Source: https://www.jawsdeploy.net/rest-api/package-store-upload | Section: Package Store

Push a build artifact into the workspace feed.

`POST /api/packagestore/package`

Uploads a package (nupkg / zip / tar / tar.gz) into the workspace's built-in feed. The package ID and version are parsed from the **filename** - see the [package types](https://www.jawsdeploy.net/rest-api/package-types) page.

The request is `multipart/form-data` with two fields:

- `WorkspaceId` - target workspace ID
- `PackageFile` - the package file (max 1 GB)

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `WorkspaceId` | form | string | yes | ID of the destination workspace. |
| `PackageFile` | form | file | yes | The package binary. Filename must be `<PackageId>.<Version>.<ext>`. |

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid `WorkspaceId`, missing `PackageFile`, or filename that doesn't match the `<PackageId>.<Version>.<ext>` pattern. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks the required role. |

Example request:

```
POST /api/packagestore/package HTTP/1.1
Authorization: Basic <base64(...)>
Content-Type: multipart/form-data; boundary=----X

------X
Content-Disposition: form-data; name="WorkspaceId"

ws_abc
------X
Content-Disposition: form-data; name="PackageFile"; filename="Acme.Web.2.5.3.zip"
Content-Type: application/octet-stream

<binary>
------X--
```

Example response:

```
{}
```

