---
title: "Fork a public package into an inert package source in your scope."
method: POST
path: "/v1/community/listings/{listing_id}/fork"
tags: ["community"]
---

# Fork a public package into an inert package source in your scope.

`POST /v1/community/listings/{listing_id}/fork`

## Request

- Base URL: `https://api.kody.codes`
- URL: `https://api.kody.codes/v1/community/listings/{listing_id}/fork`
- Auth: HTTP bearer

Fork a public package into an inert package source in your scope. The fork cannot run until you review the code and publish through a repo session. When the listing leaf is already taken by an unrelated package and you omit `kody_id`, Kody picks the next free leaf (for example `leaf-2`). Pass an explicit package name leaf (or `@owner/leaf`) to choose the name yourself.

Org permission: `package:create`.

## Path parameters

- `listing_id` string, required: Catalog entry id to fork.

## Request body

- object
  - `kody_id` string: Optional package name leaf (or `@owner/leaf`). Omit to use the listing leaf, or the next free alternate when that leaf is already taken by an unrelated package.

## Response `200`

Success.

- object
  - `fork_id` string, required
  - `package_id` string, required
  - `source_id` string, required
  - `target_kody_id` string, required
  - `target_name` string, required
  - `origin_commit` string, required
  - `files_count` integer, required
  - `cross_scope_references` object[], required
    - `file` string, required
    - `specifier` string, required
  - `next_steps` string, required
  - `content_warning` string, required
  - `serverTiming` object[]: Request-scoped phase timings. Same shape as execute serverTiming. Not stored. bootstrap-source includes Durable Object startup; subtract nested bootstrap-* phases to estimate cold start.
    - `name` string, required
    - `durationMs` number, required

## Other responses

- `400`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `401`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `403`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `404`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `409`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `413`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `429`: Too many requests (edge IP/token limit) or an entitlement / plan-cap limit. Wait at least `Retry-After` seconds before retrying.
- `500`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `503`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `default`: Error envelope `{ "error": { "code", "message", "details"? } }`.

---

[API](https://skmtc.dev/kody/apis/kody-api.md) · [All operations](https://skmtc.dev/kody/apis/kody-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kody/apis/kody-api/revisions/705f4f022728?raw)
