API Reference
OpsPilot365 provides a REST API for programmatic access to your managed tenants and data.
The API is currently in beta. Endpoints may change without notice.
Base URL
All API requests should be made to:
https://api.opspilot365.com/v1Authentication
The API uses API keys for authentication. Include your API key in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.opspilot365.com/v1/tenantsSee Authentication for details on obtaining and managing API keys.
Rate Limits
| Plan | Requests per minute |
|---|---|
| Starter | 60 |
| Growth | 300 |
| Scale | 1000 |
| Custom | Unlimited |
Rate limit headers are included in all responses:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 55
X-RateLimit-Reset: 1640000000Response Format
All responses are returned as JSON:
{
"success": true,
"data": { ... },
"meta": {
"page": 1,
"limit": 25,
"total": 100
}
}Error Responses
{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "The request was invalid",
"details": { ... }
}
}Common Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Invalid or missing API key |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
RATE_LIMITED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Server error |
Pagination
List endpoints support pagination:
GET /v1/tenants?page=2&limit=50Parameters:
page- Page number (default: 1)limit- Items per page (default: 25, max: 100)
Available Endpoints
Tenants
| Method | Endpoint | Description |
|---|---|---|
| GET | /tenants | List all tenants |
| GET | /tenants/:id | Get tenant details |
| POST | /tenants/:id/sync | Trigger tenant sync |
Users
| Method | Endpoint | Description |
|---|---|---|
| GET | /tenants/:id/users | List tenant users |
| GET | /tenants/:id/users/:userId | Get user details |
| POST | /tenants/:id/users | Create user |
| PATCH | /tenants/:id/users/:userId | Update user |
| DELETE | /tenants/:id/users/:userId | Delete user |
Licenses
| Method | Endpoint | Description |
|---|---|---|
| GET | /tenants/:id/licenses | List available licenses |
| GET | /tenants/:id/licenses/assignments | List assignments |
| POST | /tenants/:id/licenses/assign | Assign license |
| POST | /tenants/:id/licenses/remove | Remove license |
Webhooks
| Method | Endpoint | Description |
|---|---|---|
| GET | /webhooks | List webhooks |
| POST | /webhooks | Create webhook |
| DELETE | /webhooks/:id | Delete webhook |
SDKs
Coming soon:
- JavaScript/TypeScript SDK
- Python SDK
- PowerShell Module
Support
For API support, contact us at api-support@opspilot365.com
Last updated on