---
title: "Import a bookmark tree (e.g. from Chrome)"
method: POST
path: "/browser-bookmarks/import"
tags: ["browser-bookmarks"]
---

# Import a bookmark tree (e.g. from Chrome)

`POST /browser-bookmarks/import`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/browser-bookmarks/import`
- Auth: HTTP bearer

A flat list where each item names its folder by client_parent_id. Items whose client_id is already stored are skipped, so a retried or resumed import never duplicates. Large libraries go in several requests, parents first.

## Request body

- ImportBrowserBookmarksDto
  - `parent_id` string, uuid, nullable: Existing folder to import into; omit or null for the top level
  - `items` ImportBrowserBookmarkItemDto[], required
    - `client_id` string, required: The client's own id for the item (e.g. Chrome's node GUID). Unique among the user's live items.
    - `client_parent_id` string, nullable: client_id of the folder this item sits in: an item in this request, or one imported by an earlier request. Omit or null to place it directly in the import target.
    - `kind` 'bookmark' | 'folder', required
    - `title` string, required: May be empty, as in Chrome. Stored encrypted.
    - `url` string: Required for a bookmark, rejected for a folder. Any scheme. Stored encrypted.
    - `position` number: Sort key among siblings; omitted means after the folder's live children and any earlier explicit position, in request order

## Response `200`

- ImportBrowserBookmarksResponseDto
  - `created` number, required: Items this request inserted
  - `existing` number, required: Items skipped because a live item with the same client_id already existed
  - `items` BrowserBookmarkResponseDto[], required: Every requested item as stored, in request order
    - `id` string, uuid, required
    - `parent_id` string, uuid, nullable, required: Null for a top-level item
    - `kind` 'bookmark' | 'folder', required
    - `client_id` string, nullable, required
    - `title` string, required
    - `url` string, nullable, required: Null exactly when kind is folder
    - `position` number, required: Sort key among siblings; order by position, then id
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `deleted_at` string, date-time, nullable, required: Set on a deleted item; only the sync feed returns deleted items

## Other responses

- `400`: Body is { code, message }; code is one of: browser_bookmark_import_duplicate_client_id, browser_bookmark_import_parent_unresolved, browser_bookmark_import_cycle, browser_bookmark_parent_not_folder, browser_bookmark_url_required, browser_bookmark_url_not_allowed_on_folder
- `409`: Body is { code, message }; code is one of: browser_bookmark_parent_not_found, browser_bookmark_parent_not_folder, browser_bookmark_limit_reached. The limit is 25000 live items; nothing is imported when it would be exceeded.

---

[API](https://skmtc.dev/focusbear/apis/focusbear-api.md) - [All operations](https://skmtc.dev/focusbear/apis/focusbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/focusbear/apis/focusbear-api/revisions/3a83a3b9a811?raw)
