API Integration Guide
Last updated: February 2026
Overview
The Collections Manager exposes a RESTful API that lets you programmatically create, read, update, and delete collections and their items. Every action available in the web interface can also be performed through the API, making it straightforward to build custom integrations, automate workflows, or connect Collections Manager with third-party tools.
All API communication happens over HTTPS and uses JSON for both request and response payloads.
Authentication is handled through Bearer tokens included in the Authorization header.
Tip: If you are just getting started, try the interactive API Reference which includes a built-in request tester.
Authentication
All API requests must be authenticated. The Collections Manager API uses Bearer token authentication.
Include your token in the Authorization header of every request.
Obtaining a Token
Send a login request
POST your credentials to the authentication endpoint to receive an access token and a refresh token.
POST /api/auth/login
Content-Type: application/json
{
"email": "you@example.com",
"password": "your-password"
}Store the tokens
The response includes an access_token (short-lived) and a refresh_token (long-lived). Store both securely.
{
"success": true,
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"refresh_token": "dGhpcyBpcyBhIHJlZnJl...",
"token_type": "bearer",
"expires_in": 3600
}
}Use the access token
Attach the token to every subsequent API request.
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Refreshing a Token
Access tokens expire after 1 hour. Before or after expiration, use the refresh token to obtain a new access token without requiring the user to log in again.
POST /api/auth/refresh
Content-Type: application/json
{
"refresh_token": "dGhpcyBpcyBhIHJlZnJl..."
}Warning: Never expose your tokens in client-side code, version control, or log files. Treat them like passwords.
API Base URL & Versioning
All API endpoints are served under a versioned base URL. The current version is v1.
https://your-domain.com/api/v1
When a new API version is released, the previous version will continue to function for at least
12 months. Version deprecation notices will appear in the X-API-Deprecation response header.
Tip: For local development, the default base URL is
http://localhost:8050/api/v1.
Common Endpoints
Below are the most frequently used endpoints. See the full API Reference for all available routes.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/collections |
List all collections for the authenticated user, with pagination and optional filters. |
| POST | /api/collections |
Create a new collection. Requires name in the request body. |
| GET | /api/collections/:id |
Retrieve a single collection by its unique identifier. |
| PUT | /api/collections/:id |
Update an existing collection (name, description, visibility, etc.). |
| DELETE | /api/collections/:id |
Delete a collection. Moves to trash; permanently removed after 30 days. |
| GET | /api/collections/:id/items |
List all items within a specific collection, with pagination. |
| POST | /api/collections/:id/items |
Add a new item to a collection. |
Request & Response Format
Request Headers
Every request should include these headers:
Authorization: Bearer <your-access-token> Content-Type: application/json Accept: application/json
Standard Response Envelope
All responses are wrapped in a consistent envelope. Successful responses include a data
field, while errors include an error field.
// Success
{
"success": true,
"data": { ... },
"meta": {
"total": 42,
"page": 1,
"per_page": 20,
"pages": 3
}
}
// Error
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Name is required.",
"details": [ ... ]
}
}Error Handling
The API uses standard HTTP status codes to indicate the outcome of each request. Always check the
success field and the HTTP status code in your integration logic.
| Code | Status | Description |
|---|---|---|
| 200 | OK | The request succeeded. Response body contains the requested data. |
| 201 | Created | A new resource was successfully created (e.g., new collection or item). |
| 400 | Bad Request | The request body is invalid or missing required fields. Check the details array. |
| 401 | Unauthorized | Missing or invalid authentication token. Re-authenticate and retry. |
| 403 | Forbidden | You do not have permission to access this resource. |
| 404 | Not Found | The requested resource does not exist or has been deleted. |
| 429 | Too Many Requests | Rate limit exceeded. Wait and retry after the period indicated in response headers. |
| 500 | Internal Server Error | An unexpected error occurred. If the issue persists, contact support. |
Error Response Format
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "One or more fields failed validation.",
"details": [
{
"field": "name",
"message": "Name must be between 1 and 255 characters."
}
]
}
}Tip: Always implement retry logic with exponential backoff for 429 and 5xx responses.
Rate Limiting
To ensure fair usage and system stability, API requests are rate-limited per user. The current limits are:
- Standard tier: 100 requests per minute
- Organization tier: 500 requests per minute
Every response includes rate-limit headers so you can monitor your usage:
| Header | Description |
|---|---|
X-RateLimit-Limit |
Maximum number of requests allowed in the current window. |
X-RateLimit-Remaining |
Number of requests remaining in the current window. |
X-RateLimit-Reset |
Unix timestamp (seconds) when the rate limit window resets. |
HTTP/1.1 200 OK X-RateLimit-Limit: 100 X-RateLimit-Remaining: 87 X-RateLimit-Reset: 1708992000
Warning: Exceeding the rate limit returns a 429 Too Many Requests response.
Respect the X-RateLimit-Reset header before retrying.
Pagination
All list endpoints support pagination through query parameters. Results are returned in pages with
metadata in the meta field.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer | 1 | The page number to retrieve (1-based). |
per_page |
integer | 20 | Number of items per page. Maximum: 100. |
Response Metadata
GET /api/collections?page=2&per_page=10
{
"success": true,
"data": [ ... ],
"meta": {
"total": 42,
"page": 2,
"per_page": 10,
"pages": 5
}
}
Tip: To iterate through all results, increment the page parameter
until page exceeds meta.pages.
Code Examples
Below are ready-to-use examples for listing collections in three popular languages.
curl -X GET "https://your-domain.com/api/v1/collections?page=1&per_page=20" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Accept: application/json"
const response = await fetch(
'https://your-domain.com/api/v1/collections?page=1&per_page=20',
{
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Accept': 'application/json'
}
}
);
const result = await response.json();
if (result.success) {
console.log('Collections:', result.data);
console.log('Total:', result.meta.total);
} else {
console.error('Error:', result.error.message);
}import requests
url = "https://your-domain.com/api/v1/collections"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Accept": "application/json"
}
params = {"page": 1, "per_page": 20}
response = requests.get(url, headers=headers, params=params)
result = response.json()
if result["success"]:
for collection in result["data"]:
print(collection["name"])
print(f"Total: {result['meta']['total']}")
else:
print(f"Error: {result['error']['message']}")Creating a Collection
curl -X POST "https://your-domain.com/api/v1/collections" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My New Collection",
"description": "A collection created via the API",
"visibility": "private"
}'Webhooks
Webhooks allow your application to receive real-time notifications when events occur in Collections Manager, such as collection creation, item updates, or sharing changes.
Coming Soon
Webhook support is currently in development and will be available in a future release. Subscribe to our help center to be notified when it launches.