---
title: "Create a new package"
method: POST
path: "/scopes/{scope}/packages"
---

# Create a new package

`POST /scopes/{scope}/packages`

Creates a new package in a scope

## Path parameters

- `scope` string, required — The name of a scope. This must not be @ prefixed.

## Request body

- CreatePackageRequest
  - `package` string, required — The name of a package.

## Response `200`

OK

- Package
  - `scope` string, required — The name of a scope. This must not be @ prefixed.
  - `name` string, required — The name of a package.
  - `description` string, required — The description of the package.
  - `runtimeCompat` RuntimeCompat
    - `browser` boolean, nullable — Whether the package is compatible with web browsers.
    - `deno` boolean, nullable — Whether the package is compatible with Deno.
    - `node` boolean, nullable — Whether the package is compatible with Node.js.
    - `workerd` boolean, nullable — Whether the package is compatible with workerd.
    - `bun` boolean, nullable — Whether the package is compatible with Bun.
  - `createdAt` string, date-time, required — The date and time when the package was created.
  - `updatedAt` string, date-time, required — The date and time when the package was last updated.
  - `githubRepository` GitHubRepository
    - `id` integer, required — The GitHub repository ID.
    - `owner` string, required — The GitHub user / organization of the repository.
    - `name` string, required — The GitHub repository name.
    - `createdAt` string, date-time, required — The date and time when the GitHub repository link was created.
    - `updatedAt` string, date-time, required — The date and time when the GitHub repository link was last updated.
  - `score` integer, nullable — The package score percentage (0-100).
  - `versionCount` integer, required — The number of versions of the package.
  - `dependencyCount` integer, required — The number of dependencies of the package.
  - `dependentCount` integer, required — The number of packages that depend on this package.
  - `latestVersion` string, nullable — The latest version of the package.
  - `whenFeatured` string, date-time, nullable — The date and time when the package was featured.
  - `isArchived` boolean, required — Whether the package is archived.
  - `readmeSource` 'readme' | 'jsdoc', required — The source of the package readme.

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `403` — User is not a scope member
- `404` — Scope not found

## Changes

- **2026-02-06** `0c4e8d8a5c2a` — 1 breaking, 2 warning, 14 info
  - the response property `score` became nullable for the status `200`
  - changed the pattern of the `path` request parameter `scope` from `/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/` to `^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$`
  - changed the pattern of the request property `package` from `/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/` to `^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$`
  - added the optional property `latestVersion` to the response with the `200` status
  - …13 more
- **2024-07-03** `bdf10fdaec39` — 1 info
  - added the optional property `score` to the response with the `200` status
- **2024-03-14** `cebb48e7803a` — 1 info
  - added the optional property `runtimeCompat` to the response with the `200` status
- **2024-03-14** `a15e5ad40921` — 1 info
  - added the optional property `githubRepository` to the response with the `200` status
- **2024-02-28** `f8d3b912d946` — 5 breaking, 7 warning, 2 info
  - removed the required property `dependencyCount` from the response with the `200` status
  - removed the required property `dependentCount` from the response with the `200` status
  - removed the required property `isArchived` from the response with the `200` status
  - removed the required property `readmeSource` from the response with the `200` status
  - …10 more

[Change history](https://skmtc.dev/jsr-io/apis/jsr-api/changes/scopes/:scope/packages/post.md)

---

[API](https://skmtc.dev/jsr-io/apis/jsr-api.md) · [All operations](https://skmtc.dev/jsr-io/apis/jsr-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jsr-io/jsr-api/revisions/0c4e8d8a5c2a/schema)
