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_KEY

Getting an API Key

  1. 1.Go to Settings → API Keys in your dashboard
  2. 2.Click "Create New Key"
  3. 3.Name your key and select permissions
  4. 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-entries
POST/api/v1/time-entries
GET/api/v1/time-entries/:id
PUT/api/v1/time-entries/:id
DELETE/api/v1/time-entries/:id
GET/api/v1/projects
POST/api/v1/projects
GET/api/v1/users
GET/api/v1/reports/summary
GET/api/v1/screenshots

Example 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"
    }
  }
}

Related Resources