/api/public/v1/bookmarks/importsbookmarks.import
Read a browser bookmark export (Netscape bookmark HTML from Chrome, Edge, Firefox …, at most 10 MB) and store its http(s) links as an import (at most 5000). javascript:, data:, file: and other schemes, and addresses with a user name or password, are rejected with a reason; the same file twice is one import.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
command_idbody | string (uuid) | Yes | Client-generated UUID for this command. Send the same id (and body) again to get the stored receipt instead of a second change; a different body under the same id is CONFLICT. |
namebody | string | Yes | Shown in the library, e.g. "Team links October" (min length 1, max length 120) |
htmlbody | string | Yes | The whole bookmark export file as text (bookmarks.html) (min length 1, max length 10485760) |
file_namebody | string | No | The original file name, for people reading the library (max length 200) |
Examples
curl -X POST "https://browlix.com/api/public/v1/bookmarks/imports" \
-H "Authorization: Bearer $BROWLIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"command_id":"<uuid>","name":"<name>","html":"<html>"}'Response
201 with { data, replayed: false, correlation_id } the first time; 200 with replayed: true when the same command_id and body come again.
| Field | Type | Always present | Description |
|---|---|---|---|
| data | object | Yes | |
| data.set | object | Yes | |
| data.set.id | string (uuid) | Yes | |
| data.set.name | string | Yes | |
| data.set.source_name | string | No | |
| data.set.links | integer | Yes | (min -9007199254740991, max 9007199254740991) |
| data.set.folders | integer | Yes | (min -9007199254740991, max 9007199254740991) |
| data.set.rejected_count | integer | Yes | (min -9007199254740991, max 9007199254740991) |
| data.set.rejected | array<object> | No | Up to 50 examples (title and scheme only) |
| data.set.rejected[].reason | "unsafe_scheme" | "invalid_url" | "credentials" | "too_long" | "too_deep" | "over_limit" | Yes | |
| data.set.rejected[].title | string | Yes | |
| data.set.rejected[].scheme | string | Yes | |
| data.set.duplicates_in_file | integer | Yes | (min -9007199254740991, max 9007199254740991) |
| data.set.sha256 | string | Yes | |
| data.set.created_at | string | Yes | |
| data.set.pending | integer | Yes | Profiles that still wait for (or are applying) this import (min -9007199254740991, max 9007199254740991) |
| data.set.applied | integer | Yes | (min -9007199254740991, max 9007199254740991) |
| data.created | boolean | Yes | false: this exact list was already imported |
| correlation_id | string (uuid) | Yes | |
| replayed | boolean | No | true when this command_id was already applied and the stored receipt came back |
Errors
| Code | HTTP | Retryable |
|---|---|---|
| UNAUTHENTICATED | 401 | No |
| FORBIDDEN | 403 | No |
| RATE_LIMITED | 429 | Yes |
| VALIDATION_FAILED | 422 | No |
| CONFLICT | 409 | No |
| OUTCOME_UNKNOWN | 202 | Yes |
| DEPENDENCY_UNAVAILABLE | 503 | Yes |
| UNKNOWN | 500 | No |
