Skip to content

Calendar Events

Manage booking events within a calendar. Events represent the bookable time slots or appointments that users can schedule.

Get Event

Retrieve details for a specific calendar event (slot).

Endpoint

http
GET /calendars/{id}/events/{event_id}

URL Parameters

ParameterTypeRequiredDescription
idintegerYesThe calendar ID
event_idintegerYesThe event ID

Query Parameters

ParameterTypeRequiredDescription
with[]array<string>NoInclude additional payloads. Supported values: calendar, smart_codes, settings_menu, calendar_event_lists.

Response

Returns an event object with settings normalized to the calendar host’s timezone. Optional collections are returned when requested via with[].

json
{
    "calendar_event": {
        "id": 2,
        "hash": "bd009d55f750026d3879cde67a7feebb",
        "user_id": 1,
        "calendar_id": 1,
        "duration": 30,
        "title": "30 Minute Meeting",
        "slug": "30min",
        "description": "Quick 30-minute consultation",
        "public_url": "https://affiliate.test/?fluent-booking=calendar&host=misbah&event=30min",
        "status": "active",
        "event_type": "single",
        "color_schema": "#0099ff",
        "max_book_per_slot": 1,
        "is_display_spots": false,
        "location_settings": [
            {
                "type": "phone_guest",
                "title": "Attendee Phone Number"
            }
        ],
        "settings": {
            "schedule_type": "weekly_schedules",
            "weekly_schedules": {
                "mon": {
                    "enabled": true,
                    "slots": [
                        {
                            "start": "09:00",
                            "end": "17:00"
                        }
                    ]
                }
            },
            "date_overrides": [],
            "range_type": "range_days",
            "range_days": 60,
            "schedule_conditions": {
                "value": 4,
                "unit": "hours"
            },
            "buffer_time_before": "0",
            "buffer_time_after": "0",
            "location_fields": {
                "conferencing": {
                    "label": "Conferencing",
                    "options": {
                        "google_meet": {
                            "title": "Google Meet (Connect Google Meet First)",
                            "disabled": false,
                            "location_type": "conferencing"
                        }
                    }
                },
                "phone": {
                    "label": "Phone",
                    "options": {
                        "phone_guest": {
                            "title": "Attendee Phone Number"
                        }
                    }
                }
            }
        },
        "author_profile": {
            "ID": 1,
            "name": "John Doe",
            "avatar": "https://example.com/avatar.jpg"
        }
    }
}
json
// Additional keys when requested through with[]
{
    "calendar": { "...": "Calendar profile data" },
    "smart_codes": { "...": "Editor shortcode outputs" },
    "settings_menu": [ "...": "Admin menu entries" ],
    "calendar_event_lists": [ "...": "Other slots grouped by calendar" ]
}

Get Availability Options

Retrieve available schedule presets and helper data for configuring event availability.

Endpoint

http
GET /calendars/{id}/events/{event_id}/availability

Response

json
{
    "schedule_options": {
        "range_types": [
            "range_days",
            "date_range"
        ],
        "...": "Additional availability configuration metadata"
    },
    "available_schedules": [
        {
            "id": 4,
            "title": "Default Host Availability"
        }
    ]
}

Create Event

Create a new booking event for a calendar.

Endpoint

http
POST /calendars/{id}/events

URL Parameters

ParameterTypeRequiredDescription
idintegerYesThe calendar ID

Request Body

FieldTypeRequiredDescription
titlestringYesEvent title displayed on booking pages.
durationintegerYesEvent length in minutes (minimum 5).
statusstringYesactive or draft.
event_typestringYesEvent type identifier (e.g., single, group).
descriptionstringNoEvent description (HTML allowed; sanitized server-side).
color_schemastringNoHex color code (default #0099ff).
location_typestringNoLocation type (e.g., zoom, phone).
location_settingsarray<object>ConditionalEach item must include type. For custom provide title; for in_person_organizer provide title and description (the address); for phone_organizer provide host_phone_number.
max_book_per_slotintegerConditionalRequired for group events; defaults to 1 otherwise.
is_display_spotsbooleanConditionalRequired for group events.
settingsobjectYesScheduling configuration (see below).

settings object

FieldTypeRequiredDescription
schedule_typestringYesScheduling mode. Most commonly weekly_schedules.
weekly_schedulesarray<object>ConditionalRequired when schedule_type is weekly_schedules. Provide blocks in the calendar timezone.
date_overridesarray<object>NoSpecific date overrides.
range_typestringNoAvailability range mode (range_days by default).
range_daysintegerNoNumber of days bookable when using range_days (default 60).
range_date_betweenarray<string>NoStart/end dates for date_range.
schedule_conditionsarray<object>NoAdvanced notice and lead time conditions.
buffer_time_beforestringNoMinutes before each event.
buffer_time_afterstringNoMinutes after each event.
slot_intervalstringNoInterval override between slots.
team_membersarray<integer>NoRequired for team calendars; include host user IDs.

Availability defaults to the host’s primary schedule. Use the Update Event Availability endpoint to switch to a custom schedule after creation.

Example Request

bash
curl -X POST "https://yoursite.com/wp-json/fluent-booking/v2/calendars/1/events" \
  -u "username:application_password" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "30 Minute Consultation",
    "duration": 30,
    "status": "active",
    "event_type": "single",
    "description": "Quick 1:1 consult",
    "color_schema": "#0099ff",
    "location_type": "zoom",
    "location_settings": [
      {
        "type": "zoom"
      }
    ],
    "settings": {
      "schedule_type": "weekly_schedules",
      "weekly_schedules": [
        {
          "day": "monday",
          "from": "09:00",
          "to": "17:00"
        }
      ],
      "buffer_time_before": "0",
      "buffer_time_after": "0"
    }
  }'

