Skip to content

For developers

The Ledgixy API

Read and write your invoices, quotations, payments, expenses and customers from your own software. The same permissions and tenant separation apply to the API as to the app.

API keys

Send a key as Authorization: Bearer lk_live_…. A key is shown once, when you create it. Only a hash is stored, so a lost key is revoked and replaced, never recovered.

A key is limited twice: by the scopes it was issued with, which can never exceed the permissions of the member who created it, and by the current permissions of the organization's owner, so a key cannot outlive the access behind it. Some permissions can never be put on a key, such as managing members, billing or other keys. Keys and webhook endpoints can only be managed from a signed-in session.

Idempotent writes

Every write accepts an Idempotency-Key header. Repeat a request with the same key and the same body and you get the first response back. Reuse the key with a different body and you get a 409. Keys are scoped to your organization and expire after 24 hours. A request that failed is not cached, so it can be retried.

Rate limits

Limits are reported on every response in RateLimit-Limit and RateLimit-Remaining. A refusal is a 429 with Retry-After in seconds.

CallerSustainedBurst
Session300 a minute100
API key120 a minute40
Unauthenticated20 a minute10

Signed webhooks

Register an endpoint and Ledgixy sends a signed JSON message when an event happens. The payload is deliberately thin: an event id, its type, a timestamp and the id of the record. Call back for the detail, under your own authentication.

Each delivery carries a Ledgerly-Signature header. The signature is an HMAC-SHA256 of the timestamp and the raw request body, so verify it against the raw bytes and reject anything more than 300 seconds old. Deliveries can arrive more than once, so deduplicate on the event id.

const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
const ok = crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1));

Any 2xx response is success. Redirects are not followed. A 4xx other than 408 or 429 is final; a 5xx, a timeout or a connection failure is retried after 10 seconds, 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours, then given up on. After 10 consecutive failures the endpoint is disabled. Endpoint URLs must be https and must not point to a private address.

Events

  • invoice.sent
  • invoice.paid
  • invoice.overdue
  • invoice.cancelled
  • quotation.sent
  • quotation.accepted
  • quotation.rejected
  • payment.recorded
  • payment.refunded
  • expense.created
  • customer.created

Errors and money

Errors use one envelope everywhere: a code, a message and a requestId you can quote to support. Money is always a string of minor units with an explicit currency, never a float: "12500" with "USD" is $125.00.

Ledgixy is free during early access. All features · Pricing