canonical: https://jentic.com/apis/myhours.com/myhours

# MyHours API

Jentic publishes the only available OpenAPI specification for MyHours API, keeping it validated and agent-ready. My Hours is a time tracking and project management platform for consultancies, agencies, and freelancers. The API spans 341 endpoints across accounts, clients, projects, tasks, logs (time entries), tags, teams, users, invoices, reports, integrations (Jira, Paragon), shortcuts, and report configurations. Authentication is bearer-style - clients call POST `/api/Tokens/login` to mint an access token, then send it in the Authorization header against api2.myhours.com.

## For AI agents

Track time, manage projects, generate invoices, and run reports inside a My Hours workspace using a bearer access token minted via `/api/Tokens/login.`

## Scope

Does not handle payroll, expense reimbursement, or HR records - use for project time tracking, invoicing, and consultancy reporting only.

## Capabilities

- Mint and refresh access tokens via POST `/api/Tokens/login` and POST `/api/Tokens/refresh`
- Maintain the project portfolio across `/api/Projects` with client linkage, billable rates, and archival
- Log billable and non-billable time entries against tasks via the `/api/Logs` surface, including attachments
- Generate and manage invoices through `/api/Invoices/{invoiceId}` for client billing
- Configure custom fields, tags, and teams via `/api/Accounts` and `/api/Tags` and `/api/Teams`
- Run report configurations through `/api/ReportConfigurations` for recurring analytics deliveries
- Sync data to and from Jira via `/api/Integration/Jira` and through Paragon via `/api/Integration/paragon`

## Use cases

### Automated Time Logging from Calendar

Convert calendar events into My Hours time logs by parsing meeting metadata and posting against `/api/Logs.` The integration mints a token via `/api/Tokens/login`, looks up the matching project and task, and writes the log with start, end, and notes. This eliminates manual end-of-day timesheet entry for consultants whose work is already on a calendar.

Example prompt: Mint an access token via POST `/api/Tokens/login`, then POST a time log entry against project 4421 task 992 for the 2-hour client meeting starting at 10:00.

### Monthly Invoice Generation

Generate client invoices at the end of each billing cycle by reading time logs and creating invoice records on `/api/Invoices.` The integration aggregates billable hours per client, builds the invoice payload, and writes it via the Invoices surface for review and send. `/api/Invoices/{invoiceId}` GET/PUT support iteration on the draft before approval.

Example prompt: Aggregate billable logs for client 7723 between 2026-05-01 and 2026-05-31, then create an invoice and review it via GET `/api/Invoices/{invoiceId}.`

### Project Portfolio Sync

Keep the My Hours project portfolio in sync with a downstream PMO or accounting system by reading and writing `/api/Projects/{projectId}.` The integration creates new projects when deals close in the CRM, archives projects when they wrap, and updates billable rates when a contract is renegotiated.

Example prompt: Create a new project for client 7723 via the Projects surface, then assign three users by updating the project's team membership.

### Custom Fields and Reporting

Define account-level custom fields via `/api/Accounts/customfields` to capture practice-area, region, or matter-number metadata on logs and projects. Pair with `/api/ReportConfigurations` to schedule recurring slices of billable hours by custom field. This turns My Hours into a flexible analytics surface without exporting data to a separate BI tool.

Example prompt: Call POST `/api/Accounts/customfields` to add a 'matter-number' field, then create a report configuration that groups billable hours by that field weekly.

### AI Agent Time-Tracking Assistant

An AI agent acts as a personal time-tracking assistant for a consultant. It searches Jentic for My Hours operations, loads the login, project lookup, and log creation schemas, and chains them to take a natural-language description of work done and produce a posted time log. Jentic isolates the bearer token so the agent never holds the workspace secret.

