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/v1

Authentication

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 details
  • PUT /organisations/{orgId} - Update organisation

Customers

  • GET /organisations/{orgId}/customers - List customers
  • POST /organisations/{orgId}/customers - Create customer
  • GET /organisations/{orgId}/customers/{customerId} - Get customer
  • PUT /organisations/{orgId}/customers/{customerId} - Update customer
  • DELETE /organisations/{orgId}/customers/{customerId} - Delete customer

Calendar Events

  • GET /organisations/{orgId}/calendar-events - List calendar events
  • POST /organisations/{orgId}/calendar-events - Create calendar event
  • GET /organisations/{orgId}/calendar-events/{eventId} - Get calendar event
  • PUT /organisations/{orgId}/calendar-events/{eventId} - Update calendar event
  • DELETE /organisations/{orgId}/calendar-events/{eventId} - Delete calendar event

Tickets

  • GET /organisations/{orgId}/tickets - List tickets
  • POST /organisations/{orgId}/tickets - Create ticket
  • GET /organisations/{orgId}/tickets/{ticketId} - Get ticket
  • PUT /organisations/{orgId}/tickets/{ticketId} - Update ticket
  • DELETE /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:

HeaderDescription
X-RateLimit-LimitMaximum requests per minute
X-RateLimit-RemainingRemaining requests in the current window
X-RateLimit-ResetUnix timestamp when the rate limit resets

For the interactive OpenAPI documentation, visit the OpenAPI Spec endpoint.

On this page