Authentication
The Baselyne API uses API keys to authenticate all requests. Every request must include your API key in the Authorization header.
Making your first request
curl https://baselyne.ca/api/v1/customers \
-H "Authorization: Bearer bsl_live_your_api_key_here"Getting an API key
- Go to Settings → Developer API
- Click Create new key
- Give your key a name and select the required scopes
- Copy the key — it is shown only once
Environments
| Prefix | Environment | Use for |
|---|---|---|
bsl_live_ | Live | Production integrations against real data |
bsl_test_ | Test | Development and testing |
Scopes
API keys are scoped to specific resources. When creating a key, select only the scopes your integration needs.
| Scope | Access |
|---|---|
customers:read | List and read customers |
customers:write | Create and update customers |
jobs:read | List and read jobs |
jobs:write | Create and update jobs |
invoices:read | List and read invoices |
invoices:write | Create and update invoices |
employees:read | List and read employees |
intelligence:read | Read churn scores, capacity forecasts |
webhooks:write | Register webhook endpoints |
Error responses
// Missing or invalid key (401):
{
"data": null,
"meta": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key."
}
}
// Missing scope (403):
{
"data": null,
"meta": null,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "This endpoint requires the 'customers:read' scope."
}
}