Packages
Import a package from ZIP
Import a package (agent, skill, tool, or provider) from a ZIP file. The ZIP must contain a valid manifest.json. Rate-limited to 10 requests/minute. Returns 409 if the target package has unpublished draft changes — re-submit with ?force=true to overwrite.
POST
/api/packages/importbetter-auth.session_token<token>
Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Query Parameters
force?boolean
Skip draft overwrite protection. Set to true to overwrite a package with unpublished changes.
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
multipart/form-data
curl -X POST "https://loading/api/packages/import" \ -F file="string"{
"packageId": "string",
"type": "string"
}{
"type": "https://docs.appstrate.dev/errors/invalid-request",
"title": "Invalid Request",
"status": 400,
"detail": "Field is required",
"code": "invalid_request",
"requestId": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing session",
"code": "unauthorized",
"requestId": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"requestId": "req_abc123"
}{
"error": "DRAFT_OVERWRITE",
"message": "string",
"details": {
"packageId": "string",
"draftVersion": "string"
}
}{
"type": "https://docs.appstrate.dev/errors/rate-limited",
"title": "Rate Limited",
"status": 429,
"detail": "Too many requests. Please try again shortly.",
"code": "rate_limited",
"requestId": "req_abc123",
"retryAfter": 30
}