Response

json
{
    "message": "New Event Type has been created successfully",
    "slot": {
        "id": 15,
        "calendar_id": 1,
        "title": "30 Minute Consultation",
        "duration": 30,
        "status": "active",
        "...": "Additional slot fields"
    }
}

Update Event Details

Update descriptive fields, location data, and presentation settings for an event.

Endpoint

http
POST /calendars/{id}/events/{event_id}/details

Request Body

FieldTypeRequiredDescription
titlestringYesUpdated event title.
durationintegerYesEvent duration in minutes.
statusstringYesactive or draft.
descriptionstringNoHTML description (sanitized).
color_schemastringNoHex color.
location_settingsarray<object>ConditionalSame requirements as Create Event.
max_book_per_slotintegerConditionalRequired for group events.
is_display_spotsbooleanConditionalRequired for group events.
multi_duration.enabledbooleanConditionalProvide when configuring multiple durations.
multi_duration.default_durationintegerConditionalRequired if multi_duration.enabled is true.
multi_duration.available_durationsarray<integer>ConditionalRequired if multi_duration.enabled is true.

Response

json
{
    "message": "Data has been updated",
    "event": {
        "id": 15,
        "...": "Updated event fields"
    }
}

Update Event Availability

Adjust availability, override schedules, and attach shared availability pools.

Endpoint

http
POST /calendars/{id}/events/{event_id}/availability

Request Body

FieldTypeRequiredDescription
schedule_typestringYesScheduling mode (e.g., weekly_schedules).
weekly_schedulesarray<object>ConditionalRequired for weekly_schedules. Provide slots in the calendar timezone.
date_overridesarray<object>NoDate-specific overrides.
range_typestringNorange_days or date_range.
range_daysintegerNoNumber of days available when using range_days.
range_date_betweenarray<string>NoTwo-element array for date_range.
common_schedulebooleanNoWhen true, reuse a shared host schedule for team events.
hosts_schedulesobjectConditionalMap of host IDs to availability IDs. Required for team events when common_schedule is false.
availability_typestringNoexisting_schedule or custom.
availability_idintegerNoAvailability record ID when using existing_schedule.

Response

json
{
    "message": "Data has been updated",
    "event": {
        "id": 15,
        "settings": {
            "schedule_type": "weekly_schedules",
            "...": "Updated availability settings"
        }
    }
}

Update Event Limits

Configure booking limits, buffers, and frequency controls.

Endpoint

http
POST /calendars/{id}/events/{event_id}/limits

Request Body

Send a settings object with the following keys:

FieldTypeRequiredDescription
settings.schedule_conditionsarray<object>NoLead time, cancellation windows, and related limits.
settings.buffer_time_beforestringNoMinutes before each slot.
settings.buffer_time_afterstringNoMinutes after each slot.
settings.slot_intervalstringNoOverride interval between slots.
settings.booking_frequency.enabledbooleanNoToggle booking frequency limits.
settings.booking_frequency.limitsarray<object>ConditionalFrequency limits when enabled.
settings.booking_duration.enabledbooleanNoToggle maximum cumulative duration.
settings.booking_duration.limitsarray<object>ConditionalDuration limits when enabled.
settings.lock_timezone.enabledbooleanNoPrevent attendees from changing timezone.
settings.lock_timezone.timezonestringConditionalRequired when lock timezone is enabled.

Response

json
{
    "message": "Data has been updated",
    "event": {
        "id": 15,
        "settings": {
            "buffer_time_before": "0",
            "buffer_time_after": "0",
            "...": "Updated limit settings"
        }
    }
}

Update Event Status

Toggle an event between draft and active states.

Endpoint

http
PUT /calendars/{id}/events/{event_id}

Request Body

FieldTypeRequiredDescription
statusstringYesactive or draft.

Response

json
{
    "message": "Data has been updated"
}

Delete Event

Delete a calendar event.

Endpoint

http
DELETE /calendars/{id}/events/{event_id}

URL Parameters

ParameterTypeRequiredDescription
idintegerYesThe calendar ID
event_idintegerYesThe event ID

Response

json
{
    "message": "Calendar Event has been deleted"
}

Clone Event

Create a copy of an existing event, optionally duplicating it into another calendar.

Endpoint

http
POST /calendars/{id}/clone-event/{event_id}

Request Body

FieldTypeRequiredDescription
new_calendar_idintegerNoDestination calendar ID. Defaults to the current calendar.

Response

json
{
    "message": "The Event Type has been cloned successfully",
    "slot": {
        "id": 37,
        "calendar_id": 1,
        "title": "30 Minute Meeting (clone)",
        "...": "Cloned event fields"
    }
}

Get Event Schema

Retrieve the template used when initializing a new event.

Endpoint

http
GET /calendars/{id}/event-schema

URL Parameters

ParameterTypeRequiredDescription
idintegerYesThe calendar ID

Response

json
{
    "slot": {
        "title": "",
        "status": "active",
        "description": "",
        "duration": "30",
        "color_schema": "#0099ff",
        "calendar": {
            "id": 1,
            "title": "John Doe",
            "slug": "john-doe"
        },
        "settings": {
            "schedule_type": "weekly_schedules",
            "weekly_schedules": {
                "mon": {
                    "enabled": true,
                    "slots": [
                        {
                            "start": "09:00",
                            "end": "17:00"
                        }
                    ]
                }
            },
            "range_type": "range_days",
            "range_days": 60,
            "location_fields": {
                "conferencing": {
                    "label": "Conferencing",
                    "options": {
                        "google_meet": {
                            "title": "Google Meet (Connect Google Meet First)"
                        },
                        "zoom_meeting": {
                            "title": "Zoom Video (Connect Zoom Account First)"
                        }
                    }
                }
            }
        }
    }
}