API Reference
Bookings
Create bookings, check available slots, and manage appointment resources.
The Booking object
{
"id": 101,
"contact_id": 42,
"booking_type_id": 3,
"resource_id": 1,
"title": "Consultation – Sarah Johnson",
"starts_at": "2026-03-10T14:00:00.000000Z",
"ends_at": "2026-03-10T15:00:00.000000Z",
"status": "confirmed",
"notes": "First-time client",
"created_at": "2026-03-04T09:00:00.000000Z",
"updated_at": "2026-03-04T09:00:00.000000Z"
}
| Field | Type | Description |
|---|---|---|
id | integer | Unique booking ID |
contact_id | integer | Associated contact ID |
booking_type_id | integer | Type of booking |
resource_id | integer|null | Assigned resource (staff, room, etc.) |
title | string | Booking title |
starts_at | string | ISO 8601 start time |
ends_at | string | ISO 8601 end time |
status | string | pending, confirmed, cancelled, completed |
notes | string|null | Optional notes |
List bookings
GET /api/v1/bookings
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number |
per_page | integer | Results per page |
status | string | Filter by status: pending, confirmed, cancelled, completed |
contact_id | integer | Filter by contact |
from | string | ISO 8601 start date filter |
to | string | ISO 8601 end date filter |
Example
curl "https://dashboard.skylightchat.com/api/v1/bookings?status=confirmed&from=2026-03-01" \
-H "Authorization: Bearer sk_live_••••••••••••"
Create a booking
POST /api/v1/bookings
Request body
{
"contact_id": 42,
"booking_type_id": 3,
"resource_id": 1,
"starts_at": "2026-03-10T14:00:00.000000Z",
"notes": "First-time client"
}
| Field | Required | Description |
|---|---|---|
contact_id | ✓ | Contact being booked |
booking_type_id | ✓ | Type of booking service |
starts_at | ✓ | Start datetime (ISO 8601) |
resource_id | — | Optional resource assignment |
notes | — | Optional internal notes |
Example
curl -X POST https://dashboard.skylightchat.com/api/v1/bookings \
-H "Authorization: Bearer sk_live_••••••••••••" \
-H "Content-Type: application/json" \
-d '{
"contact_id": 42,
"booking_type_id": 3,
"starts_at": "2026-03-10T14:00:00.000000Z"
}'
Response 201 Created
{
"success": true,
"data": {
"id": 101,
"contact_id": 42,
"booking_type_id": 3,
"starts_at": "2026-03-10T14:00:00.000000Z",
"ends_at": "2026-03-10T15:00:00.000000Z",
"status": "confirmed"
},
"message": "Booking created successfully."
}
Get a booking
GET /api/v1/bookings/{id}
Update a booking
PUT /api/v1/bookings/{id}
{
"starts_at": "2026-03-11T10:00:00.000000Z",
"notes": "Rescheduled per client request"
}
Cancel a booking
POST /api/v1/bookings/{id}/cancel
curl -X POST https://dashboard.skylightchat.com/api/v1/bookings/101/cancel \
-H "Authorization: Bearer sk_live_••••••••••••"
Response
{
"success": true,
"data": { "id": 101, "status": "cancelled" },
"message": "Booking cancelled."
}
List booking types
GET /api/v1/bookings/types
Returns all booking types configured in your account.
{
"success": true,
"data": [
{
"id": 3,
"name": "30-Minute Consultation",
"duration_minutes": 30,
"description": "One-on-one consultation session",
"is_active": true
}
]
}
List resources
GET /api/v1/bookings/resources
Returns all bookable resources (staff members, rooms, etc.).
{
"success": true,
"data": [
{
"id": 1,
"name": "Dr. Ahmed Al-Rashid",
"type": "staff",
"is_active": true
}
]
}
Check available slots
GET /api/v1/bookings/availability
Returns available time slots for a given booking type.
Query parameters
| Parameter | Required | Description |
|---|---|---|
booking_type_id | ✓ | Booking type to check |
date | ✓ | Date in YYYY-MM-DD format |
resource_id | — | Optional specific resource |
Example
curl "https://dashboard.skylightchat.com/api/v1/bookings/availability?booking_type_id=3&date=2026-03-10" \
-H "Authorization: Bearer sk_live_••••••••••••"
Response
{
"success": true,
"data": {
"date": "2026-03-10",
"slots": [
{ "starts_at": "2026-03-10T09:00:00Z", "ends_at": "2026-03-10T09:30:00Z", "available": true },
{ "starts_at": "2026-03-10T09:30:00Z", "ends_at": "2026-03-10T10:00:00Z", "available": false },
{ "starts_at": "2026-03-10T10:00:00Z", "ends_at": "2026-03-10T10:30:00Z", "available": true }
]
}
}
