{"openapi":"3.0.3","info":{"title":"TimeTrack API v1","version":"1.0.0","description":"Public REST API for BI, ERP and automation. Authenticate with Bearer API keys (ttk_…). Write scopes must be granted explicitly when creating a key."},"servers":[{"url":"https://www.simpletimetrack.com"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"ttk_…"}}},"security":[{"bearerAuth":[]}],"paths":{"/api/v1/brief":{"get":{"summary":"Manager brief","tags":["Read"],"parameters":[{"name":"locale","in":"query","schema":{"type":"string","enum":["fr","en"]}}],"responses":{"200":{"description":"Brief payload"}},"x-scopes":["read:brief"]}},"/api/v1/projects":{"get":{"summary":"List projects","tags":["Read"],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["ACTIVE","COMPLETED"]}}],"responses":{"200":{"description":"Project list"}},"x-scopes":["read:projects"]},"post":{"summary":"Create project","tags":["Write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","clientName","budget"],"properties":{"name":{"type":"string"},"clientName":{"type":"string"},"budget":{"type":"number"},"dailyRate":{"type":"number"},"contractValue":{"type":"number"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date","nullable":true},"status":{"type":"string","enum":["ACTIVE","COMPLETED"]}}}}}},"responses":{"201":{"description":"Created"}},"x-scopes":["write:projects"]}},"/api/v1/projects/{id}":{"patch":{"summary":"Update project","tags":["Write"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated"}},"x-scopes":["write:projects"]}},"/api/v1/timesheets":{"get":{"summary":"List timesheets","tags":["Read"],"parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"validated","in":"query","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Timesheet list"}},"x-scopes":["read:timesheets"]},"post":{"summary":"Create or upsert timesheet","tags":["Write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["date","hours"],"properties":{"date":{"type":"string","format":"date"},"hours":{"type":"number","minimum":0,"maximum":24},"billable":{"type":"boolean"},"description":{"type":"string","nullable":true},"userId":{"type":"string"},"userEmail":{"type":"string","format":"email"},"projectId":{"type":"string"},"projectName":{"type":"string"}}}}}},"responses":{"201":{"description":"Created"}},"x-scopes":["write:timesheets"]}},"/api/v1/timesheets/{id}":{"patch":{"summary":"Update timesheet","tags":["Write"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated"}},"x-scopes":["write:timesheets"]}},"/api/v1/users":{"post":{"summary":"Create consultant or manager","tags":["Write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["CONSULTANT","MANAGER"]},"dailyRate":{"type":"number"},"departmentName":{"type":"string"}}}}}},"responses":{"201":{"description":"Created"}},"x-scopes":["write:users"]}}},"tags":[{"name":"Read","description":"Default scopes on new API keys"},{"name":"Write","description":"Require explicit scopes; 120 req/min per key"}]}