Create new schedule with specified rules, timezone, account, user and calendar associations.

http
POST https://services.leadconnectorhq.com/calendars/schedules

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API 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

NameTypeRequiredExampleDescription
timezonestringYesAmerica/New_YorkTimezone for the schedule (IANA timezone identifier)
locationIdstringYesIkqiJlXJ7o9h61tCHHodAccount ID where this schedule applies
namestringYesBusiness Hours ScheduleHuman-readable name for the schedule
userIdstringYesIkqiJlXJ7o9h61tCHHodUser ID associated with the schedule
calendarIdsstring[]NoCalendar 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
json
{}

Example

curl -X POST 'https://services.leadconnectorhq.com/calendars/schedules' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "rules": [
    {
      "type": "wday",
      "day": "monday",
      "intervals": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ]
    }
  ],
  "timezone": "America/New_York",
  "locationId": "IkqiJlXJ7o9h61tCHHod",
  "name": "Business Hours Schedule",
  "userId": "IkqiJlXJ7o9h61tCHHod",
  "calendarIds": [
    "WvVX9LpvlBO6K506xLbp",
    "XyZ8MnQrStUvWxYzAbCdEf"
  ]
}'

Last updated October 26, 2026

Was this page helpful?