Business CalendarsCreate user availability schedule
Business Calendars
POST
Create user availability schedule
Create new schedule with specified rules, timezone, account, user and calendar associations.
Create new schedule with specified rules, timezone, account, user and calendar associations.
http
POST https://services.leadconnectorhq.com/calendars/schedules
Authorization
Name
Type
Required
Example
Description
Authorization
string
Yes
Bearer token generated from the Leadway portal. See Authentication.
Version
string
Yes
2021-07-28
API version.
Body
rules (object[]): Schedule rules defining when the schedule is active
type (string, required): Type of schedule rule - weekday (recurring) or date (specific date) Possible values: 'wday', 'date' Example: wday
intervals (object[], required): Time intervals for the rule (e.g., 9 AM to 5 PM)
from (string, required): Start time in HH:MM format (24-hour format) Example: 09:00
to (string, required): End time in HH:MM format (24-hour format) Example: 17:00
date (string): Specific date in YYYY-MM-DD format (only for date-type rules) Example: 2023-04-15
day (string): Day of week (only for weekday-type rules) Possible values: 'sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday' Example: monday
Name
Type
Required
Example
Description
timezone
string
Yes
America/New_York
Timezone for the schedule (IANA timezone identifier)
locationId
string
Yes
IkqiJlXJ7o9h61tCHHod
Account ID where this schedule applies
name
string
Yes
Business Hours Schedule
Human-readable name for the schedule
userId
string
Yes
IkqiJlXJ7o9h61tCHHod
User ID associated with the schedule
calendarIds
string[]
No
Calendar IDs associated with the schedule
Responses
201 - Schedule created successfully
schedule (object, required): Schedule
json
{}
400 - Invalid request parameters
json
{}
401 - User not authenticated
json
{}
422 - Validation errors in schedule rules or conflicting data