API Reference
API Reference
Complete API reference for the Servicebay API
API Reference
The Servicebay API provides RESTful endpoints for managing your organisation's data.
Base URL
https://developer.servicebay.io/api/v1Authentication
All API requests require authentication using an API key. Include your key in the X-API-Key header:
curl -X GET \
'https://developer.servicebay.io/api/v1/organisations/{orgId}/customers' \
-H 'X-API-Key: sk_live_your_api_key_here'Available Endpoints
Organisations
GET /organisations/{orgId}- Get organisation detailsPUT /organisations/{orgId}- Update organisation
Customers
GET /organisations/{orgId}/customers- List customersPOST /organisations/{orgId}/customers- Create customerGET /organisations/{orgId}/customers/{customerId}- Get customerPUT /organisations/{orgId}/customers/{customerId}- Update customerDELETE /organisations/{orgId}/customers/{customerId}- Delete customer
Calendar Events
GET /organisations/{orgId}/calendar-events- List calendar eventsPOST /organisations/{orgId}/calendar-events- Create calendar eventGET /organisations/{orgId}/calendar-events/{eventId}- Get calendar eventPUT /organisations/{orgId}/calendar-events/{eventId}- Update calendar eventDELETE /organisations/{orgId}/calendar-events/{eventId}- Delete calendar event
Tickets
GET /organisations/{orgId}/tickets- List ticketsPOST /organisations/{orgId}/tickets- Create ticketGET /organisations/{orgId}/tickets/{ticketId}- Get ticketPUT /organisations/{orgId}/tickets/{ticketId}- Update ticketDELETE /organisations/{orgId}/tickets/{ticketId}- Delete ticket
Response Format
All responses follow a consistent format:
Success Response
{
"success": true,
"data": {
// Response data here
}
}Error Response
{
"success": false,
"error": "Description of what went wrong"
}Rate Limiting
API requests are rate limited to 100 requests per minute per API key. Rate limit information is included in response headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per minute |
X-RateLimit-Remaining | Remaining requests in the current window |
X-RateLimit-Reset | Unix timestamp when the rate limit resets |
For the interactive OpenAPI documentation, visit the OpenAPI Spec endpoint.