API Reference

The InvoiceNests API lets supported integrations work with invoices, clients, payments, products, and expenses within an organization. Requests use HTTPS and return JSON.

Introduction

The InvoiceNests API lets supported integrations work with invoices, clients, payments, products, and expenses within an organization. Requests use HTTPS and return JSON.

Token-based auth

Exchange your client_id and client_secret for short-lived access tokens. Refresh tokens rotate when used.

Local token verification

Access tokens are signed and can be verified without an extra lookup on every request.

1h access / 30d refresh

Access tokens last 1 hour. Refresh tokens last 30 days and rotate on every use.

Reuse detection

If a refresh token is reused, active sessions for that key are revoked.

Quick start - fetch your first invoice in 4 steps

1

Create an API key

Open Settings -> API -> Create Key. Choose the scopes the integration needs, such as read:invoices. You will receive a Client ID (ak_live_...) and a Secret Key (sk_live_...). The secret is shown only once, so store it securely.

Settings → API → Create Key
2

Exchange your credentials for an access token

Send a POST request to /api/v1/auth/token with your client_id, client_secret, and grant_type="client_credentials". The response includes an access token and a refresh token.

Request
POST https://app.invoicenests.com/api/v1/auth/token
Content-Type: application/json

{
  "client_id":     "ak_live_…",      // public key
  "client_secret": "sk_live_…",      // secret key (shown once)
  "grant_type":    "client_credentials"
}
200 OK
{
  "access_token":  "eyJhbGciOiJIUzI1NiIs…",
  "token_type":    "Bearer",
  "expires_in":    3600,
  "refresh_token": "rt_live_…",
  "scope":         "read:invoices read:clients …"
}
3

Call data endpoints with the access token

Add the Authorization: Bearer ACCESS_TOKEN header to each request, replacing ACCESS_TOKEN with the token from step 2. Data endpoints are available under /api/v1.

Request
GET https://app.invoicenests.com/api/v1/invoices
Authorization: Bearer <access_token>
4

Refresh the token before it expires

Before the access token expires, POST your refresh_token to /api/v1/auth/refresh to receive a new token pair. Each refresh token can only be used once.

Request
POST https://app.invoicenests.com/api/v1/auth/refresh
Content-Type: application/json

{ "refresh_token": "rt_live_…" }

Using React and TypeScript?

Endpoint examples include typed React and TypeScript samples where available. Use the language tabs to switch examples.

Introduction

The InvoiceNests API lets supported integrations work with invoices, clients, payments, products, and expenses within an organization. Requests use HTTPS and return JSON.