Activate a package in this space
Activate a package here — the ONE activation door, for every package type, for a personal space as for a team one. Idempotent: a package that is already active answers 200 with the same body, and one that was switched off comes back with the per-space model, proxy and input settings it kept. A package must be PLACED here first: homed in this space, or shared with it (POST /api/packages/{scope}/{name}/shares); system packages are placed everywhere. If it is not, this call can create the share itself, but only for a caller holding the package type's share permission in the package's HOME space — 403 otherwise, 404 when the package id is not reachable at all. An API key never carries share, so it activates only what is already placed. In the caller's OWN personal space the type's activation grant is not required: ownership is the authorization, which is how a guest takes up a package offered to them. The placement carries no version: the package runs its latest published version, and its draft runs for whoever can write it.
/api/spaces/{spaceId}/packagesCookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Path Parameters
Header Parameters
Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).
uuidRequest Body
application/json
curl -X POST "https://your-instance/api/spaces/string/packages" \ -H "Content-Type: application/json" \ -d '{ "packageId": "string" }'{
"object": "space_package",
"packageId": "string",
"generation_config": {
"temperature": 0,
"reasoning_level": "off"
},
"modelId": "string",
"proxyId": "string",
"enabled": true,
"chat_enforced": true,
"installed_at": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"package_type": "agent",
"package_source": "local",
"draft_manifest": {}
}{
"object": "space_package",
"packageId": "string",
"generation_config": {
"temperature": 0,
"reasoning_level": "off"
},
"modelId": "string",
"proxyId": "string",
"enabled": true,
"chat_enforced": true,
"installed_at": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"package_type": "agent",
"package_source": "local",
"draft_manifest": {}
}{
"type": "https://docs.appstrate.dev/errors/validation-failed",
"title": "Validation Failed",
"status": 400,
"detail": "name: Invalid input: expected string, received undefined (+2 more)",
"code": "validation_failed",
"request_id": "req_abc123",
"errors": [
{
"field": "name",
"code": "required",
"message": "Invalid input: expected string, received undefined"
},
{
"field": "email",
"code": "invalid_format",
"message": "Invalid email address"
},
{
"field": "age",
"code": "invalid_type",
"message": "Invalid input: expected number, received string"
}
]
}{
"type": "https://docs.appstrate.dev/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing session",
"code": "unauthorized",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Resource not found",
"code": "not_found",
"request_id": "req_abc123"
}{
"type": "about:blank",
"title": "Invalid MCP Server Bundle",
"status": 422,
"detail": "MCP-server package '@myorg/tools' has no activatable published version.",
"code": "bundle_invalid",
"request_id": "req_abc123"
}