SkyLight Chat
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"
}
FieldTypeDescription
idintegerUnique booking ID
contact_idintegerAssociated contact ID
booking_type_idintegerType of booking
resource_idinteger|nullAssigned resource (staff, room, etc.)
titlestringBooking title
starts_atstringISO 8601 start time
ends_atstringISO 8601 end time
statusstringpending, confirmed, cancelled, completed
notesstring|nullOptional notes

List bookings

GET /api/v1/bookings

Query parameters

ParameterTypeDescription
pageintegerPage number
per_pageintegerResults per page
statusstringFilter by status: pending, confirmed, cancelled, completed
contact_idintegerFilter by contact
fromstringISO 8601 start date filter
tostringISO 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"
}
FieldRequiredDescription
contact_idContact being booked
booking_type_idType of booking service
starts_atStart datetime (ISO 8601)
resource_idOptional resource assignment
notesOptional 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

ParameterRequiredDescription
booking_type_idBooking type to check
dateDate in YYYY-MM-DD format
resource_idOptional 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 }
    ]
  }
}