Integrate Doclyn's powerful RAG capabilities into your applications. Query documents, manage folders, and leverage AI-powered chat programmatically.
All API requests require authentication using a Bearer token. You can generate API keys from your organization settings.
Include your API key in the Authorization header:
Authorization: Bearer zp_org_your_api_key_hereExample request:
curl -X GET "https://app.doclyn.com/api/v1/documents" \
-H "Authorization: Bearer zp_org_your_api_key_here" \
-H "Content-Type: application/json"The Doclyn API provides endpoints for managing documents, folders, and RAG-powered chat.
Retrieve a paginated list of all documents in your organization. Optionally filter by folder.
Retrieve detailed information about a specific document by its ID.
Retrieve a paginated list of all folders in your organization. Optionally filter by parent folder.
Retrieve detailed information about a specific folder including its documents.
Send a RAG-powered query to search your documents and get AI-generated responses with source citations.
Test the API directly in your browser using your API key.
https://doclyn.aiYour API key is only used client-side and is never stored.
All errors follow a consistent format with a code and message.
| Code | Status | Description |
|---|---|---|
| invalid_api_key | 401 | The API key provided is invalid or has been revoked. |
| api_access_disabled | 403 | API access has not been enabled for this organization. |
| organization_read_only | 403 | This organization is in read-only mode. |
| organization_not_found | 404 | Organization not found. |
| document_not_found | 404 | Document not found. |
| folder_not_found | 404 | Folder not found. |
| rate_limit_exceeded | 429 | Rate limit exceeded. Please try again later. |
| quota_exceeded | 429 | Monthly quota exceeded. Please upgrade your plan. |
| invalid_request | 400 | Invalid request format. |
| invalid_scope | 400 | Invalid scope or scope_context. |
| message_too_long | 400 | Message exceeds maximum length of 10,000 characters. |
| request_too_large | 413 | Request body exceeds maximum size. |
| internal_error | 500 | An internal error occurred. |
API requests are rate limited to ensure fair usage and system stability.
Each response includes rate limit information in headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1703865600Chat API usage counts against your organization's monthly message quota. Quota limits depend on your subscription plan. When quota is exceeded, requests return a 429 status with error code quota_exceeded.