API Authentication
Skaala supports two authentication methods for API access:API Keys
Recommended for integrations
Simple bearer token authentication with granular scopes
Stack Auth Cookies
For web dashboard
Session-based authentication for browser access
API Key Authentication
Creating an API Key
- Dashboard UI (Recommended)
- API (Programmatic)
Create API key
Click Create API Key and configure:
- Name: Descriptive name (e.g., “Zapier Integration”)
- Scopes: Select required permissions
- Expiration: Set expiry date (default: 365 days)
Using API Keys
API keys can be provided in two ways:- X-API-Key Header
Available Scopes
API keys support granular permissions to limit access:Read Scopes
Read Scopes
read:bookings- View bookings and appointmentsread:contacts- View contacts and customer profilesread:calls- View call history and transcriptsread:services- View services and pricingread:staff- View staff information
Write Scopes
Write Scopes
write:bookings- Create and update bookingswrite:contacts- Create and update contactswrite:calls- Create call records
Management Scopes
Management Scopes
webhooks:manage- Subscribe to and manage webhooks
Security Best Practices
Environment Variables
Never commit API keys to version control. Use environment variables:
Minimal Scopes
Grant only the permissions needed. Read-only when possible.
Set Expiration
Default: 365 days. Rotate keys regularly for production.
Monitor Usage
Check “Last Used” timestamp in dashboard to detect unused keys.
Error Responses
- API key doesn’t exist or has been revoked
- API key has expired
- Invalid format (must start with
sk_live_)
- API key lacks required scope for endpoint
- User no longer has team access
- Team membership revoked
Complete Example
Here’s a complete PowerShell example showing both GET and POST requests:PowerShell
Troubleshooting
Unauthorized with valid-looking key
Unauthorized with valid-looking key
Forbidden with valid key
Forbidden with valid key
Check:
- Key has required scope (e.g.,
write:bookingsfor POST) - User still has team membership
- Team ID matches key’s team
Can't create API key
Can't create API key
Check:
- You have
adminorownerrole - Authenticated via dashboard cookies
- Team ID is correct in the URL
Migration from Cookie Auth
If you’re currently using cookie authentication and want to switch:- After (API Key)
- ✅ No cookie refresh handling required
- ✅ Simpler authentication flow
- ✅ Granular permissions via scopes
- ✅ Easy rotation and revocation
- ✅ Audit trail with “last used” timestamp
Next Steps
Quickstart
Make your first API call
API Reference
Browse all endpoints
Rate Limits
Understand API limits
Webhooks
Set up real-time notifications