Hubstaff icon

Hubstaff

Interact with Hubstaff API v2

Actions35

Schedule → Create

AI-generated

Summary

Create an attendance schedule for a user in Hubstaff

Inputs

  • userId (required) — The ID of the user to schedule
  • scheduleDate (required) — The date of the schedule
  • startTime (required) — The start time of the schedule (HH:MM format)
  • endTime (required) — The end time of the schedule (HH:MM format)
  • additionalFields — Optional repeat schedule and weekday configuration for the schedule

Output shape

The Hubstaff API returns the created attendance schedule object, including the assigned schedule ID, user reference, date, start/end times, and any repeat/weekday settings.

All five parameters (userId, scheduleDate, startTime, endTime) are required. The additionalFields collection is optional; repeatSchedule defaults to 'none' and weekdays default to an empty array. If repeatSchedule is set to anything other than 'none', the repeat_schedule field is included in the API request. If weekdays are provided, the weekdays array is included.

Examples

Example 1: Create a standard Monday-Friday 9-to-5 schedule for user 123 on 2024-01-15

userId: 123, scheduleDate: 2024-01-15, startTime: 09:00, endTime: 17:00, additionalFields: { repeatSchedule: none }

Links

Discussion