# API reference

Read and write time entries, projects, clients and people from your own scripts. The API uses the Harvest API v2 paths and objects, so a tool built for Harvest works after you change its base URL and token. Each request sends a workspace API token, and each response is JSON.

HTML version: https://t.momentic.studio/docs/api

- Base URL: `https://t.momentic.studio/api/v2`
- Account id: Copy it from **Settings**, **API tokens** and send it in the Harvest-Account-Id header.
- OpenAPI 3.1 document: https://t.momentic.studio/api/v2/openapi.json
- Docs index for AI agents: https://t.momentic.studio/llms.txt

## Quick start

1. Create a token. In the app, open **Settings**, **API tokens** and create a token. Copy the token and the account id from that page. The app shows the token once.
2. Send a request. Set the TOKEN and ACCOUNT_ID environment variables, then run the example. It asks for the person who owns the token.
3. Read the response. The response is that person's user record. [Users](https://t.momentic.studio/docs/api/users.md) explains each field.

```bash
curl "https://t.momentic.studio/api/v2/users/me" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (admin@example.com)"
```

```json
{
  "id": 1001,
  "first_name": "Alex",
  "last_name": "Example",
  "employee_id": null,
  "email": "alex@example.com",
  "telephone": "",
  "timezone": "Central Time (US & Canada)",
  "has_access_to_all_future_projects": false,
  "is_contractor": false,
  "is_active": true,
  "weekly_capacity": 144000,
  "default_hourly_rate": 150,
  "cost_rate": null,
  "roles": [
    "Design"
  ],
  "access_roles": [
    "member"
  ],
  "permissions_profile": "Member",
  "permissions_claims": [
    "timers:read:own",
    "timers:write:own"
  ],
  "can_create_projects": false,
  "calendar_integration_enabled": false,
  "calendar_integration_source": null,
  "avatar_url": "",
  "created_at": "2026-01-05T15:00:00Z",
  "updated_at": "2026-01-05T15:00:00Z"
}
```

## Use with an AI agent

Paste these instructions into your agent and give it a read-only token. [Use the API with an AI agent](https://t.momentic.studio/docs/api/ai-agents.md) explains which scopes to choose and how to revoke the token.

```text
Read https://t.momentic.studio/llms.txt and the pages it links to before you call the API. The API follows Harvest API v2 paths, methods and objects under https://t.momentic.studio/api/v2, and its OpenAPI document is at https://t.momentic.studio/api/v2/openapi.json. Send the token from the environment variable TIME_TRACKER_TOKEN as Authorization: Bearer <token>, the account id from TIME_TRACKER_ACCOUNT_ID as Harvest-Account-Id, and a User-Agent that names you, and make only GET requests unless I ask for a change.
```

## API reference

- [Authentication](https://t.momentic.studio/docs/api/authentication.md): Send a token and your account id with each request, and choose what each token may change.
- [Pagination](https://t.momentic.studio/docs/api/pagination.md): Read a long list page by page, up to 2000 records at a time, by following the next link.
- [Rate limits](https://t.momentic.studio/docs/api/rate-limits.md): Send up to 100 requests in 15 seconds with each token, and up to 100 report requests in 15 minutes.
- [Errors](https://t.momentic.studio/docs/api/errors.md): Find out why a request failed from its status code and the message in the response.
- [Moving from Harvest](https://t.momentic.studio/docs/api/moving-from-harvest.md): Switch a Harvest integration to the time tracker by changing its base URL, token and account id, then check what works differently.
- [Use the API with an AI agent](https://t.momentic.studio/docs/api/ai-agents.md): Let an AI agent read your time data with a read-only token and these docs in Markdown.

## API objects

- [Time entries](https://t.momentic.studio/docs/api/time-entries.md): List, create, change and delete time entries, and start and stop timers.
- [Projects](https://t.momentic.studio/docs/api/projects.md): List, create and change projects, with their type, hour budget, fee and dates.
- [Clients and contacts](https://t.momentic.studio/docs/api/clients.md): Clients and their contacts: the people invoices go to.
- [Tasks](https://t.momentic.studio/docs/api/tasks.md): List, create and change the tasks your team logs time under.
- [Users](https://t.momentic.studio/docs/api/users.md): List the people in your workspace, look up the token's own person, and see which projects each person is on.
- [User assignments](https://t.momentic.studio/docs/api/user-assignments.md): Put people on projects, choose who manages each project, and set each person's rate there.
- [Task assignments](https://t.momentic.studio/docs/api/task-assignments.md): Choose which tasks a project offers and whether each one is billable on that project.
- [Roles](https://t.momentic.studio/docs/api/roles.md): List and change your teams. The Harvest API calls a team a role.
- [Billable and cost rates](https://t.momentic.studio/docs/api/billable-rates.md): Read and add a person's billable rates over time. The API does not return cost rates.
- [Company](https://t.momentic.studio/docs/api/company.md): Read your workspace's name, week start day and time format.
- [Reports](https://t.momentic.studio/docs/api/reports.md): Get hours and billable amounts by client, project, task or person, uninvoiced time, and the budget used on each project.
- [Invoices, estimates and expenses](https://t.momentic.studio/docs/api/not-available.md): See what the invoice, estimate and expense endpoints return. The API does not read or write these records.
