APIBookmarks
Create Bookmark
Create a new bookmark using the SaveIt.now API
2 min read
apibookmarkscreate
Create Bookmark
Create a new bookmark in your SaveIt.now account.
API Reference
Method: POST
Endpoint: /api/v1/bookmarks
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
url | string | Yes | The URL to bookmark |
transcript | string | No | Optional transcript content for the bookmark |
metadata | object | No | Optional metadata object for additional information |
Examples
Bash (cURL)
curl -X POST https://saveit.now/api/v1/bookmarks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"url": "https://example.com/article",
"transcript": "Optional transcript content",
"metadata": {
"source": "api",
"category": "article"
}
}'
JavaScript
const response = await fetch('https://saveit.now/api/v1/bookmarks', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://example.com/article',
transcript: 'Optional transcript content',
metadata: {
source: 'api',
category: 'article'
}
})
});
const data = await response.json();
console.log(data);
Results
Success Response
{
"success": true,
"bookmark": {
"id": "bm_1234567890",
"url": "https://example.com/article",
"title": "Interesting Article",
"summary": "An article about web development",
"type": "ARTICLE",
"status": "PENDING",
"starred": false,
"read": false,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}
Error Responses
400 Bad Request - Invalid URL format or validation error
{
"success": false,
"error": "Invalid URL format"
}
401 Unauthorized - Invalid or missing API key
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}
409 Conflict - Bookmark already exists
{
"success": false,
"error": {
"code": "BOOKMARK_EXISTS",
"message": "A bookmark with this URL already exists"
}
}
Notes
- The page title, description, and other metadata will be automatically extracted from the URL
- Screenshots are generated asynchronously after bookmark creation
- Duplicate URLs are not allowed - use the update endpoint to modify existing bookmarks
- The API will validate the URL format and accessibility before creating the bookmark