v1.0
API Documentation
Welcome to the ContextFile API documentation. Learn how to integrate AI context management into your applications.
Base URL
https://api.contextfile.ai/v1All API endpoints are relative to this base URL.
Getting Started
API Reference
Quick Example
List your contexts
curl https://api.contextfile.ai/v1/contexts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"contexts": [
{
"id": "ctx_abc123",
"name": "My AI Assistant",
"slug": "my-ai-assistant",
"description": "Context for my personal AI assistant",
"content": { ... },
"is_public": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T14:45:00Z"
}
],
"pagination": {
"total": 1,
"limit": 50,
"offset": 0,
"hasMore": false
}
}Response Codes
| Code | Description |
|---|---|
| 200 | Request successful |
| 201 | Resource created successfully |
| 400 | Bad request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not found - Resource doesn't exist |
| 429 | Too many requests - Rate limit exceeded |
| 500 | Internal server error |