Example prompt: Search Jentic for 'log billable hours in MyHours', execute POST `/api/Tokens/login`, look up the project, and POST the time log for the description provided.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/api/Tokens/login` | Mint an access token |
| POST | `/api/Tokens/refresh` | Refresh an existing access token |
| GET | `/api/Projects/{projectId}` | Retrieve a project with client data |
| GET | `/api/Logs/{logId}` | Retrieve a time log entry |
| GET | `/api/Invoices/{invoiceId}` | Get an invoice by ID |
| PUT | `/api/Invoices/{invoiceId}` | Update an invoice |
| GET | `/api/Accounts/customfields` | Get account custom field definitions |
| DELETE | `/api/Tasks/{taskId}` | Delete a task |

## Key resources

- **Tokens** — Login, refresh, and logout to obtain bearer access tokens.
- **Accounts** — Account settings, custom fields, integrations mapping, and company logo.
- **Projects** — Manage client projects, including archive and team assignment.
- **Tasks** — Manage tasks within projects, with rate handling.
- **Logs** — Create, retrieve, and delete time entries with attachment support.
- **Invoices** — Generate, retrieve, and update invoices for clients.
- **Clients** — Maintain the client roster linked to projects.
- **Tags, Teams, Users, Shortcuts** — Workspace organisation primitives.
- **ReportConfigurations** — Saved report definitions for recurring analytics.
- **Integrations** — Jira and Paragon integration endpoints for data sync and key management.

## Why Jentic

- **Setup:** Wiring MyHours by hand means implementing its API-key login against api2.myhours.com, minting and refreshing access tokens, and threading the Authorization header through every one of its many time-tracking calls yourself. Through Jentic you install once, import MyHours from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** MyHours puts the resource id in the URL path (`/api/Invoices/{invoiceId}`, `/api/Tasks/{taskId}`), so a rule can pin your agent to one invoice or task and nothing else. You choose the operations it may call, so destructive ones like deleting a task are not included unless you add them.
- **Credential handling:** Your MyHours key and minted tokens are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'log billable hours in MyHours' or 'draft an invoice', and Jentic returns the matching MyHours operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Toggl Track API** — Toggl Track is a popular time-tracking API with similar log, project, and report primitives.
- **Clockify API** — Clockify offers a free time-tracking API with project, task, and timesheet endpoints.
- **HubSpot CRM Contacts API** — HubSpot Contacts holds the client lifecycle data that pairs with My Hours' billable time tracking.

## FAQ

### Why is there no official OpenAPI spec for MyHours API?

My Hours does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call MyHours API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the MyHours API use?

The MyHours API uses bearer-style auth: call POST `/api/Tokens/login` with credentials to mint an access token, then send it in the Authorization request header as `Bearer YOUR-TOKEN-HERE`. Through Jentic, the username/password is stored in the encrypted vault and the login + header injection runs server-side per request.

### Can I log billable hours with the MyHours API?

Yes. After minting a token, write time entries against the `/api/Logs` surface, attaching them to a project and task. You can later GET `/api/Logs/{logId}` or DELETE `/api/Logs/{logId}` to retrieve or remove an entry, including attachment files via `/attachment/{attachmentId}.`

### How do I generate an invoice through Jentic?

Search Jentic for 'create an invoice in MyHours', load the `/api/Invoices` schema, and execute the create call with the client and time-log scope. Retrieve and review with GET `/api/Invoices/{invoiceId}` and apply edits via PUT `/api/Invoices/{invoiceId}` before sending.

### Does MyHours integrate with Jira?

Yes. The API exposes `/api/Integration/Jira/Delete` and `/api/Integration/Jira/DeleteImportedData` to manage the Jira link, alongside Paragon-based integration endpoints under `/api/Integration/paragon` for broader connector support.

### What are the rate limits for the MyHours API?

The published spec does not document explicit rate limits. Treat the API as throttled in production, implement exponential backoff on 429 responses, and reuse access tokens via `/api/Tokens/refresh` rather than logging in for every request.

### Can I limit what my agent is allowed to do with the MyHours API?

Yes. Because you run Jentic One yourself, your own rules decide which MyHours operations and credentials the agent may use. MyHours puts the resource id in the URL path, such as `/api/Invoices/{invoiceId}` and `/api/Tasks/{taskId}`, so you can pin the agent to a single invoice or task and nothing else. You also choose the exact operations it can call, so a destructive one like DELETE `/api/Tasks/{taskId}` is off limits unless you explicitly add it.
