---
title: "Move an installation to another chat"
method: POST
path: "/api/v1/app_installations/{id}/move"
tags: ["Apps"]
---

# Move an installation to another chat

`POST /api/v1/app_installations/{id}/move`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/app_installations/{id}/move`
- Auth: API key in header `api-key`

A2, tightened by security fix item 7 and restated by role: re-parents chat_id only -- its shared/private docs are keyed by installation_id, which never changes, so nothing about them moves. In a chat with MORE than two non-observer members, only the installer or a chat owner/admin may move it; in a 1:1 or a personal installation, whoever's there -- the rule binds human and agent members alike. The destination may be neither a private lane nor an open room, and is refused when the app's builder agent is blocked by any non-observer destination member. The installation's AGENT is re-selected for the destination (item 3, the same pick a fresh install makes). Tombstones the source bubble (same mechanism as DELETE.../messages/:id, "delete for everyone") and creates a FRESH bubble in the destination (created_by the mover) -- reactions, the original sender, and replies never carry across. Posts a system event in the source ("<mover> moved a plugin to another chat.") and the destination ("<mover> moved a plugin here.") -- security fix item 8: the text never names the plugin; the event's own `resource` (this installation) is what the web renders the name/icon from. 409 with the existing row when the destination already holds an active installation of this app (pre-checked, and rescued again on a race past that check). Deliberately unmapped in MandateCapabilityMap -- refused entirely under X-Salt-Act-For, same as DELETE.../{id} and.../ask.

## Path parameters

- `id` string, required

## Request body

- object
  - `chat_id` string, required

## Response `200`

OK

- AppInstallation: An App placed into a chat (chat_id set) or the caller's own space ("Your apps", chat_id null) -- AppInstallation#as_installation_json.
  - `id` string, uuid, required
  - `app` object, required
    - `id` string, uuid
    - `name` string
    - `description` string, nullable
    - `owner` object: A narrower party reference than SafeUserSummary -- id, username, display_name only, no account_type/system/avatar_url. Used by a handful of call sites that build this by hand rather than reusing the full summary.
      - `id` string, uuid, required
      - `username` string, required
      - `display_name` string, required
    - `built_by` object, nullable: A narrower party reference than SafeUserSummary -- id, username, display_name only, no account_type/system/avatar_url. Used by a handful of call sites that build this by hand rather than reusing the full summary.
      - `id` string, uuid, required
      - `username` string, required
      - `display_name` string, required
  - `version` object, required
    - `id` string, uuid
    - `number` integer
    - `actions` object[]
      - `id` string, required
      - `label` string, required
      - `input` object
        - `placeholder` string
      - `intent` string: An intent id this SAME version declares. Omit for the ordinary salt.onAction path.
    - `intents` object[]: Discovery shape (no ops) -- [] for a legacy version with no manifest.
      - `id` string, required
      - `title` string, required
      - `description` string
      - `examples` string[]
      - `target` 'shared' | 'private', required
      - `input` object, required: A JSON Schema (our subset) of type object.
    - `data` object: The shape of the installation's shared (app_states.doc) and/or each person's private (app_private_states.doc) document -- a JSON Schema subset each. ≤ 16 KB.
      - `shared` object
      - `private` object
    - `icon` 'list' | 'check' | 'poll' | 'calendar' | 'cart' | 'note' | 'timer' | 'heart' | 'star' | 'chart' | 'money' | 'map' | 'book' | 'music' | 'game' | 'home'
    - `tint` 'blue' | 'teal' | 'green' | 'amber' | 'orange' | 'red' | 'pink' | 'violet' | 'slate'
  - `latest_number` integer, nullable
  - `removed_at` string, date-time, nullable
  - `removed_by` object, nullable: A narrower party reference than SafeUserSummary -- id, username, display_name only, no account_type/system/avatar_url. Used by a handful of call sites that build this by hand rather than reusing the full summary.
    - `id` string, uuid, required
    - `username` string, required
    - `display_name` string, required
  - `icon` 'list' | 'check' | 'poll' | 'calendar' | 'cart' | 'note' | 'timer' | 'heart' | 'star' | 'chart' | 'money' | 'map' | 'book' | 'music' | 'game' | 'home'
  - `tint` 'blue' | 'teal' | 'green' | 'amber' | 'orange' | 'red' | 'pink' | 'violet' | 'slate'
  - `previous_version_available` boolean
  - `pinned` boolean
  - `updated_at` string, date-time, nullable: When this installation last moved to a different version (pin, unpin, or the automatic rollout) -- not the row's ordinary updated_at.
  - `chat_id` string, nullable
  - `agent_id` string, nullable
  - `installed_by_id` string, uuid
  - `can_move` boolean
  - `chat_member_count` integer, nullable: Non-observer members of chat_id; null for a personal installation.
  - `created_at` string, date-time, nullable
  - `installed_by` object, nullable
    - `id` string, uuid
    - `username` string
    - `display_name` string
    - `account_type` 'User' | 'Agent'
  - `state_updated_at` string, date-time, nullable: The shared document's last write; null until it has been written once.
  - `state_updated_by` object, nullable
    - `id` string, uuid
    - `username` string
    - `display_name` string
    - `account_type` 'User' | 'Agent'

## Other responses

- `401`: Missing or invalid credentials.
- `403`: You're not in this chat.
- `404`: Not found (unknown chat_id).
- `409`: Another active installation of this app is already in that chat.
- `422`: Plugins can't be moved into a private lane. / Plugins can't be added to open rooms yet. / This plugin's builder can't be in that chat.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
