Skip to main content

API Overview

The SpeyBooks API is a RESTful API that uses JSON for request and response bodies.

Base URL

https://api.speybooks.com/v1

All endpoints are relative to this base URL.

Core resources

ResourceDescription
InvoicesSales invoices and credit notes
ContactsCustomers and suppliers
TransactionsLedger entries
AccountsChart of accounts
ReportsP&L, Balance Sheet, VAT

Request format

Headers

All requests require:

Authorization: Bearer sk_live_your_api_key
Content-Type: application/json

Amounts

All monetary values are integers in the smallest currency unit:

CurrencyUnitExample
GBPPence150000 = £1,500.00
USDCents150000 = $1,500.00
EURCents150000 = €1,500.00

Dates

Dates use ISO 8601 format:

2026-01-31           # Date only
2026-01-31T14:30:00Z # Date and time (UTC)

Response format

Success responses

{
"id": "inv_abc123",
"number": "INV-0001",
"status": "draft",
"total": 150000,
"created_at": "2026-01-31T14:30:00Z"
}

List responses

{
"data": [
{ "id": "inv_abc123", ... },
{ "id": "inv_def456", ... }
],
"has_more": true,
"next_cursor": "inv_def456"
}

Error responses

{
"error": {
"code": "validation_error",
"message": "The 'amount' field must be a positive integer",
"field": "amount"
}
}

HTTP methods

MethodUsage
GETRetrieve resources
POSTCreate resources
PUTUpdate resources (full replacement)
PATCHUpdate resources (partial)
DELETERemove resources

Common patterns

Filtering

GET /v1/invoices?status=sent&contact_id=cont_abc123

Sorting

GET /v1/invoices?sort=-created_at  # Descending
GET /v1/invoices?sort=created_at # Ascending

Pagination

GET /v1/invoices?limit=20&cursor=inv_abc123

See Pagination for details.

Versioning

The API version is included in the URL path (/v1). Breaking changes will be introduced in new versions (/v2).

Non-breaking changes (new fields, new endpoints) may be added to existing versions.

SDKs

Official SDKs are planned for:

  • Node.js
  • Python
  • Go

For now, use any HTTP client with the REST API directly.