Browse documentation

Connect and extend

Partner API

A versioned REST surface at api.lineman.io/v1, shaped so the caller does not have to reshape it. It is what the n8n and Zapier integrations read, and it is available to you directly.

Authenticating

Send an API key as a bearer token: Authorization: Bearer YOUR_KEY. The key carries the access of the person who created it, so what you can read through the API is what you could see in the dashboard.

The shape is the promise

The point of a versioned surface is that you can rely on it. Four guarantees hold across every endpoint:

Lists come back as a flat top-level array, and a single thing as one flat object. There is no envelope to unwrap and nothing to split out.

Field names are snake_case, consistently.

Times are ISO-8601 in UTC.

Money is dual-unit: the precise machine value and the human one, so you are never dividing by a million yourself.

What you can read

Identity, your own allowance, and savings; the company reads a manager needs - cost centres, members, repositories, alerts; and the spend views - summary, breakdown, top spenders, over time, and the recent ledger.

Whose numbers you get

A key carries its owner's access, so the same request can answer differently depending on who sent it. On savings, an administrator or an auditor gets the whole company; everyone else gets themselves. The summary tells you which it did in its scope field, either company or self, so you never have to infer it from the figures.

The per-task breakdown resolves the same audience, but it comes back as a flat array, so it has nowhere to put a scope field of its own. Read the summary alongside it if you need to know which one you are looking at.

Allowance is deliberately different, and will stay that way: it is always self. It measures what is left of your own billing period, so there is no company-wide figure that would mean anything. An administrator calling it gets their own allowance, exactly like everyone else.

To narrow to one person, pass developer= with an email address or a user id, or a comma-separated list of either. It filters inside what your role already allows and can never reach past it: someone without company access who names a colleague still gets only their own figures. Savings and spend both take it, and behave the same way.

One behaviour to know before you build on it. If none of the values you pass match anyone you are allowed to see, the filter is dropped rather than refused, and you get your whole permitted set back. That can never show you more than your access allows, but it does mean a mistyped address quietly answers for everyone instead of reporting that it matched nobody. Worth a glance at the figures to confirm they are the ones you asked for.

What you can change

The write surface covers cost centres, member budgets, alert handling, controls, webhook secrets and notification channels. Writes are administrator-gated, except per-user notification channels, which are scoped to the caller.

Any webhook URL you register is resolved and checked before it is accepted, so the API cannot be pointed at an internal address.

When something goes wrong

Every error comes back in one envelope, and every one carries a request_id. Quote it if you contact support: it is the difference between us guessing and us looking it up.