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

# Clientary API

Jentic publishes the only available OpenAPI specification for Clientary API, keeping it validated and agent-ready. Clientary is a business-management platform for freelancers and agencies, exposing endpoints for clients, invoices, estimates, projects, time entries, expenses, payments, and staff. Authentication uses an API key sent in the Authorization header. The API is designed for back-office automation: turning logged hours into invoices, reconciling payments, and keeping client records in sync with external CRMs.

## For AI agents

Run a freelancer or agency back office: create invoices and estimates, log time and expenses, record payments, and manage clients and projects.

## Scope

Does not handle payment processing, payroll, or full general-ledger accounting - use for freelancer and agency invoicing, time, and expense tracking only.

## Capabilities

- Create and send invoices to clients with line items and tax
- Generate estimates and convert accepted ones into invoices
- Log billable time entries against projects and staff
- Record client payments and reconcile them to invoices
- Track project-level expenses for reimbursement and reporting
- Maintain a synced client directory across Clientary and an external CRM

## Use cases

### Time-to-Invoice Automation

Agencies that bill hourly can let an agent read approved time entries from /time-entries, group them by client and project, and create draft invoices via POST /invoices at the end of each billing period. Tax, hourly rate, and project mapping are pulled from the existing Clientary records, so the agent does not need to model pricing logic. Month-end billing that previously took a bookkeeper a full day finishes in minutes.

Example prompt: List time entries from the last 30 days for client id 42, group by project, and POST a single consolidated invoice with one line per project at the project's hourly rate.

### Estimate-to-Invoice Workflow

Sales-led agencies can have an agent create an estimate via POST /estimates when a deal is won in their CRM, send it for client approval, and convert it into an invoice on acceptance. Because Clientary keeps both estimates and invoices keyed to the same client and project, the agent only needs to copy line items and update the document type. This shortens the gap between deal close and first invoice from days to under an hour.

Example prompt: Create an estimate for client id 17 with three line items totalling $4,500, then once status is 'accepted' POST a matching invoice and link it back to the original estimate.

### Payment Reconciliation

Finance teams can reconcile bank deposits to outstanding invoices by having an agent list /invoices with status=open, match each amount to incoming payments fed from the bank, and POST records to /payments with the correct invoice id. Disputed or partial matches are flagged for review. This removes the manual spreadsheet step that typically follows weekly bank statement downloads.

Example prompt: List open invoices for the last 60 days, for each $1,200 deposit on the bank feed find the matching invoice by client and amount, and POST a payment record against that invoice.

### Expense and Project Profitability

Project managers can track gross margin per project by combining time entries, expenses, and invoices. An agent calls /projects, /time-entries, /expenses, and /invoices, joins on project id, and produces a margin report. Because all four resources live in the same API, the report can run on demand rather than as an end-of-quarter exercise.

Example prompt: For project id 'website-redesign' fetch all time entries, expenses, and invoiced amounts year-to-date, then return the gross margin as billed minus expenses minus (hours × cost rate).

### AI Agent Back-Office Assistant via Jentic

Solo founders and small agencies can register Clientary through Jentic and ask an AI assistant to handle invoicing, payments, and client updates conversationally. Jentic stores the API key server-side and exposes Clientary operations as searchable tools, so the assistant can act on an instruction like 'invoice Acme for last month' without seeing the credential. Setup time is a single Jentic search-load-execute call instead of a custom integration.

Example prompt: Search Jentic for 'create an invoice in clientary', load the POST /invoices schema, and execute with client_id 42 and three line items provided by the user.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /invoices | Create an invoice |
| GET | /invoices | List invoices |
| POST | /estimates | Create an estimate |
| POST | /clients | Create a client |
| GET | /clients/{id} | Get a single client |
| PUT | /invoices/{id} | Update an invoice |

## Key resources

- **Clients** — Customer directory. Full CRUD under /clients.
- **Invoices** — Billing documents. Full CRUD under /invoices, plus list and detail.
- **Estimates** — Quotes that can be converted into invoices. Full CRUD under /estimates.
- **Projects** — Engagements that group time and expenses. Full CRUD under /projects.
- **Time Entries** — Hours logged against projects and staff.
- **Expenses** — Project and client expenses for reporting and rebilling.
- **Payments** — Money received against invoices.
- **Staff** — Internal users and their hourly rates.

## Why Jentic

- **Setup:** Wiring the Clientary API by hand means setting the Authorization API key header on every call to www.clientary.com/api/v2 and mapping the right operation across invoices, estimates, and clients yourself. Through Jentic you install once, import the Clientary API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** Clientary puts resource ids in the URL path (/invoices/{id}, /clients/{id}), so a rule can pin your agent to a specific invoice or client. You choose the operations it may call, so invoice updates are not included unless you add them.
- **Credential handling:** Your Clientary API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create an invoice in Clientary' or 'list unpaid invoices', and Jentic returns the matching Clientary operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Xero Accounting API** — Full general-ledger accounting platform with invoicing and payments.
- **Stripe API** — Payment processing for cards, wallets, and bank debits.
- **PayPal Invoicing API** — PayPal's standalone invoicing service.

## FAQ

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

Clientary does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Clientary 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 Clientary API use?

The API uses an API key in the Authorization header. Through Jentic, the key is stored encrypted in the vault and never enters the agent's context - the agent gets a scoped execution token instead.

### Can I create invoices and estimates with the Clientary API?

Yes. POST /invoices creates an invoice and POST /estimates creates an estimate. Both accept line items, client id, and tax fields, so an agent can convert an accepted estimate into an invoice by reusing the same line-item payload.

### How do I record a payment against an invoice with the Clientary API?

POST /payments with the invoice id, amount, and date. The endpoint links the payment to the invoice and updates its status. Through Jentic, search for 'record a payment in clientary' to load the schema and execute.

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

Clientary does not publish hard rate limits in the spec. Build clients to handle 429 responses with exponential backoff and check current limits with Clientary support for your account tier.

### How do I generate an invoice from time entries through Jentic?

Run pip install jentic, then chain three calls: list /time-entries filtered by project and date, group by project, and POST /invoices with one line per project. Jentic returns each operation's input schema so the agent can build payloads without manual reference to docs.

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

Yes. Because you run Jentic One yourself, your own rules decide which Clientary operations and credentials the agent may use. You can allow read-only calls like GET /invoices and GET /clients/{id} while withholding write operations such as POST /invoices or PUT /invoices/{id}, so the agent never creates or edits records unless you add those operations. Since Clientary keeps resource ids in the URL path (/invoices/{id}, /clients/{id}), a rule can also pin the agent to a specific invoice or client.
