Packages
Fork a package to your organization
Create an editable copy of a non-owned package under the current organization's scope. The fork is based on the latest published version of the source package — the version manifest, content, and ZIP are copied. A local published version is automatically created. Returns 400 if the source has no published version.
POST
/api/packages/{scope}/{name}/forkbetter-auth.session_token<token>
Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Path Parameters
scope*string
Package scope (e.g. @other-org)
Match
^@[a-z0-9][a-z0-9-]*$name*string
Package name
Match
^[a-z0-9][a-z0-9-]*$Header Parameters
X-Org-Id?string
Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).
Format
uuidRequest Body
application/json
curl -X POST "https://loading/api/packages/string/string/fork" \ -H "Content-Type: application/json" \ -d '{}'{
"packageId": "string",
"type": "agent",
"forkedFrom": "string"
}{
"error": "ALREADY_OWNED",
"message": "string"
}{
"type": "https://docs.appstrate.dev/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing session",
"code": "unauthorized",
"requestId": "req_abc123"
}{
"error": "string",
"message": "string"
}{
"error": "string",
"message": "string"
}