### Parse URL Response Examples Source: https://github.com/raindropio/developer-site/blob/master/v1/import.md Provides examples of successful URL parsing, invalid URL responses, and 404 Not Found errors when parsing a URL. ```javascript //Success { "item": { "title": "Яндекс", "excerpt": "Найдётся всё", "media": [ { "type": "image", "link": "http://yastatic.net/s3/home/logos/share/share-logo_ru.png" } ], "type": "link", "meta": { "possibleArticle": false, "canonical": "https://ya.ru", "site": "Яндекс", "tags": [] } }, "result": true } //Invalid URL { "error": "not_found", "errorMessage": "invalid_url", "item": { "title": "Fdfdfdf", "excerpt": "", "media": [ { "link": "" } ], "type": "link", "parser": "local", "meta": { "possibleArticle": false, "tags": [] } }, "result": true } //Not found { "error": "not_found", "errorMessage": "url_status_404", "item": { "title": "Some", "excerpt": "", "media": [ { "link": "" } ], "type": "link", "parser": "local", "meta": { "possibleArticle": false, "tags": [] } }, "result": true } ``` -------------------------------- ### CORS Request Example Source: https://github.com/raindropio/developer-site/blob/master/README.md A sample HTTP response for a Cross-Origin Resource Sharing request from a browser. ```http HTTP/1.1 200 OK Access-Control-Allow-Origin: http://example.com Access-Control-Expose-Headers: ETag, Content-Type, Accept, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset Access-Control-Allow-Credentials: true ``` -------------------------------- ### Timestamp Format Example Source: https://github.com/raindropio/developer-site/blob/master/README.md API timestamps are returned in ISO 8601 format. ```bash YYYY-MM-DDTHH:MM:SSZ ``` -------------------------------- ### Get all highlights Source: https://github.com/raindropio/developer-site/blob/master/v1/highlights.md Retrieves a list of all highlights. Supports pagination with `page` and `perpage` query parameters. ```APIDOC ## GET /rest/v1/highlights ### Description Retrieves a list of all highlights. Supports pagination with `page` and `perpage` query parameters. ### Method GET ### Endpoint https://api.raindrop.io/rest/v1/highlights ### Parameters #### Query Parameters - **page** (Number) - Optional - The page number for pagination. - **perpage** (Number) - Optional - The number of highlights per page. Maximum 50. Defaults to 25. ### Response #### Success Response (200 OK) - **result** (Boolean) - Indicates if the request was successful. - **items** (Array) - A list of highlight objects. - **_id** (String) - Unique ID of the highlight. - **text** (String) - Text of the highlight. - **title** (String) - Title of the bookmark. - **color** (String) - Color of the highlight. Can be one of: blue, brown, cyan, gray, green, indigo, orange, pink, purple, red, teal, yellow. Defaults to yellow. - **note** (String) - Optional note for the highlight. - **created** (String) - Creation date of the highlight. - **tags** (Array) - List of tags associated with the highlight. - **link** (String) - Highlighted page URL. ### Response Example ```json { "result": true, "items": [ { "note": "Trully native macOS app", "color": "red", "text": "Orion is the new WebKit-based browser for Mac", "created": "2022-03-21T14:41:34.059Z", "tags": ["tag1", "tag2"], "_id": "62388e9e48b63606f41e44a6", "raindropRef": 123, "link": "https://apple.com", "title": "Orion Browser" }, { "note": "", "color": "green", "text": "Built on WebKit, Orion gives you a fast, smooth and lightweight browsing experience", "created": "2022-03-21T15:13:21.128Z", "tags": ["tag1", "tag2"], "_id": "62389611058af151c840f667", "raindropRef": 123, "link": "https://apple.com", "title": "Apple" } ] } ``` ``` -------------------------------- ### Bearer Token Authentication Header Source: https://github.com/raindropio/developer-site/blob/master/mcp/README.md Example of how to include an access token in the Authorization header for authentication with the MCP server. ```http Authorization: Bearer ``` -------------------------------- ### Check URL Existence Response Examples Source: https://github.com/raindropio/developer-site/blob/master/v1/import.md Demonstrates responses for checking if URLs already exist in Raindrop.io. Includes cases where URLs are found and not found. ```javascript //Found { "result": true, "ids": [ 3322, 12323 ] } //Not found { "result": false, "ids": [] } ``` -------------------------------- ### Collection Response Example Source: https://github.com/raindropio/developer-site/blob/master/v1/collections/methods.md This is a typical successful response when retrieving or modifying a collection. It indicates the operation was successful and provides the updated item details. ```javascript { "result": true, "item": { ... } } ``` -------------------------------- ### HTML Import File Parsing Response Source: https://github.com/raindropio/developer-site/blob/master/v1/import.md Example of a successful response after parsing an HTML bookmark file. Shows the structured JSON output with items, folders, and bookmarks. ```javascript { "result": true, "items": [ { "title": "Web", "folders": [ { "title": "Default", "folders": [], "bookmarks": [ { "link": "https://aaa.com/a", "title": "Name 1", "lastUpdate": "2016-09-13T11:17:09.000Z", "tags": ["tag"], "excerpt": "" } ] } ], "bookmarks": [ { "link": "https://bbb.com/b", "title": "Name 2", "lastUpdate": "2016-09-13T11:17:09.000Z", "tags": ["tag"], "excerpt": "" } ] }, { "title": "Home", "folders": [ { "title": "Inspiration", "folders": [], "bookmarks": [ { "link": "https://ccc.com/c", "title": "Name 3", "lastUpdate": "2016-09-13T11:17:09.000Z", "tags": ["tag"], "excerpt": "" } ] } ], "bookmarks": [] } ] } ``` -------------------------------- ### Step 1: Authorization Request (cURL Example) Source: https://github.com/raindropio/developer-site/blob/master/v1/authentication/token.md This cURL command initiates the OAuth2 authorization flow by directing the user to Raindrop.io's authorization URL. Ensure you replace `client_id` and `redirect_uri` with your application's specific values. ```bash curl "https://api.raindrop.io/v1/oauth/authorize?client_id=5e1c382cf6f48c0211359083&redirect_uri=https:%2F%2Foauthdebugger.com%2Fdebug" ``` -------------------------------- ### Get User by Name Source: https://github.com/raindropio/developer-site/blob/master/v1/user/authenticated.md Retrieves publicly available details of a user by their name. ```APIDOC ## GET /rest/v1/user/{name} ### Description Get's publicly available user details ### Method GET ### Endpoint https://api.raindrop.io/rest/v1/user/{name} ### Parameters #### Path Parameters - **name** (string) - Required - Username ### Response #### Success Response (200) - **result** (boolean) - Indicates if the request was successful. - **user** (object) - Contains the user's public details. - **_id** (number) - User's unique identifier. - **email_MD5** (string) - MD5 hash of the user's email. - **fullName** (string) - User's full name. - **pro** (boolean) - Indicates if the user has a pro subscription. - **registered** (string) - Registration date of the user. #### Response Example (200) ```json { "result": true, "user": { "_id": 32, "email_MD5": "13a0a20681d8781912e5314150694bf7", "fullName": "Mussabekov Rustem", "pro": true, "registered": "2014-09-30T07:51:15.406Z" } } ``` #### Response Example (404) ```json { "error": -1, "errorMessage": "not found", "result": false } ``` ``` -------------------------------- ### Get Highlight by ID Source: https://github.com/raindropio/developer-site/blob/master/v1/highlights.md Retrieves a specific highlight by its unique ID. ```APIDOC ## GET /rest/v1/raindrop/{id} ### Description Retrieves the details of a specific highlight using its ID. ### Method GET ### Endpoint /rest/v1/raindrop/{id} ### Parameters #### Path Parameters - **id** (number) - Required - The unique identifier of the raindrop to retrieve highlights from. ### Response #### Success Response (200) - **result** (boolean) - Indicates if the operation was successful. - **item** (object) - The raindrop item containing highlights. - **_id** (number) - The unique identifier for the raindrop. - **highlights** (array) - An array of highlight objects associated with the raindrop. - **note** (string) - User-added notes for the highlight. - **color** (string) - The color associated with the highlight. - **text** (string) - The highlighted text content. - **created** (string) - The timestamp when the highlight was created. - **lastUpdate** (string) - The timestamp when the highlight was last updated. - **_id** (string) - The unique identifier for the highlight. ### Response Example ```json { "result": true, "item": { "_id": 373777232, "highlights": [ { "note": "Trully native macOS app", "color": "red", "text": "Orion is the new WebKit-based browser for Mac", "created": "2022-03-21T14:41:34.059Z", "lastUpdate": "2022-03-22T14:30:52.004Z", "_id": "62388e9e48b63606f41e44a6" } ] } } ``` ``` -------------------------------- ### Get system collections count Source: https://github.com/raindropio/developer-site/blob/master/v1/collections/methods.md Retrieves the counts for system-defined collections (e.g., all, trash, uncategorized). ```APIDOC ## Get system collections count ### Description Retrieves the counts for system-defined collections (e.g., all, trash, uncategorized). ### Method GET ### Endpoint https://api.raindrop.io/rest/v1/user/stats ### Response #### Success Response (200) - **items** (array) - An array of objects, each containing an `_id` and `count` for a system collection. - **meta** (object) - Metadata about the user account and statistics, including `pro` status, `_id`, `changedBookmarksDate`, `duplicates`, and `broken` counts. ``` -------------------------------- ### Get User by Name Source: https://github.com/raindropio/developer-site/blob/master/v1/user/authenticated.md Retrieves publicly available user details using their username. Requires the username to be specified in the path. ```javascript { "result": true, "user": { "_id": 32, "email_MD5": "13a0a20681d8781912e5314150694bf7", "fullName": "Mussabekov Rustem", "pro": true, "registered": "2014-09-30T07:51:15.406Z" } } ``` -------------------------------- ### Get Authenticated User Details Source: https://github.com/raindropio/developer-site/blob/master/v1/user/authenticated.md Retrieves the details of the currently authenticated user. This includes configuration, storage usage, and subscription status. ```javascript { "result": true, "user": { "_id": 32, "config": { "broken_level": "strict", "font_color": "", "font_size": 0, "lang": "ru_RU", "last_collection": 8492393, "raindrops_sort": "-lastUpdate", "raindrops_view": "list" }, "dropbox": { "enabled": true }, "email": "some@email.com", "email_MD5": "13a0a20681d8781912e5314150694bf7", "files": { "used": 6766094, "size": 10000000000, "lastCheckPoint": "2020-01-26T23:53:19.676Z" }, "fullName": "Mussabekov Rustem", "gdrive": { "enabled": true }, "groups": [ { "title": "My Collections", "hidden": false, "sort": 0, "collections": [ 8364483, 8364403, 66 ] } ], "password": true, "pro": true, "proExpire": "2028-09-27T22:00:00.000Z", "registered": "2014-09-30T07:51:15.406Z" } } ``` -------------------------------- ### Get Highlights Source: https://github.com/raindropio/developer-site/blob/master/v1/highlights.md Retrieves a list of highlights for a given collection. Supports pagination and custom per-page limits. ```APIDOC ## GET /rest/v1/collection/:collectionId/highlights ### Description Retrieves highlights for a specific collection, with options for pagination. ### Method GET ### Endpoint /rest/v1/collection/:collectionId/highlights ### Parameters #### Path Parameters - **collectionId** (Number) - Required - The ID of the collection to retrieve highlights from. - **page** (Number) - Optional - The page number for pagination. - **perpage** (Number) - Optional - The number of highlights to return per page. Maximum is 50. Defaults to 25. ### Response #### Success Response (200) - **result** (boolean) - Indicates if the operation was successful. - **items** (array) - An array of highlight objects. - **note** (string) - User-added notes for the highlight. - **color** (string) - The color associated with the highlight. - **text** (string) - The highlighted text content. - **created** (string) - The timestamp when the highlight was created. - **tags** (array) - An array of tags associated with the highlight. - **_id** (string) - The unique identifier for the highlight. - **raindropRef** (Number) - Reference ID to the raindrop. - **link** (string) - The URL the highlight is associated with. - **title** (string) - The title of the linked content. ### Response Example ```json { "result": true, "items": [ { "note": "Trully native macOS app", "color": "red", "text": "Orion is the new WebKit-based browser for Mac", "created": "2022-03-21T14:41:34.059Z", "tags": ["tag1", "tag2"], "_id": "62388e9e48b63606f41e44a6", "raindropRef": 123, "link": "https://apple.com", "title": "Apple" } ] } ``` ``` -------------------------------- ### Get All Highlights for a Collection Source: https://github.com/raindropio/developer-site/blob/master/v1/highlights.md Retrieves a list of highlights associated with a specific collection. Supports pagination parameters. ```javascript { "result": true, "items": [ { "note": "Trully native macOS app", "color": "red", "text": "Orion is the new WebKit-based browser for Mac", "created": "2022-03-21T14:41:34.059Z", "tags": ["tag1", "tag2"], "_id": "62388e9e48b63606f41e44a6", "raindropRef": 123, "link": "https://apple.com", "title": "Apple" }, { "note": "", "color": "green", "text": "Built on WebKit, Orion gives you a fast, smooth and lightweight browsing experience", "created": "2022-03-21T15:13:21.128Z", "tags": ["tag1", "tag2"], "_id": "62389611058af151c840f667", "raindropRef": 123, "link": "https://apple.com", "title": "Apple" } ] } ``` -------------------------------- ### Rate Limit Exceeded Response Source: https://github.com/raindropio/developer-site/blob/master/README.md An example of an HTTP response when the API rate limit is exceeded. ```http HTTP/1.1 429 Too Many Requests Status: 429 Too Many Requests X-RateLimit-Limit: 120 X-RateLimit-Remaining: 0 X-RateLimit-Reset: 1392321600 ``` -------------------------------- ### Get All Backups Source: https://github.com/raindropio/developer-site/blob/master/v1/backups.md Retrieves a list of backup IDs. The backups are sorted by creation date with the most recent first. This is useful for obtaining IDs needed for the download endpoint. ```json { "result": true, "items": [ { "_id": "659d42a35ffbb2eb5ae1cb86", "created": "2024-01-09T12:57:07.630Z" } ] } ``` -------------------------------- ### Get Root Collections Source: https://github.com/raindropio/developer-site/blob/master/v1/collections/methods.md Retrieves all top-level collections. This is useful for displaying a user's main collection structure. ```javascript { "result": true, "items": [ { "_id": 8492393, "access": { "level": 4, "draggable": true }, "collaborators": { "$id": "5dc1759a0e123be5f2654b6f" }, "color": "#0c797d", "count": 16, "cover": [ "https://up.raindrop.io/collection/thumbs/849/239/3/333ce18769311113836cf93a223a14a3.png" ], "created": "2019-10-09T11:49:53.518Z", "expanded": false, "lastUpdate": "2019-11-27T17:51:19.085Z", "public": false, "sort": 8492393, "title": "Development", "user": { "$id": 32 }, "view": "list" } ] } ``` -------------------------------- ### Get Collaborators List Source: https://github.com/raindropio/developer-site/blob/master/v1/collections/sharing.md Retrieves a list of collaborators for a given collection, including their user ID, email, name, and role. ```javascript { "items": [ { "_id": 373381, "email": "some@mail.com", "email_MD5": "e12bda18ca265d3f3e30d247adea2549", "fullName": "Jakie Future", "registered": "2019-08-18T17:01:43.664Z", "role": "viewer" } ], "result": true } ``` -------------------------------- ### Get Featured Covers Source: https://github.com/raindropio/developer-site/blob/master/v1/collections/covers-icons.md Retrieve a list of featured covers and icons. This endpoint is useful for displaying a curated selection of icons to users. ```javascript { "items": [ { "title": "Colors circle", "icons": [ { "png": "https://up.raindrop.io/collection/templates/colors/ios1.png" } ] }, { "title": "Hockey", "icons": [ { "png": "https://up.raindrop.io/collection/templates/hockey-18/12i.png" } ] } ] } ``` -------------------------------- ### Download backup file Source: https://github.com/raindropio/developer-site/blob/master/v1/backups.md Downloads a backup file in a specified format (HTML or CSV) using the backup ID. An example URL is provided for direct download. ```APIDOC ## GET /rest/v1/backup/{ID}.{format} ### Description Downloads a backup file in the specified format. For example: `https://api.raindrop.io/rest/v1/backup/659d42a35ffbb2eb5ae1cb86.csv` ### Method GET ### Endpoint /rest/v1/backup/{ID}.{format} ### Parameters #### Path Parameters - **ID** (string) - Required - Backup ID - **format** (string) - Required - File format: `html` or `csv` ``` -------------------------------- ### API Response with Highlights Source: https://github.com/raindropio/developer-site/blob/master/v1/highlights.md This is an example of a successful API response (status 200) when retrieving an item that includes its highlights. It shows the structure of the 'highlights' array within the 'item' object. ```javascript { "result": true, "item": { "_id": 373777232, "highlights": [ { "note": "Trully native macOS app", "color": "red", "text": "Orion is the new WebKit-based browser for Mac", "created": "2022-03-21T14:41:34.059Z", "lastUpdate": "2022-03-22T14:30:52.004Z", "_id": "62388e9e48b63606f41e44a6" }, { "note": "", "color": "green", "text": "Built on WebKit, Orion gives you a fast, smooth and lightweight browsing experience", "created": "2022-03-21T15:13:21.128Z", "lastUpdate": "2022-03-22T09:15:18.751Z", "_id": "62389611058af151c840f667" } ] }} ``` -------------------------------- ### Get System Collections Count Source: https://github.com/raindropio/developer-site/blob/master/v1/collections/methods.md Retrieves the count of items within system-defined collections like 'All Items', 'Trash', and 'Unsorted'. ```javascript { "items": [ { "_id": 0, "count": 1570 }, { "_id": -1, "count": 34 }, { "_id": -99, "count": 543 } ], "meta": { "pro": true, "_id": 32, "changedBookmarksDate": "2020-02-11T11:23:43.143Z", "duplicates": { "count": 3 }, "broken": { "count": 31 } }, "result": true } ``` -------------------------------- ### Download Backup File Source: https://github.com/raindropio/developer-site/blob/master/v1/backups.md Allows downloading a backup file in a specified format (HTML or CSV) using a backup ID. An example URL is provided for downloading a CSV backup. ```http https://api.raindrop.io/rest/v1/backup/659d42a35ffbb2eb5ae1cb86.csv ``` -------------------------------- ### Get all backups Source: https://github.com/raindropio/developer-site/blob/master/v1/backups.md Retrieves a list of backup IDs. The backups are sorted by date with the most recent ones appearing first. These IDs can be used to download specific backup files. ```APIDOC ## GET /rest/v1/backups ### Description Useful to get backup ID's that can be used in `/backup/{ID}.{format}` endpoint. Sorted by date (new first). ### Method GET ### Endpoint /rest/v1/backups ### Response #### Success Response (200) - **result** (boolean) - Indicates if the operation was successful. - **items** (array) - An array of backup objects. - **_id** (string) - The unique identifier for the backup. - **created** (string) - The timestamp when the backup was created. ### Response Example ```json { "result": true, "items": [ { "_id": "659d42a35ffbb2eb5ae1cb86", "created": "2024-01-09T12:57:07.630Z" } ] } ``` ``` -------------------------------- ### API Response After Removing Highlight Source: https://github.com/raindropio/developer-site/blob/master/v1/highlights.md This is an example of a successful API response (status 200) after a highlight has been removed. The 'highlights' array in the 'item' object will reflect the changes. ```javascript { "result": true, "item": { "_id": 373777232, "highlights": [ { "note": "Trully native macOS app", "color": "red", "text": "Orion is the new WebKit-based browser for Mac", "created": "2022-03-21T14:41:34.059Z", "lastUpdate": "2022-03-22T14:30:52.004Z", "_id": "62388e9e48b63606f41e44a6" }, { "note": "", "color": "green", "text": "Built on WebKit, Orion gives you a fast, smooth and lightweight browsing experience", "created": "2022-03-21T15:13:21.128Z", "lastUpdate": "2022-03-22T09:15:18.751Z", "_id": "62389611058af151c840f667" } ] }} ``` -------------------------------- ### Get All Highlights Response Source: https://github.com/raindropio/developer-site/blob/master/v1/highlights.md This JSON object represents a successful response when fetching all highlights. It includes a boolean indicating success and an array of highlight items, each with details like text, color, tags, and ID. ```javascript { "result": true, "items": [ { "note": "Trully native macOS app", "color": "red", "text": "Orion is the new WebKit-based browser for Mac", "created": "2022-03-21T14:41:34.059Z", "tags": ["tag1", "tag2"], "_id": "62388e9e48b63606f41e44a6", "raindropRef": 123, "link": "https://apple.com", "title": "Orion Browser" }, { "note": "", "color": "green", "text": "Built on WebKit, Orion gives you a fast, smooth and lightweight browsing experience", "created": "2022-03-21T15:13:21.128Z", "tags": ["tag1", "tag2"], "_id": "62389611058af151c840f667", "raindropRef": 123, "link": "https://apple.com", "title": "Apple" } ] } ``` -------------------------------- ### Get Root Collections Source: https://github.com/raindropio/developer-site/blob/master/v1/collections/methods.md Retrieves a JSON-encoded array containing all root collections. This is useful for getting a top-level overview of a user's collection structure. ```APIDOC ## GET /v1/collections ### Description Returns a JSON-encoded array containing all root collections. ### Method GET ### Endpoint https://api.raindrop.io/rest/v1/collections ### Response #### Success Response (200) - **result** (boolean) - Indicates if the request was successful. - **items** (array) - An array of collection objects. - **_id** (number) - The unique identifier for the collection. - **access** (object) - Access control information for the collection. - **collaborators** (object) - Information about collaborators. - **color** (string) - The color associated with the collection. - **count** (number) - The number of items within the collection. - **cover** (array) - An array of URLs for the collection's cover image. - **created** (string) - The timestamp when the collection was created. - **expanded** (boolean) - Indicates if the collection is expanded. - **lastUpdate** (string) - The timestamp of the last update. - **public** (boolean) - Indicates if the collection is public. - **sort** (number) - The sorting order of the collection. - **title** (string) - The title of the collection. - **user** (object) - Information about the user who owns the collection. - **view** (string) - The view mode of the collection. ### Response Example ```json { "result": true, "items": [ { "_id": 8492393, "access": { "level": 4, "draggable": true }, "collaborators": { "$id": "5dc1759a0e123be5f2654b6f" }, "color": "#0c797d", "count": 16, "cover": [ "https://up.raindrop.io/collection/thumbs/849/239/3/333ce18769311113836cf93a223a14a3.png" ], "created": "2019-10-09T11:49:53.518Z", "expanded": false, "lastUpdate": "2019-11-27T17:51:19.085Z", "public": false, "sort": 8492393, "title": "Development", "user": { "$id": 32 }, "view": "list" } ] } ``` ``` -------------------------------- ### Get Raindrop Source: https://github.com/raindropio/developer-site/blob/master/v1/raindrops/single.md Retrieves a single raindrop by its unique ID. ```APIDOC ## GET /v1/raindrop/{id} ### Description Retrieves a single raindrop by its unique ID. ### Method GET ### Endpoint https://api.raindrop.io/rest/v1/raindrop/{id} ### Parameters #### Path Parameters - **id** (number) - Required - Existing raindrop ID ``` -------------------------------- ### Generate New Backup Source: https://github.com/raindropio/developer-site/blob/master/v1/backups.md Initiates the creation of a new backup. A confirmation message is returned, and an email will be sent with the export file once the backup is ready. The time required depends on the number of bookmarks and server queue. ```text We will send you email with html export file when it be ready! Time depends on bookmarks count and queue. ``` -------------------------------- ### Generate new backup Source: https://github.com/raindropio/developer-site/blob/master/v1/backups.md Initiates the creation of a new backup. The process may take some time, and the user will be notified via email once the backup is ready. The new backup will then be available in the list returned by the `/backups` endpoint. ```APIDOC ## GET /rest/v1/backup ### Description Useful to create a brand new backup. This requires some time. New backup will appear in the list of `/backups` endpoint. ### Method GET ### Endpoint /rest/v1/backup ### Response #### Success Response (200) - The response indicates that an email will be sent with the HTML export file when it is ready. The time required depends on the number of bookmarks and the current queue status. ### Response Example ``` We will send you email with html export file when it be ready! Time depends on bookmarks count and queue. ``` ``` -------------------------------- ### Get all highlights in a collection Source: https://github.com/raindropio/developer-site/blob/master/v1/highlights.md Retrieves all highlights that belong to a specific collection. ```APIDOC ## GET /rest/v1/highlights/{collectionId} ### Description Retrieves all highlights that belong to a specific collection. ### Method GET ### Endpoint https://api.raindrop.io/rest/v1/highlights/{collectionId} ### Parameters #### Path Parameters - **collectionId** (String) - Required - The ID of the collection to retrieve highlights from. ``` -------------------------------- ### Get Authenticated User Source: https://github.com/raindropio/developer-site/blob/master/v1/user/authenticated.md Retrieves the details of the currently authenticated user. ```APIDOC ## GET /rest/v1/user ### Description Get currently authenticated user details ### Method GET ### Endpoint https://api.raindrop.io/rest/v1/user ### Response #### Success Response (200) - **result** (boolean) - Indicates if the request was successful. - **user** (object) - Contains the user's details. - **_id** (number) - User's unique identifier. - **config** (object) - User's configuration settings. - **email** (string) - User's email address. - **email_MD5** (string) - MD5 hash of the user's email. - **files** (object) - Information about user's files. - **fullName** (string) - User's full name. - **gdrive** (object) - Google Drive integration status. - **groups** (array) - Array of user's collection groups. - **password** (boolean) - Indicates if the user has a password set. - **pro** (boolean) - Indicates if the user has a pro subscription. - **proExpire** (string) - Expiration date of the pro subscription. - **registered** (string) - Registration date of the user. #### Response Example (200) ```json { "result": true, "user": { "_id": 32, "config": { "broken_level": "strict", "font_color": "", "font_size": 0, "lang": "ru_RU", "last_collection": 8492393, "raindrops_sort": "-lastUpdate", "raindrops_view": "list" }, "dropbox": { "enabled": true }, "email": "some@email.com", "email_MD5": "13a0a20681d8781912e5314150694bf7", "files": { "used": 6766094, "size": 10000000000, "lastCheckPoint": "2020-01-26T23:53:19.676Z" }, "fullName": "Mussabekov Rustem", "gdrive": { "enabled": true }, "groups": [ { "title": "My Collections", "hidden": false, "sort": 0, "collections": [ 8364483, 8364403, 66 ] } ], "password": true, "pro": true, "proExpire": "2028-09-27T22:00:00.000Z", "registered": "2014-09-30T07:51:15.406Z" } } ``` #### Response Example (401) ```http Unauthorized ``` ``` -------------------------------- ### Parse HTML import file Source: https://github.com/raindropio/developer-site/blob/master/v1/import.md Converts an HTML bookmark file (supporting Netscape, Pocket, and Instapaper formats) into a JSON structure. ```APIDOC ## POST /v1/import/file ### Description Convert HTML bookmark file to JSON. Support Nestcape, Pocket and Instapaper file formats. ### Method POST ### Endpoint https://api.raindrop.io/rest/v1/import/file #### Headers - **Content-Type** (string) - Required - Must be set to `multipart/form-data`. #### Request Body - **import** (file) - Required - The HTML bookmark file to import. ### Response #### Success Response (200) - **result** (boolean) - **items** (array of objects) - **title** (string) - **folders** (array of objects) - **title** (string) - **folders** (array of objects) - **bookmarks** (array of objects) - **link** (string) - **title** (string) - **lastUpdate** (string) - **tags** (array of strings) - **excerpt** (string) - **bookmarks** (array of objects) ### Response Example ```json { "result": true, "items": [ { "title": "Web", "folders": [ { "title": "Default", "folders": [], "bookmarks": [ { "link": "https://aaa.com/a", "title": "Name 1", "lastUpdate": "2016-09-13T11:17:09.000Z", "tags": ["tag"], "excerpt": "" } ] } ], "bookmarks": [ { "link": "https://bbb.com/b", "title": "Name 2", "lastUpdate": "2016-09-13T11:17:09.000Z", "tags": ["tag"], "excerpt": "" } ] }, { "title": "Home", "folders": [ { "title": "Inspiration", "folders": [], "bookmarks": [ { "link": "https://ccc.com/c", "title": "Name 3", "lastUpdate": "2016-09-13T11:17:09.000Z", "tags": ["tag"], "excerpt": "" } ] } ], "bookmarks": [] } ] } ``` ``` -------------------------------- ### Step 1: The authorization request Source: https://github.com/raindropio/developer-site/blob/master/v1/authentication/token.md Direct the user to the authorization URL with specified request parameters to initiate the OAuth2 flow. The user will be prompted to log in if not already authenticated and asked to grant your application access to their Raindrop.io data. ```APIDOC ## GET /oauth/authorize ### Description Direct the user to our authorization URL with specified request parameters. — If the user is not logged in, they will be asked to log in — The user will be asked if he would like to grant your application access to his Raindrop.io data ### Method GET ### Endpoint https://raindrop.io/oauth/authorize ### Parameters #### Query Parameters - **redirect_uri** (string) - Required - Redirect URL configured in your application setting - **client_id** (string) - Required - The unique Client ID of the Raindrop.io app that you registered ### Response #### Success Response (307) Check details in Step 2 ### Request Example ```bash curl "https://api.raindrop.io/v1/oauth/authorize?client_id=5e1c382cf6f48c0211359083&redirect_uri=https:%2F%2Foauthdebugger.com%2Fdebug" ``` ``` -------------------------------- ### Suggest Collection and Tags Response Source: https://github.com/raindropio/developer-site/blob/master/v1/raindrops/single.md This snippet shows the JSON response when suggesting collections and tags for a new bookmark based on its link. ```json { "result": true, "item": { "collections": [ { "$id": 568368 }, { "$id": 8519567 }, { "$id": 1385626 }, { "$id": 8379661 }, { "$id": 20865985 } ], "tags": [ "fonts", "free", "engineering", "icons", "invalid_parser" ] } } ``` -------------------------------- ### Create Collection Source: https://github.com/raindropio/developer-site/blob/master/v1/collections/methods.md Creates a new collection. You can specify details like title, parent collection, and visibility. ```APIDOC ## POST /v1/collection ### Description Creates a new collection. ### Method POST ### Endpoint https://api.raindrop.io/rest/v1/collection ### Parameters #### Request Body - **view** (string) - Required - Specifies the view mode for the collection. More details in "Fields". - **title** (string) - Required - The name of the collection. - **sort** (number) - Optional - The order of the collection (descending). Defines the position among collections with the same `parent.$id`. - **public** (boolean) - Optional - Indicates if the collection and its contents are publicly accessible without authentication. - **parent.$id** (integer) - Optional - The ID of the parent collection. Omit for root collections. - **cover** (array) - Optional - An array containing the URL for the collection's cover image. ### Response #### Success Response (200) - **result** (boolean) - Indicates if the request was successful. - **item** (object) - The newly created collection object. #### Error Response (400 Incorrect 'view' field value) - **result** (boolean) - Indicates if the request was successful. - **error** (string) - Specifies the field with the error. - **errorMessage** (string) - A detailed message about the validation error. ### Response Example (Success) ```json { "result": true, "item": { ... } } ``` ### Response Example (Error) ```json { "result": false, "error": "view", "errorMessage": "Collection validation failed: view: `bla` is not a valid enum value for path `view`." } ``` ``` -------------------------------- ### CURL Request for Token Exchange Source: https://github.com/raindropio/developer-site/blob/master/v1/authentication/token.md This CURL command demonstrates how to make a POST request to exchange an authorization code for an access token. Ensure all required body parameters are included. ```bash curl -X "POST" "https://raindrop.io/oauth/access_token" \ -H 'Content-Type: application/json' \ -d $'{ "code": "c8983220-1cca-4626-a19d-801a6aae003c", "client_id": "5e1c589cf6f48c0211311383", "redirect_uri": "https://oauthdebugger.com/debug", "client_secret": "c3363988-9d27-4bc6-a0ae-d126ce78dc09", "grant_type": "authorization_code" }' ``` -------------------------------- ### Get Collection Source: https://github.com/raindropio/developer-site/blob/master/v1/collections/methods.md Retrieves details for a specific collection by its ID. This is useful for fetching information about a single collection. ```APIDOC ## GET /v1/collection/{id} ### Description Retrieves details for a specific collection by its ID. ### Method GET ### Endpoint https://api.raindrop.io/rest/v1/collection/{id} ### Parameters #### Path Parameters - **id** (number) - Required - The unique identifier for the collection. ### Response #### Success Response (200) - **result** (boolean) - Indicates if the request was successful. - **item** (object) - The collection object with detailed information. ### Response Example ```json { "result": true, "item": { "_id": 8492393, "access": { "for": 32, "level": 4, "root": true, "draggable": true }, "author": true, "collaborators": { "$id": "5dc1759a0e123be5f2654b6f" }, "color": "#0c797d", "count": 16, "cover": [ "https://up.raindrop.io/collection/thumbs/849/239/3/333ce18769311113836cf93a223a14a3.png" ], "created": "2019-10-09T11:49:53.518Z", "expanded": false, "lastUpdate": "2019-11-27T17:51:19.085Z", "public": false, "sort": 8492393, "title": "Development", "user": { "$id": 32 }, "view": "list" } } ``` ``` -------------------------------- ### Suggest Collection and Tags for New Bookmark Source: https://github.com/raindropio/developer-site/blob/master/v1/raindrops/single.md Suggests relevant collections and tags for a new bookmark based on its URL. ```APIDOC ## Suggest collection and tags for new bookmark `POST` `https://api.raindrop.io/rest/v1/raindrop/suggest` #### Request Body | Name | Type | Description | |---|---|---| | link* | string | | {% tabs %} {% tab title="200 " %} ```json { "result": true, "item": { "collections": [ { "$id": 568368 }, { "$id": 8519567 }, { "$id": 1385626 }, { "$id": 8379661 }, { "$id": 20865985 } ], "tags": [ "fonts", "free", "engineering", "icons", "invalid_parser" ] } } ``` {% endtab %} {% endtabs %} ``` -------------------------------- ### Create Collection Source: https://github.com/raindropio/developer-site/blob/master/v1/collections/methods.md Creates a new collection. Requires parameters like title, view, and optionally parent ID and cover. Handles success and error responses. ```javascript { "result": true, "item": { ... } } ``` ```javascript { "result": false, "error": "view", "errorMessage": "Collection validation failed: view: `bla` is not a valid enum value for path `view`." } ```