API Authentication
Learn how to authenticate with the Wakestack API using API keys. All API requests require authentication.
The Wakestack API uses API keys to authenticate requests. You can create and manage API keys from your dashboard. API keys carry the same privileges as your user account, so keep them secure.
Important: Never share your API keys or commit them to version control. Use environment variables to store keys securely.
Creating API Keys
Navigate to API Keys
Go to Settings → API Keys in your dashboard.
Create New Key
Click "Create API Key" and give it a descriptive name (e.g., "Production Server").
Copy Your Key
Copy the key immediately. For security, the full key is only shown once.
wsk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6wsk_
Wakestack prefix
live_
Production environment
The key prefix (wsk_live_) is visible in your dashboard, but the full key is only shown when first created.
Using API Keys
Header Format
Authorization: Bearer wsk_live_your_api_key_herecURL Example
curl -X GET https://wakestack.co.uk/api/monitors \
-H "Authorization: Bearer wsk_live_your_api_key_here" \
-H "Content-Type: application/json"JavaScript Example
const response = await fetch('https://wakestack.co.uk/api/monitors', {
method: 'GET',
headers: {
'Authorization': 'Bearer wsk_live_your_api_key_here',
'Content-Type': 'application/json',
},
});
const monitors = await response.json();Python Example
import requests
headers = {
'Authorization': 'Bearer wsk_live_your_api_key_here',
'Content-Type': 'application/json',
}
response = requests.get('https://wakestack.co.uk/api/monitors', headers=headers)
monitors = response.json()| Plan | Rate Limit | Burst Limit |
|---|---|---|
| Free | 60 requests/minute | 10 requests/second |
| Pro | 300 requests/minute | 30 requests/second |
| Enterprise | Custom | Custom |
Rate Limit Headers
Each response includes headers to help you track your usage:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705312800Handling Rate Limits
When you exceed the rate limit, the API returns a 429 Too Many Requests response. Implement exponential backoff and respect the X-RateLimit-Reset header.
{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}The API key is missing, invalid, or has been revoked.
{
"error": "Forbidden",
"message": "API key does not have permission for this action"
}The API key is valid but lacks permission for the requested resource.
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Try again in 60 seconds."
}You've exceeded your rate limit. Wait and retry.
Use Environment Variables
Store API keys in environment variables, never in code.
WAKESTACK_API_KEY=wsk_live_...Rotate Keys Regularly
Create new keys periodically and revoke old ones.
Use Separate Keys
Create different keys for different environments (dev, staging, prod).
Set Expiration Dates
Optionally set expiration dates on keys for temporary access.
List Your API Keys
curl -X GET https://wakestack.co.uk/api/api-keys \
-H "Authorization: Bearer wsk_live_your_api_key_here"Create New API Key
curl -X POST https://wakestack.co.uk/api/api-keys \
-H "Authorization: Bearer wsk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"name": "CI/CD Pipeline", "expiresAt": "2025-12-31T23:59:59Z"}'Delete API Key
curl -X DELETE https://wakestack.co.uk/api/api-keys/key_id_here \
-H "Authorization: Bearer wsk_live_your_api_key_here"Need help? Check out our FAQ or contact support.