---
title: "Return a website adoption URL for a community-forked package."
method: POST
path: "/v1/community/fork-adopt"
tags: ["community"]
---

# Return a website adoption URL for a community-forked package.

`POST /v1/community/fork-adopt`

## Request

- Base URL: `https://api.kody.codes`
- URL: `https://api.kody.codes/v1/community/fork-adopt`
- Auth: HTTP bearer

Return a website adoption URL for a community-forked package. Adoption keeps fork provenance but grants self-authored-like read/use access to your user secrets (mutations still need an allowed_packages grant). This capability never adopts: only the account owner can adopt, signed in on the package settings page, after reviewing the source. Send the approval_url to the user and wait; never treat this call as adoption.

Org permission: `package:read`.

## Request body

- object
  - `package_id` string: Saved-package UUID. Use when the scoped name is not known, or for a stable ref.
  - `kody_id` string: Package name (`@owner/leaf` or the name leaf). Prefer this when you know the name.

## Response `200`

Success.

- object
  - `status` 'approval_required' | 'already_adopted', required
  - `package_id` string, required
  - `kody_id` string, required
  - `listing_id` string, required
  - `origin_commit` string, required
  - `adopted_at` string, nullable, required
  - `approval_url` string, required
  - `message` string, 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/a020ecedb82b?raw)
