---
title: "create"
method: POST
path: "/api/v1/repos/{user_id}/{repo}/packages.json"
tags: ["packages"]
---

# create

`POST /api/v1/repos/{user_id}/{repo}/packages.json`

Push a package.

NOTE: that for Deban .dsc packages, you must upload each of the files contained in the .dsc.
You can use the package\_contents API to determine the filename, md5sum, and size of the files referenced by the DSC.
All other package types (debian, rpm, python, and java) need only specify the distro\_version\_id and package\_file parameters.

**Example request:**

```
curl -X POST https://packagecloud.io/api/v1/repos/test_user/test_repo/packages.json \
     -F "package[distro_version_id]=48"     \
     -F "package[package_file]=@path/to/jake-1.0-1.el6.x86_64.rpm"
```

## Path parameters

- `user_id` string, required
- `repo` string, required

## Response `201`

[PackageDetails](#object_PackageDetails) A JSON object representing the package.

- PackageDetails
  - `name` string, required — The name of the package.
  - `distro_version` string, required — The distro\_version for the package.
  - `architecture` string, nullable, required — The architecture of the package.
  - `repository` string, required — The name of the repository for the package.
  - `size` string, required — The size (in bytes) of the package. Returned as a String for JavaScript support.
  - `summary` string, nullable, required — The summary of the package (if available).
  - `filename` string, required — The filename of the package.
  - `description` string, nullable, required — The description of the package (if available).
  - `md5sum` string, nullable, required — The MD5 checksum for the package (if available).
  - `sha1sum` string, nullable, required — The SHA1 checksum for the package (if available).
  - `sha256sum` string, nullable, required — The SHA256 checksum for the package (if available).
  - `sha512sum` string, nullable, required — The SHA512 checksum for the package (if available).
  - `private` boolean, required — Whether or not the package is in a private repository.
  - `uploader_name` string, required — The name of the uploader for the package.
  - `created_at` string, required — When the package was uploaded.
  - `licenses` string[], required — Array of licenses for this package (if available).
  - `version` string, required — The version of the package.
  - `release` string, nullable, required — The release of the package (if available).
  - `epoch` integer, nullable, required — The epoch of the package (if available).
  - `indexed` boolean, required — Whether or not this package has been indexed.
  - `scope` string, nullable, required — The scope of the package (if available).
  - `repository_html_url` string, required — The HTML url of the repository.
  - `versions_url` string, required — The API url of other versions of this package.
  - `promote_url` string, required — The API url that can be used to promote this package.
  - `total_downloads_count` integer, required — The number of times this package has been downloaded.
  - `download_url` string, required — The url to download this package.
  - `package_html_url` string, required — The HTML url for this package.
  - `downloads_detail_url` string, required — The url to get access log details for package downloads.
  - `downloads_series_url` string, required — The url to get time series data for package downloads.
  - `downloads_count_url` string, required — The url to get the total number of package downloads.
  - `destroy_url` string, required — The url for the HTTP DELETE request to destroy this package.
  - `self_url` string, required — The API url for this response.
  - `dependencies` object[], nullable, required
    - `context` string
    - `dependencies` string[]
  - `repository_url` string, required
  - `package_url` string, required

---

[API](https://skmtc.net/cstrahan/apis/packagecloud-api.md) · [All operations](https://skmtc.net/cstrahan/apis/packagecloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cstrahan/packagecloud-api/versions/9744ac4cffc2/schema)
