Introduction
The Teak API allows you to programmatically interact with your personal knowledge hub. You can create cards, search your collection, and manage favorites using simple HTTP requests.The Teak API is currently designed for integration with tools like Raycast. More endpoints will be added in future releases.
Base URL
All API requests should be made to your Convex deployment URL:API Endpoints
The following endpoints are available:| Endpoint | Method | Description |
|---|---|---|
/api/raycast/quick-save | POST | Create a new card (text or link) |
/api/raycast/search | GET | Search all cards |
/api/raycast/favorites | GET | Search favorited cards |
Request Format
All requests must include:- Authentication header: Bearer token with your API key
- Content-Type header:
application/jsonfor POST requests - Proper request body: JSON-formatted data for POST requests
Example Request
Response Format
All API responses are returned in JSON format with appropriate HTTP status codes:- 200: Success
- 400: Bad request (invalid input)
- 401: Unauthorized (missing or invalid API key)
- 405: Method not allowed
- 429: Rate limited (too many requests)
- 500: Internal server error
Success Response
Error Response
Rate Limits
When you exceed the rate limit, you’ll receive a429 status code with a response like:
retryAt field contains a Unix timestamp (in milliseconds) indicating when you can retry your request.
Error Codes
| Code | Description |
|---|---|
BAD_REQUEST | The request was malformed or missing required fields |
INVALID_INPUT | The input data failed validation |
UNAUTHORIZED | Missing or invalid Authorization header |
INVALID_API_KEY | The API key is invalid or has been revoked |
RATE_LIMITED | Too many requests - retry after the specified time |
METHOD_NOT_ALLOWED | The HTTP method is not supported for this endpoint |
INTERNAL_ERROR | An unexpected server error occurred |
All timestamps in the API use Unix time in milliseconds.
Next Steps
Authentication
Learn how to generate and use API keys
Create Card
Create cards via the API