# bookmarks.preview

`POST /api/public/v1/bookmarks/preview`

The bookmark revision (rev) of up to 500 profiles and how many imports each still waits for: send these revs as expected_rev to bookmarks.apply.

- Capability: `profile.read`
- Command: no
- MCP tool: `bookmarks_preview`

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `profile_ids` | body | array<string (uuid)> | yes | Profiles you plan to apply an import to (min 1 items, max 500 items) |

## Response

`200` with `{ data, correlation_id }`.

| Field | Type | Always present | Description |
|---|---|---|---|
| `data` | array<object> | yes |  |
| `data[].profile_id` | string (uuid) | yes |  |
| `data[].name` | string | yes |  |
| `data[].number` | integer | yes | (min -9007199254740991, max 9007199254740991) |
| `data[].rev` | integer | yes | (min -9007199254740991, max 9007199254740991) |
| `data[].pending` | integer | yes | (min -9007199254740991, max 9007199254740991) |
| `correlation_id` | string (uuid) | yes |  |
| `can_import` | boolean | no |  |

New fields can appear at any time; ignore the ones you do not know.

## Errors

| Code | HTTP | Retryable |
|---|---|---|
| `UNAUTHENTICATED` | 401 | no |
| `FORBIDDEN` | 403 | no |
| `RATE_LIMITED` | 429 | yes |
| `VALIDATION_FAILED` | 422 | no |
| `DEPENDENCY_UNAVAILABLE` | 503 | yes |
| `UNKNOWN` | 500 | no |

## Example (curl)

```bash
curl -X POST "https://browlix.com/api/public/v1/bookmarks/preview" \
  -H "Authorization: Bearer $BROWLIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profile_ids":["<profile_id>"]}'
```

## Example (TypeScript SDK)

```ts
import { Browlix } from "@browlix/sdk";

const bx = new Browlix({ apiKey: process.env.BROWLIX_API_KEY! });
const reply = await bx.call("bookmarks.preview", { body: {"profile_ids":["<profile_id>"]} });
console.log(reply.data);
```

## Example (Python)

```python
import os
import requests

r = requests.post(
    "https://browlix.com/api/public/v1/bookmarks/preview",
    headers={"Authorization": f"Bearer {os.environ['BROWLIX_API_KEY']}"},
    json={"profile_ids":["<profile_id>"]},
    timeout=60,
)
print(r.status_code, r.json())
```

## Example (MCP)

```json
{
  "method": "tools/call",
  "params": {
    "name": "bookmarks_preview",
    "arguments": {
      "profile_ids": [
        "<profile_id>"
      ]
    }
  }
}
```
