Timesheets
Timesheets endpoints need the Timesheets product. Logging needs timesheets:entry:create; reading needs timesheets:entry:read_own (your entries) or timesheets:entry:read_others. Full details: Timesheets API.
Recipe: log a calendar event as time
# The project to log against (pick it by name, or keep its id in your config)PROJECT_ID=$(curl -s "$OPEX/api/timesheets/projects" -H "X-API-Key: $OPEX_API_KEY" \ | jq -r '[.[] | select(.name == "ABC OPEXmx Portal")][0].id')
START=$(date -d 'today 09:00' +%s000) # epoch millisecondsEND=$(date -d 'today 10:30' +%s000)
curl -s -X POST "$OPEX/api/timesheets" \ -H "X-API-Key: $OPEX_API_KEY" -H "content-type: application/json" \ -d "{\"projectId\":\"$PROJECT_ID\",\"description\":\"Sprint planning\", \"startedAt\":$START,\"endedAt\":$END,\"billable\":true}" \ | jq '{id, project_id, started_at, ended_at, duration_minutes, status, billable}'{ "id": "d1b8fd89-9174-43c7-a35b-7db4636a1fda", "project_id": "prj-opexmx", "started_at": 1794016800000, "ended_at": 1794022200000, "duration_minutes": 90, "status": "approved", "billable": 1}The entry is always yours. Its status depends on the project: approved straight away, or pending when the project requires approval. Instead of a start and end you can send durationMinutes.
Recipe: hours this week
curl -s "$OPEX/api/timesheets?mine=1&dateFrom=2026-11-02&dateTo=2026-11-08&limit=500" \ -H "X-API-Key: $OPEX_API_KEY" \ | jq '{entries: (.entries | length), hours: ((.entries | map(.duration_minutes // 0) | add // 0) / 60)}'{ "entries": 1, "hours": 1.5 }This list pages with limit (up to 500) and offset, not page. dateTo includes the whole day.