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
| Resource | Description |
|---|---|
| Invoices | Sales invoices and credit notes |
| Contacts | Customers and suppliers |
| Transactions | Ledger entries |
| Accounts | Chart of accounts |
| Reports | P&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:
| Currency | Unit | Example |
|---|---|---|
| GBP | Pence | 150000 = £1,500.00 |
| USD | Cents | 150000 = $1,500.00 |
| EUR | Cents | 150000 = €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
| Method | Usage |
|---|---|
GET | Retrieve resources |
POST | Create resources |
PUT | Update resources (full replacement) |
PATCH | Update resources (partial) |
DELETE | Remove 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.