API Reference
Integrate ClockEye with your applications using our REST API.
Base URL
https://api.clockeye.ai/v1
Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header.
Header
Authorization: Bearer YOUR_API_KEYGetting an API Key
- 1.Go to Settings → API Keys in your dashboard
- 2.Click "Create New Key"
- 3.Name your key and select permissions
- 4.Copy and securely store your key
Security Note
Never expose your API key in client-side code. Store it securely on your server and use environment variables.
Endpoints
Common API endpoints for time tracking operations.
GET
/api/v1/time-entriesPOST
/api/v1/time-entriesGET
/api/v1/time-entries/:idPUT
/api/v1/time-entries/:idDELETE
/api/v1/time-entries/:idGET
/api/v1/projectsPOST
/api/v1/projectsGET
/api/v1/usersGET
/api/v1/reports/summaryGET
/api/v1/screenshotsExample Request
curl -X GET "https://api.clockeye.ai/v1/time-entries" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Example Response
{
"data": [
{
"id": "te_abc123",
"user_id": "usr_xyz789",
"project_id": "prj_def456",
"description": "Working on API integration",
"start_time": "2024-01-15T09:00:00Z",
"end_time": "2024-01-15T12:30:00Z",
"duration": 12600,
"billable": true
}
],
"meta": {
"total": 150,
"page": 1,
"per_page": 50
}
}Rate Limits
API requests are rate limited to ensure fair usage and protect the service.
100
Requests per minute
5,000
Requests per hour
50,000
Requests per day
Rate limit headers are included in every response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1705312800
Error Codes
The API uses standard HTTP status codes to indicate success or failure.
400Bad RequestInvalid request parameters
401UnauthorizedMissing or invalid API key
403ForbiddenInsufficient permissions
404Not FoundResource not found
429Too Many RequestsRate limit exceeded
500Server ErrorInternal server error
Error Response Format
{
"error": {
"code": "invalid_request",
"message": "The project_id field is required",
"details": {
"field": "project_id",
"reason": "required"
}
}
}