Collections
One level of collections. A bookmark can be in several.
- get /v1/collections
- post /v1/collections
- patch /v1/collections/{id}
- delete /v1/collections/{id}
- post /v1/collections/reorder
- post /v1/collections/{id}/bookmarks
- delete /v1/collections/{id}/bookmarks/{bookmarkId}
get /v1/collections
Collections in display order.
Key or token with collections:read Returns 200
Example
curl 'https://api.bkmark.it/v1/collections' \
-H "Authorization: Bearer $BKMARK_TOKEN" Response fields (1)
| Name | Type | Description |
|---|---|---|
datarequired | object[] | |
idrequired | uuid | |
namerequired | string | |
huerequired | integer or null | -9007199254740991–9007199254740991. |
positionrequired | integer | -9007199254740991–9007199254740991. |
bookmarkCountrequired | integer | -9007199254740991–9007199254740991. |
createdAtrequired | string | |
updatedAtrequired | string |
post /v1/collections
Create a collection (added last).
Key or token with collections:write Returns 201
Body
| Name | Type | Description |
|---|---|---|
namerequired | string | 1–100 characters. |
hue | integer or null | 0–359. |
Example
curl -X POST 'https://api.bkmark.it/v1/collections' \
-H "Authorization: Bearer $BKMARK_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"name":"Hybrid search with pgvector"}' Response fields (7)
| Name | Type | Description |
|---|---|---|
idrequired | uuid | |
namerequired | string | |
huerequired | integer or null | -9007199254740991–9007199254740991. |
positionrequired | integer | -9007199254740991–9007199254740991. |
bookmarkCountrequired | integer | -9007199254740991–9007199254740991. |
createdAtrequired | string | |
updatedAtrequired | string |
patch /v1/collections/{id}
Rename or recolour a collection.
Key or token with collections:write Returns 200
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | uuid | In the path. |
Body
| Name | Type | Description |
|---|---|---|
name | string | 1–100 characters. |
hue | integer or null | 0–359. |
Example
curl -X PATCH 'https://api.bkmark.it/v1/collections/0c9d3a52-6f1e-4b8a-9d2f-5e7a1b3c4d6e' \
-H "Authorization: Bearer $BKMARK_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"name":"Hybrid search with pgvector","hue":1}' Response fields (7)
| Name | Type | Description |
|---|---|---|
idrequired | uuid | |
namerequired | string | |
huerequired | integer or null | -9007199254740991–9007199254740991. |
positionrequired | integer | -9007199254740991–9007199254740991. |
bookmarkCountrequired | integer | -9007199254740991–9007199254740991. |
createdAtrequired | string | |
updatedAtrequired | string |
delete /v1/collections/{id}
Delete a collection (its bookmarks stay in the library).
Key or token with collections:write Returns 200
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | uuid | In the path. |
Example
curl -X DELETE 'https://api.bkmark.it/v1/collections/0c9d3a52-6f1e-4b8a-9d2f-5e7a1b3c4d6e' \
-H "Authorization: Bearer $BKMARK_TOKEN" Response fields (1)
| Name | Type | Description |
|---|---|---|
messagerequired | string |
post /v1/collections/reorder
Set the display order.
Key or token with collections:write Returns 200
Body
| Name | Type | Description |
|---|---|---|
idsrequired | uuid[] | Up to 500 items. |
Example
curl -X POST 'https://api.bkmark.it/v1/collections/reorder' \
-H "Authorization: Bearer $BKMARK_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"ids":["0c9d3a52-6f1e-4b8a-9d2f-5e7a1b3c4d6e"]}' Response fields (1)
| Name | Type | Description |
|---|---|---|
datarequired | object[] | |
idrequired | uuid | |
namerequired | string | |
huerequired | integer or null | -9007199254740991–9007199254740991. |
positionrequired | integer | -9007199254740991–9007199254740991. |
bookmarkCountrequired | integer | -9007199254740991–9007199254740991. |
createdAtrequired | string | |
updatedAtrequired | string |
post /v1/collections/{id}/bookmarks
Add bookmarks to a collection.
Key or token with collections:write Returns 200
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | uuid | In the path. |
Body
| Name | Type | Description |
|---|---|---|
bookmarkIdsrequired | uuid[] | Up to 500 items. |
Example
curl -X POST 'https://api.bkmark.it/v1/collections/0c9d3a52-6f1e-4b8a-9d2f-5e7a1b3c4d6e/bookmarks' \
-H "Authorization: Bearer $BKMARK_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"bookmarkIds":["0c9d3a52-6f1e-4b8a-9d2f-5e7a1b3c4d6e"]}' Response fields (1)
| Name | Type | Description |
|---|---|---|
updatedrequired | integer | -9007199254740991–9007199254740991. |
delete /v1/collections/{id}/bookmarks/{bookmarkId}
Remove a bookmark from a collection.
Key or token with collections:write Returns 200
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | uuid | In the path. |
bookmarkIdrequired | uuid | In the path. |
Example
curl -X DELETE 'https://api.bkmark.it/v1/collections/0c9d3a52-6f1e-4b8a-9d2f-5e7a1b3c4d6e/bookmarks/0c9d3a52-6f1e-4b8a-9d2f-5e7a1b3c4d6e' \
-H "Authorization: Bearer $BKMARK_TOKEN" Response fields (1)
| Name | Type | Description |
|---|---|---|
messagerequired | string |