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. Where the package is PLACED here — homed in this space, holding a row here (POST /api/packages/{scope}/{name}/shares creates one), or a system package, placed everywhere — the row is switched on. Where it is not, this call places it, but only for a caller holding the package type's share permission in the package's HOME space and only when the package has a published version (409 package_has_no_version) — 403 without the permission, 404 when the package id is not reachable at all. Without that permission the call only switches on a row that exists, so a placement withdrawn while the call is in flight is refused with 404 rather than recreated. 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 member switches on a package the organization offers. A PERSONAL space takes only what is homed there, what the organization offers (PUT /api/packages/{scope}/{name}/org-offer, either mode) and what the platform activates by default: any other package answers 409 personal_space_takes_offers_only, and the call never places one there. The placement carries no version: the package runs its latest published version, and its draft runs for whoever can write it. Activating an AGENT activates nothing else: each integration it declares that is not active here is a warnings[] item of the response (code: integration_not_active, required saying whether a launch here is refused until it is activated, or starts without it) — activate it with this same call and its packageId, or leave the agent on without it.
/api/spaces/{id}/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,
"installed_at": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"package_type": "agent",
"package_source": "local",
"draft_manifest": {},
"warnings": [
{
"field": "string",
"message": "string",
"title": "string",
"line": 1,
"column": 1,
"candidate_connections": [
{
"id": "string",
"label": "string",
"account_id": "string",
"owned_by_actor": true,
"needs_reconnection": true,
"scopes_granted": [
"string"
],
"missing_scopes": [
"string"
]
}
],
"connection_id": "string",
"missing_scopes": [
"string"
],
"remedy": "new_connection",
"owned_by_actor": true,
"required_scopes": [
"string"
],
"auth_key": "string",
"required_auth_key": "string",
"available_auth_keys": [
"string"
],
"source": "admin_pin",
"connect_url": "http://example.com",
"expiresAt": "2019-08-24T14:15:22Z",
"packageId": "string",
"code": "integration_not_active",
"required": true
}
]
}{
"object": "space_package",
"packageId": "string",
"generation_config": {
"temperature": 0,
"reasoning_level": "off"
},
"modelId": "string",
"proxyId": "string",
"enabled": true,
"installed_at": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"package_type": "agent",
"package_source": "local",
"draft_manifest": {},
"warnings": [
{
"field": "string",
"message": "string",
"title": "string",
"line": 1,
"column": 1,
"candidate_connections": [
{
"id": "string",
"label": "string",
"account_id": "string",
"owned_by_actor": true,
"needs_reconnection": true,
"scopes_granted": [
"string"
],
"missing_scopes": [
"string"
]
}
],
"connection_id": "string",
"missing_scopes": [
"string"
],
"remedy": "new_connection",
"owned_by_actor": true,
"required_scopes": [
"string"
],
"auth_key": "string",
"required_auth_key": "string",
"available_auth_keys": [
"string"
],
"source": "admin_pin",
"connect_url": "http://example.com",
"expiresAt": "2019-08-24T14:15:22Z",
"packageId": "string",
"code": "integration_not_active",
"required": true
}
]
}{
"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": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"param": "string",
"retry_after": 0,
"login_refusal": "grant",
"integration_diagnostic": "string",
"errors": [
{
"field": "string",
"code": "string",
"message": "string",
"title": "string",
"line": 1,
"column": 1,
"candidate_connections": [
{
"id": "string",
"label": "string",
"account_id": "string",
"owned_by_actor": true,
"needs_reconnection": true,
"scopes_granted": [
"string"
],
"missing_scopes": [
"string"
]
}
],
"connection_id": "string",
"missing_scopes": [
"string"
],
"remedy": "new_connection",
"owned_by_actor": true,
"required_scopes": [
"string"
],
"auth_key": "string",
"required_auth_key": "string",
"available_auth_keys": [
"string"
],
"source": "admin_pin",
"connect_url": "http://example.com",
"expiresAt": "2019-08-24T14:15:22Z",
"packageId": "string"
}
]
}