Actions35
- Activity Actions
- Application Actions
- Client Actions
- Invoice Actions
- Member Actions
- Note Actions
- Organization Actions
- Project Actions
- Schedule Actions
- Screenshot Actions
- Task Actions
- Time Entry Actions
- To-Do Actions
- URL Actions
- User Actions
Schedule → Create
AI-generatedSummary
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 }