API Reference

Authentication

All API requests must be authenticated using Bearer token authentication:

Authorization: Bearer your_api_token

Get your API token from the Dashboard Settings.

Base URL

https://api.sortlyai.app/v1

Endpoints

Bookmarks

List Bookmarks

GET /bookmarks

Query parameters:

  • page (optional): Page number for pagination
  • limit (optional): Items per page (default: 20, max: 100)
  • tags (optional): Filter by tags
  • query (optional): Natural language search query

Save Bookmark

POST /bookmarks

Request body:

{
  "url": "https://example.com",
  "title": "Optional custom title",
  "tags": ["optional", "custom", "tags"]
}

Get Bookmark

GET /bookmarks/{id}

Delete Bookmark

DELETE /bookmarks/{id}

Tags

List Tags

GET /tags

Create Custom Tag

POST /tags

Request body:

{
  "name": "my-tag",
  "color": "#FF0000"
}

Rate Limits

  • Free tier: 1000 requests/day
  • Pro tier: 10000 requests/day

Error Codes

| Code | Description | |------|-------------| | 401 | Unauthorized - Invalid API token | | 403 | Forbidden - Exceeded rate limit | | 404 | Resource not found | | 422 | Invalid request parameters |

SDKs

Official SDKs coming soon for:

  • JavaScript/TypeScript
  • Python
  • Go

Example Usage

const sortly = new SortlyAPI('your_api_token');

// Save a bookmark
const bookmark = await sortly.bookmarks.create({
  url: 'https://example.com',
  title: 'Example Website'
});

// Search bookmarks
const results = await sortly.bookmarks.search('machine learning articles');

For more examples and detailed guides, visit our Documentation Home.