Authentication
SyncBooks supports two authentication methods: API Keys for server-to-server integrations and OAuth 2.0 for user-authorized apps.
API Keys
API keys are the simplest way to authenticate. Each key is scoped to a single organization and has configurable permissions (scopes).
Request with API Key
curl https://api.syncbooksapp.com/api/v1/invoices \
-H "Authorization: Bearer sk_live_a1b2c3d4e5f6..."Key Format
| Parameter | Type | Description |
|---|---|---|
sk_live_* | string | Production key — accesses real data |
sk_test_* | string | Test key — sandbox environment (coming soon) |
Scopes
Each API key has specific scopes that control access. Available scopes:
invoices:readinvoices:writecustomers:readcustomers:writepayments:readpayments:writeproducts:readproducts:writeexpenses:readexpenses:writereports:readaccounts:readOAuth 2.0
For apps that need to act on behalf of SyncBooks users (e.g., marketplace integrations), use OAuth 2.0 Client Credentials flow.
Token Request
Get Access Token
curl -X POST https://api.syncbooksapp.com/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"scope": "invoices:read customers:read"
}'Response
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "invoices:read customers:read"
}Rate Limits
Rate limits are applied per API key based on your subscription plan:
| Parameter | Type | Description |
|---|---|---|
Starter | 100 req/15min | Basic plan rate limit |
Professional | 500 req/15min | Professional plan rate limit |
Business | 2000 req/15min | Business plan rate limit |
Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset