Start app instance
POST /v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/instances
Starts the app, or answers the instance of it already running there.
With a conversation_id, it runs in the sandbox session of the conversation, which starts if none runs: the session's job stages the app read-only at /app/{app_id} and runs its processes beside the agent's shell, as the person the session acts for. A session runs at most 3 apps.
Without one, the space runs it for its members in a sandbox of its own, as the space identity, which it bills; one instance per app. It takes one of the organisation's app slots (Free 0, Business 5) and stops after 15 minutes without activity.
write apps are for the space's editors and admins; read apps for any member, and what they change in the space's files is never saved.
Authentication
Send an API key, or an access token from your organisation’s identity provider, in the Authorization header. How API keys work
Scope the API key needs: conversations:write
Security schemes in the OpenAPI document: session_cookie (cookie __Host-ivy_session)bearer (bearer)api_key (bearer)
Parameters
-
organisation_idpathstringrequired -
space_idpathstringrequired -
app_idpathstringrequired
Request body
application/json StartAppInstance required
-
conversation_idstring|nullThe conversation whose sandbox session runs the app; its session starts if none runs. Without one, the space runs the app for its members in a sandbox of its own, as the space identity.
Responses
-
The app already runs there (the conversation's session, or the space's own sandbox): its instance
-
The instance,
startinguntil its job has staged the app and started its processes -
unauthenticated -
Viewers can't start a
writeapp;workspace_content_restricted,insufficient_scope -
No such space, conversation or app (or the caller can't see it)
-
app_not_approved: one of the space's own apps no person approved yet (or an imported space's app);app_runtime_unavailable: no sandbox environment the installation has on is the app'senvironment(a session's runs apps of the session environment, of the environments itprovidesandshell; the space's own any built-in environment);too_many_apps: the session already runs 3;app_start_conflict: concurrent starts kept winning, try again;file_scanning,workspace_archived -
app_not_runnable: the app declares no processes;invalid_app,app_too_large,validation_failed,invalid_body -
sandbox_busy: the organisation's sandbox sessions, or for a space's instance its app slots, are all in use; for app slotsdetails.holdersnames the instances holding them that the caller can see (instance_id,workspace_id,app_id) anddetails.other_holderscounts the rest -
internal -
sandbox_unavailable: code execution is off or no sandbox worker runs; orunavailable: the database is briefly unavailable; retry afterRetry-Afterseconds
Error codes
Errors come back as an ErrorBody whose code is one of these.
- 401
unauthenticated - 403
workspace_content_restrictedinsufficient_scope - 404
not_foundgeneric code for this status - 409
app_not_approvedapp_runtime_unavailabletoo_many_appsapp_start_conflictfile_scanningworkspace_archived - 422
app_not_runnableinvalid_appapp_too_largevalidation_failedinvalid_body - 429
sandbox_busyworkspace_idapp_id - 500
internal - 503
sandbox_unavailableunavailable
Examples
curl -X POST "$IVY_API_URL/v1/organisations/$ORGANISATION_ID/spaces/$SPACE_ID/apps/$APP_ID/instances" \
-H "Authorization: Bearer $IVY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' import { client, startAppInstance } from "@spacivapp/ivy-sdk";
client.setConfig({
baseUrl: process.env.IVY_API_URL,
headers: { Authorization: `Bearer ${process.env.IVY_API_KEY}` },
});
const { data, error, response } = await startAppInstance({
path: { organisation_id: organisationId, space_id: spaceId, app_id: appId },
body: {},
}); {
"conversation_id": "conversation_123"
} {
"access": "read",
"app_id": "app_123",
"conversation_id": "conversation_123",
"frontend": "builtin",
"id": "id_123",
"last_active_at": "2026-01-15T09:30:00Z",
"name": {
"de": "string",
"el": "string",
"en": "string",
"es": "string",
"fr": "string",
"hu": "string",
"it": "string"
},
"owner": "session",
"reason": "string",
"snapshot_hash": "string",
"started_at": "2026-01-15T09:30:00Z",
"state": "starting",
"status": {
"dropped": [
"string"
],
"processes": [
{
"busy": "string",
"error": "string",
"exit_code": 1,
"id": "id_123",
"ports": [],
"progress": 1,
"restarts": 0,
"state": {},
"text": "Hello, Ivy"
}
],
"skipped": [
"string"
]
},
"stopped_at": "2026-01-15T09:30:00Z"
}