Baselyne API
The Baselyne API gives you programmatic access to your business data — customers, jobs, invoices, and intelligence. Every request is authenticated with an API key and rate-limited per key.
Base URL
https://baselyne.ca/api/v1/Quick Start
curl https://baselyne.ca/api/v1/customers \
-H "Authorization: Bearer bsl_live_your_key_here"Response Format
Every response returns a consistent JSON shape:
{
"data": [...],
"meta": {
"total": 142,
"page": 1,
"per_page": 20,
"has_more": true
},
"error": null
}Customers
GET
/api/v1/customersList customers. Supports pagination and name search.
Scope:
customers:readQuery params:
page (default: 1), per_page (default: 20, max: 100), search (name/email filter)GET
/api/v1/customers/:idGet a single customer by ID.
Scope:
customers:readJobs
GET
/api/v1/jobsList jobs. Filter by status or trade category.
Scope:
jobs:readQuery params:
page, per_page, status (scheduled, in_progress, completed, etc.), trade_categoryInvoices
GET
/api/v1/invoicesList business invoices. Filter by status.
Scope:
invoices:readQuery params:
page, per_page, status (draft, sent, paid, overdue)Intelligence
GET
/api/v1/intelligence/churnCustomer health scores for churn prediction.
Scope:
intelligence:readQuery params:
tier (healthy, at_risk, churning)GET
/api/v1/intelligence/capacity4-week capacity forecast.
Scope:
intelligence:readWebhooks
POST
/api/v1/webhooksRegister a webhook endpoint. Returns the signing secret once.
Scope:
webhooks:writeQuery params:
url (HTTPS required), events (array of event names)GET
/api/v1/webhooksList registered webhooks. Secrets are not returned.
Scope:
webhooks:writeAvailable events: customer.created, invoice.sent, job.completed
Error Codes
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | INSUFFICIENT_SCOPE | Key doesn't have the required scope |
| 404 | NOT_FOUND | Resource not found |
| 429 | RATE_LIMITED | Too many requests — check Retry-After header |
| 400 | VALIDATION_ERROR | Invalid request body or params |
| 500 | INTERNAL_ERROR | Unexpected server error |