---
title: "Import a previously-exported App bundle (v2)"
method: POST
path: "/v2/apps/import"
tags: ["Apps"]
---

# Import a previously-exported App bundle (v2)

`POST /v2/apps/import`

## Request

- Base URL: `https://api.chat.ethora.com`
- URL: `https://api.chat.ethora.com/v2/apps/import`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

**Auth**: Tenant Actor

Creates a NEW App owned by the calling tenant from the bundle.
The source `_id`, `domainName`, secrets, and tokens are all
regenerated. Chat names are remapped from `${oldAppId}_<uuid>` to
`${newAppId}_<uuid>` so the XMPP per-app prefix invariant holds.

When the export was created with `include=users`, the bundle also
round-trips end users: bcrypt password hashes and `xmppPassword`
are preserved, `xmppUsername` is remapped to
`<newAppId>_<newUserId>`, and `User2Chats` memberships are
rewritten with the fresh IDs. Imported users can log in with
their original credentials. Bundles containing user hashes are
sensitive - the import response calls this out in `summary.notes`.

Still skipped (called out in the response `notes`):
- botInstances (per-app embodiments reference user IDs that don't
  exist in the new environment; recreate via
  `/v2/agents/:idOrAddress/invite-to-chat`).

Body shapes:
- `application/json`: body IS the bundle.
- `multipart/form-data`: field `bundle` is a `.zip` containing
  `bundle.json`.

`?domainNameOverride=` lets the caller pick a new domainName up
front; the importer auto-suffixes on collision otherwise.

## Request body

- object

## Response `201`

imported

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: bundle missing, malformed, or wrong schemaVersion
- `500`: Internal Server Error

---

[API](https://skmtc.dev/ethora/apis/platform-api.md) · [All operations](https://skmtc.dev/ethora/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ethora/apis/platform-api/revisions/01b6e64378ee?raw)
