Skip to content
API reference/Appointments

Set booking hours

Try it

Changes when the site takes appointments. Only the fields you send change; in `hours`, each weekday you send replaces that day ([] = closed) and the others stay. Live at once — no publish. Turning booking on needs at least one open day.

PATCH/api/v1/sites/{site_id}/booking-hours

Authentication

An API key as Authorization: Bearer or x-api-key. It needs the bookings:write scope — set booking hours; confirm, decline, cancel and move appointments (live at once, the visitor is emailed).

bookings:writeChanges the live siteIdempotency-Key optionalMCP tool: set_booking_hours

Parameters

Named placeholders go in the path; the rest in a JSON body.

site_idstringPath · required
The site's id.1 to 100 characters
enabledbooleanBody · optional
true = visitors pick an open time.
time_zonestringBody · optional
IANA zone, e.g. America/Chicago.At most 60 characters
slot_minutesintegerBody · optional
10 to 480
hoursobjectBody · optional
{ "monday": [{ "from": "09:00", "to": "12:00" }, { "from": "13:00", "to": "17:00" }], "sunday": [] }
blocked_daysarray of stringBody · optional
Replaces the list of days off.
min_notice_hoursintegerBody · optional
0 to 336
days_aheadintegerBody · optional
1 to 180
needs_approvalbooleanBody · optional
reminder_hoursintegerBody · optional
0 to 168
customer_changesbooleanBody · optional
Let customers cancel or move their own booking from the link in their emails.
change_cutoff_hoursintegerBody · optional
Online changes stop this many hours before (0 = up to the start).0 to 336

Response

200 with JSON on success (schema on the right). Errors use the standard envelope; a retry with the same Idempotency-Key gets the first answer back (how retries work).

curl
curl -X PATCH 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/booking-hours' \
  -H "Authorization: Bearer $WEBSITEBUDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true,"slot_minutes":45,"hours":{"monday":[{"from":"09:00","to":"12:00"},{"from":"13:00","to":"17:00"}],"saturday":[{"from":"09:00","to":"13:00"}],"sunday":[]},"blocked_days":["2026-12-24","2026-12-25"],"needs_approval":true}'
Example arguments
{
  "site_id": "SITE_ID",
  "enabled": true,
  "slot_minutes": 45,
  "hours": {
    "monday": [
      {
        "from": "09:00",
        "to": "12:00"
      },
      {
        "from": "13:00",
        "to": "17:00"
      }
    ],
    "saturday": [
      {
        "from": "09:00",
        "to": "13:00"
      }
    ],
    "sunday": []
  },
  "blocked_days": [
    "2026-12-24",
    "2026-12-25"
  ],
  "needs_approval": true
}
Response schema
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string"
    },
    "saved": {
      "type": "boolean",
      "description": "false = never set up; the answer shows the defaults the settings form starts from."
    },
    "enabled": {
      "type": "boolean",
      "description": "true = visitors pick an open time on the site; false = the Appointments section is a plain \"ask for a day\" form."
    },
    "time_zone": {
      "type": "string"
    },
    "slot_minutes": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Length of one appointment."
    },
    "hours": {
      "type": "object",
      "properties": {
        "sunday": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false
          }
        },
        "monday": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false
          }
        },
        "tuesday": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false
          }
        },
        "wednesday": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false
          }
        },
        "thursday": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false
          }
        },
        "friday": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false
          }
        },
        "saturday": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "sunday",
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday"
      ],
      "additionalProperties": false,
      "description": "Open hours per weekday as HH:MM spans in time_zone; [] = closed."
    },
    "blocked_days": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Days off, YYYY-MM-DD."
    },
    "min_notice_hours": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "days_ahead": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "needs_approval": {
      "type": "boolean",
      "description": "true = each booking waits for confirm_appointment."
    },
    "reminder_hours": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Reminder email this many hours before; 0 = none."
    },
    "customer_changes": {
      "type": "boolean",
      "description": "true = customers may cancel or move their own booking from the link in their emails."
    },
    "change_cutoff_hours": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Online changes stop this many hours before the appointment."
    },
    "is_sample": {
      "type": "boolean"
    }
  },
  "required": [
    "site_id",
    "saved",
    "enabled",
    "time_zone",
    "slot_minutes",
    "hours",
    "blocked_days",
    "min_notice_hours",
    "days_ahead",
    "needs_approval",
    "reminder_hours",
    "customer_changes",
    "change_cutoff_hours",
    "is_sample"
  ],
  "additionalProperties": false
}