API Reference
Automate your monitoring configuration with the BlackTide REST API. Full programmatic access to all features.
API Versioning
The current API version is v1. We follow semantic versioning and provide backward compatibility guarantees.
Authentication
All API requests must include an API token in the Authorization header using the Bearer authentication scheme.
Example Request with Authentication
bash
curl -X GET "https://api.blacktide.xyz/v1/monitors" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"You can generate API tokens in your Account Settings under the "API" tab. Each token is scoped to your team and inherits your user permissions.
Security Best Practices
- Never commit API tokens to version control
- Rotate tokens regularly (every 90 days recommended)
- Use environment variables to store tokens
- Revoke unused tokens immediately
Base URL
text
https://api.blacktide.xyz/v1Response Format
All API responses return JSON with the following structure:
Success Response
json
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production API"
}
}Error Response
json
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid monitor configuration",
"details": {
"url": "URL is required"
}
}
}Endpoints Overview
Monitors
| Method | Endpoint | Description |
|---|---|---|
GET | /monitors | List all monitors |
POST | /monitors | Create a new monitor |
GET | /monitors/:id | Get monitor details |
PATCH | /monitors/:id | Update a monitor |
DELETE | /monitors/:id | Delete a monitor |
POST | /monitors/:id/test | Test monitor connection |
Create Monitor Example
Create HTTP Monitor
bash
curl -X POST "https://api.blacktide.xyz/v1/monitors" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Production API",
"type": "http",
"url": "https://api.example.com/health",
"interval": 60,
"timeout": 30,
"locations": ["us-east-1", "eu-west-1"]
}'Incidents
| Method | Endpoint | Description |
|---|---|---|
GET | /incidents | List all incidents |
POST | /incidents | Create manual incident |
GET | /incidents/:id | Get incident details |
PATCH | /incidents/:id | Update incident status |
Alert Rules & Channels
| Method | Endpoint | Description |
|---|---|---|
GET | /alert-rules | List alert rules |
POST | /alert-rules | Create alert rule |
GET | /alert-channels | List alert channels |
POST | /alert-channels | Create alert channel |
Status Pages
| Method | Endpoint | Description |
|---|---|---|
GET | /status-pages | List status pages |
POST | /status-pages | Create status page |
PATCH | /status-pages/:id | Update status page |
Pagination
List endpoints support cursor-based pagination:
Paginated Request
bash
curl "https://api.blacktide.xyz/v1/monitors?limit=50&cursor=abc123"Paginated Response
json
{
"success": true,
"data": [...],
"pagination": {
"nextCursor": "xyz789",
"hasMore": true
}
}Rate Limits
API usage is rate-limited based on your plan to ensure fair usage and system stability:
| Plan | Requests/Hour | Burst Limit |
|---|---|---|
| Free | 100 | 10/min |
| Developer | 500 | 50/min |
| Pro | 1,000 | 100/min |
| Enterprise | Unlimited | Unlimited |
Rate Limit Headers
Every API response includes rate limit information:
text
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 987
X-RateLimit-Reset: 1699555200Rate Limit Exceeded
When you exceed your rate limit, the API returns a
429 Too Many Requests status code. Wait until the reset time (Unix timestamp) before making more requests.Error Codes
| Code | HTTP Status | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid request payload |
UNAUTHORIZED | 401 | Invalid or missing API token |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
RATE_LIMIT_EXCEEDED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Server error |
Webhooks
Subscribe to real-time events via webhooks. See the Webhooks Integration Guide for detailed setup instructions.
SDKs & Libraries
Official SDKs Coming Soon
We're working on official SDKs for popular languages:
- JavaScript/TypeScript (Node.js & Browser)
- Python
- Go
- Ruby