---
title: "Install an app into a chat, or into your own space"
method: POST
path: "/api/v1/apps/{id}/install"
tags: ["Apps"]
---

# Install an app into a chat, or into your own space

`POST /api/v1/apps/{id}/install`

## Request

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

Omit chat_id for a personal ("Your apps") installation. A second active install of the same app in the same chat 409s with the existing one rather than creating a duplicate. copy_state_from copies another readable, ACTIVE installation's current doc once (a removed one is refused). A chat install into an open/unencrypted room is refused 422.

## Path parameters

- `id` string, required

## Request body

- object
  - `chat_id` string
  - `copy_state_from` string

## 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.
- `404`: Not found (unknown chat_id).
- `409`: Already installed in this chat -- the existing installation.
- `422`: That installation isn't one you can copy from. / Plugins can't be added to open rooms yet.

---

[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)
