# Import and export: Mosaic API reference

> Import and export in Mosaic’s local REST API: 3 routes, each with its method, path, fields, what it returns and the errors it names.

Source: https://mosaicbrowser.com/docs/api/transfer

**Content and transfer** REST API

## Import and export

Zip archives carrying the profile and, optionally, its browser data.

- [GETExport one profile](#export-profile)
- [POSTExport many profiles](#export-profiles)
- [POSTImport an archive](#import-profiles)

## [Export one profile](#export-profile)

GET`/api/v1/profiles/:id/export`

Streams a zip. Refused while the profile is running, because a live browser has databases open and partly unflushed and the archive would capture a torn session. Cookies survive the round trip because profiles are encrypted with a fixed key rather than one bound to this machine’s keychain.

#### Path parameters

| Field | Type | What it is |
| --- | --- | --- |
| `id`required | `string` | The record’s id. |

#### Query parameters

| Field | Type | What it is |
| --- | --- | --- |
| `data` | `"false"` | Pass `data=false` to export settings only, without browser data. |

#### Returns

A zip archive (`application/zip`).

#### Errors

- 400 — the profile is running.

## [Export many profiles](#export-profiles)

POST`/api/v1/profiles/export`

One archive containing several profiles.

#### Body

| Field | Type | What it is |
| --- | --- | --- |
| `ids`required | `string[]` | Profiles to export. |
| `includeBrowserData` | `boolean` | Default true. |

#### Returns

A zip archive.

## [Import an archive](#import-profiles)

POST`/api/v1/profiles/import`

Send the zip bytes as the raw request body. A Mosaic export is imported verbatim — profiles keep their identities and cookies, and one whose id already exists is skipped rather than overwritten. An export from **GoLogin, Dolphin Anty, AdsPower, Octo Browser or Multilogin** is recognised from the shape of its contents, never its file name, and mapped across: name, notes, proxy, start pages, cookies where present, and whichever of platform, User-Agent, timezone, language, screen, cores and memory that product recorded. Anything it did not record is generated coherently rather than filled with a constant, and the vendor name is added as a tag so provenance survives. The response carries a `source` object naming the vendor and what could not be carried across. A file matching no known product is imported only on the fields every product shares.

An archive made on a **different desktop platform** is imported rather than refused — a library exported from a Windows machine and opened on a Mac arrives in full — and every profile that claims a platform this computer cannot be comes back in `warned`, by name. Those are real profiles in the library, and they will read as masked on a consistency scanner until they are repaired: the fonts installed, their metrics and how the platform rasterises them come from the real machine and no switch reaches them. `POST /profiles/bulk/repair-hardware` redraws each one from its own seed, keeping the cookies, the canvas identity and the locale. Authoring such a profile is still a `400` — preserving an existing library and typing `os: "windows"` into a create call are different acts.

#### Query parameters

| Field | Type | What it is |
| --- | --- | --- |
| `projectId` | `string` | Project to import into. |

#### Returns

`{ imported: Profile[], warned: Array<{ name, reason }>, skipped: Array<{ name, reason }>, source?: { vendor, label, dropped: string[] } }`

```
curl -X POST -H "Authorization: Bearer $KEY" \
  --data-binary @profiles.zip \
  "$BASE/profiles/import?projectId=$PROJECT"
```

## Run the API on your own profiles

The REST API and the MCP server are part of Pro: $49 a month, with the first 14 days free. Free has every browser feature and no API key.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
