SaaSFlow
DevelopersAPI

API overview

Base URL, JSON conventions, pagination, and error shape.

The SaaSFlow API is HTTPS-only and uses JSON for both requests and responses. Almost every resource lives under /companies/{companyId}/….

Base URLs

EnvironmentURL
Productionhttps://api.saasflow.com
Staginghttps://staging-api.saasflow.com
Local dev (sfdev)https://{handle}-api.saasflow.com

Resource structure

/companies                                  Companies you have access to
/companies/{companyId}                      One company
/companies/{companyId}/accounts             Bank/cash accounts
/companies/{companyId}/customers
/companies/{companyId}/vendors
/companies/{companyId}/transactions
/companies/{companyId}/subscriptions
/companies/{companyId}/categories
/companies/{companyId}/products
/companies/{companyId}/files
/companies/{companyId}/integrations
/companies/{companyId}/data/{slice}         Analytics slices (MRR, P&L, etc.)
/companies/{companyId}/search?q=…           Free-text search

See API reference for every endpoint with parameters, responses, and code samples, and Data slices for the analytics endpoints.

Pagination

List endpoints accept limit and offset query params. When limit is set, the response is wrapped:

{
    "items": [...],
    "totalCount": 1432
}

Without limit, some list endpoints return a bare array. Always pass limit if you want pagination metadata.

Errors

Errors are JSON with a non-2xx status code:

{
    "error": "Invalid request",
    "code": "validation_failed"
}

code is optional; error is always present. The HTTP status code is the source of truth:

StatusMeaning
400Bad request — usually validation.
401Missing or invalid credentials.
403Authenticated but lacking permission (see Team & permissions).
404Resource not found (or hidden by your permissions).
409Conflict — e.g. trying to create a duplicate.
429Rate-limited (rare).
5xxServer error — safe to retry.

Content types

  • Requests with a body: Content-Type: application/json.
  • Responses: Content-Type: application/json for data, Content-Type: application/pdf or similar for file downloads under /files.

OpenAPI spec

The full OpenAPI 3.1 document is served at https://api.saasflow.com/openapi and is also bundled in the @saasflow/api-client package:

import openapiSpec from '@saasflow/api-client/openapi.json';

The API reference is generated from the same document.

On this page