Calendar CRUD Setup
Manage GoHighLevel calendars programmatically with full create, read, update, and delete operations. Configure availability windows, buffer times, and booking settings through the API.
Prerequisites
Before you begin, confirm the following:
- A GoHighLevel sub-account with calendar access enabled
- A Private Integration Token (PIT) with the calendars scope enabled
- Your
locationIdfrom Settings > Business Info - At least one team member whose calendar you want to manage
- A REST client like Postman, Insomnia, or
curlinstalled
Set Up Authentication
Calendar endpoints require a Bearer token with the calendars scope.
- Go to Settings > Integrations > Private Integrations
- Click Create Private Integration (or use an existing one)
- Name it “Calendar Manager” or similar
- Under Scopes, enable calendars (read and write)
- Click Save and copy the token
export GHL_TOKEN="your-private-integration-token"
export LOCATION_ID="your-location-id"
Required headers:
Authorization: Bearer $GHL_TOKEN
Content-Type: application/json
Version: 2021-07-28
Make Your First Call
List all calendars in your sub-account:
curl -X GET "https://services.leadconnectorhq.com/calendars/?locationId=$LOCATION_ID" \
-H "Authorization: Bearer $GHL_TOKEN" \
-H "Version: 2021-07-28"
Create a new calendar:
curl -X POST "https://services.leadconnectorhq.com/calendars/" \
-H "Authorization: Bearer $GHL_TOKEN" \
-H "Content-Type: application/json" \
-H "Version: 2021-07-28" \
-d '{
"locationId": "'"$LOCATION_ID"'",
"name": "Discovery Calls",
"description": "30-minute discovery call calendar",
"slug": "discovery-calls",
"widgetSlug": "discovery-calls",
"calendarType": "round_robin",
"widgetType": "default",
"eventTitle": "Discovery Call with {{contact.name}}",
"eventColor": "#4287f5",
"meetingLocation": "Zoom",
"slotDuration": 30,
"slotBuffer": 15,
"slotInterval": 30,
"preBuffer": 5,
"appoinmentPerSlot": 1,
"appoinmentPerDay": 8
}'
Key fields: slotDuration is meeting length in minutes, slotBuffer is time between meetings, preBuffer is prep time before each slot, and appoinmentPerSlot controls concurrent bookings.
Update a calendar:
curl -X PUT "https://services.leadconnectorhq.com/calendars/{calendarId}" \
-H "Authorization: Bearer $GHL_TOKEN" \
-H "Content-Type: application/json" \
-H "Version: 2021-07-28" \
-d '{"name": "Strategy Calls", "slotDuration": 45}'
Delete a calendar:
curl -X DELETE "https://services.leadconnectorhq.com/calendars/{calendarId}" \
-H "Authorization: Bearer $GHL_TOKEN" \
-H "Version: 2021-07-28"
Handle the Response
A successful POST returns 200 with the full calendar object including the generated id, all settings, and availability configuration.
The GET (list) endpoint returns a calendars array with every calendar in the location. Each object includes id, name, slug, calendarType, teamMembers, and all scheduling settings.
A PUT returns the updated calendar object. A DELETE returns a success confirmation.
Common errors:
- 401 — Invalid token. Verify your PIT has calendars scope.
- 404 — Calendar ID not found. Use the list endpoint to get valid IDs.
- 422 — Missing required fields. The create call requires at minimum
locationId,name, andcalendarType. - 409 — Slug conflict. The
slugmust be unique within the location.
Test Your Setup
Verify your calendar management works end to end:
- List all calendars and note the count
- Create a test calendar with a unique slug like “test-calendar-api”
- Read the calendar back by ID and verify all settings match
- Update the name or duration and confirm the change persists
- Check the GHL dashboard under Calendars to see your test calendar
- Delete the test calendar and verify it no longer appears in the list
If the calendar does not appear in the dashboard, verify the locationId matches your active sub-account.
Next Steps
Read the full Calendar CRUD guide for advanced scheduling configurations and availability patterns. Set up Free Slots to check availability before booking, or configure Appointment CRUD to create bookings on your new calendar.