Hoursmith for developers
Drive Hoursmith from code — a REST API, an MCP server for AI assistants, and webhooks for events. Automate time logging, invoicing, and reporting.
If you'd rather script your workflow than click through a UI, Hoursmith gives you three ways in: a REST API, an MCP server so AI assistants like Claude and Cursor can operate your workspace, and webhooks to push events into your own systems.
Who this is for
Developers and technical teams who want to automate time entry, invoicing, or reporting — or wire Hoursmith into the tools they already use. If you live in a terminal, a CI pipeline, or an AI coding assistant, this is your path.
The three building blocks
- REST API — read and write your workspace data programmatically.
- MCP server — connect an AI assistant so it can do the same in natural language.
- Webhooks — receive events when things happen, so your systems can react.
Use the REST API
Authenticate with an API token and call the API over HTTPS. The example below is illustrative of the shape of a request — see the API reference for the exact base URL, endpoints, and payloads.
# Illustrative — see the API reference for exact endpoints and fields.
curl https://hoursmith.app/api/... \
-H "Authorization: Bearer $HOURSMITH_TOKEN" \
-H "Content-Type: application/json"A typical script reads in JSON and writes in JSON:
// Illustrative pattern. Confirm endpoints and fields in the API reference.
const res = await fetch("https://hoursmith.app/api/...", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HOURSMITH_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ /* ... */ }),
});
const data = await res.json();Keep your API token in an environment variable or secret manager — never commit it. The API overview covers how tokens are issued and scoped.
Drive Hoursmith from an AI assistant (MCP)
Hoursmith ships an MCP server, so an assistant that speaks the Model Context Protocol — Claude, Cursor, and others — can work your data in natural language: "log two hours to the Acme redesign," or "list this month's unpaid invoices." Add the Hoursmith MCP server to your assistant's config and authenticate; see the MCP setup guide for the exact connection details.
This is handy for the things you do often but don't want to script end-to-end — quick time entries, pulling a list of overdue invoices, or checking what's still unbilled, all from the assistant you already have open.
React to events with webhooks
Register a webhook endpoint and Hoursmith will POST to it when events occur, so your systems can respond — post to Slack when an invoice is paid, kick off a job when time is logged, sync records into another tool. See Webhooks for the event list and payload format.
// Illustrative handler — verify the signing and payload details in the webhooks reference.
export async function POST(req: Request) {
const event = await req.json();
// handle event.type ...
return new Response("ok");
}Automation workflows worth building
- Log time from your tools. Push time entries from a timer app, a CLI, or your editor via the API. See Time tracking for what an entry represents.
- Generate invoices on a schedule. Build invoices from billable, un-invoiced time on a cadence. See Create an invoice.
- Pipe events into Slack or a queue. Use webhooks to react to payments and other events in real time.
- Pull reporting data. Read your numbers via the API to feed a dashboard, or export CSV for one-off analysis.
Ready to start?
Read the API overview for endpoints and auth, set up the MCP server for your assistant, and wire up webhooks for events. New to Hoursmith? Create an account first.
Hoursmith for small agencies
Invite your team, scope project access, keep contractors money-blind, track everyone's time, and bill unbilled work — all on flat-fee pricing.
Hoursmith for contractors
You've been invited as a Member. Here's what you can and can't see, how to track your time, work your assigned tasks, and stay in the loop.