Add a rule to an existing schedule to control execution conditions, exclusions, and termination criteria
| Field | Type | Required | Description |
|---|---|---|---|
schedule_uuid | string | Yes | UUID of the schedule to add the rule to |
rule_type | string | Yes | Type of rule: "time_window", "calendar_window", "solar_window", "exclusion", or "termination" |
start_time | string | Conditional | Start time for time window rules (format: "HH:mm:ss") |
end_time | string | Conditional | End time for time window rules (format: "HH:mm:ss") |
timezone | string | Conditional | Timezone for time window rules (IANA timezone identifier) |
allow_days | array | Conditional | Array of day numbers (1-31) for calendar window rules |
allow_months | array | Conditional | Array of month numbers (1-12) for calendar window rules |
exclusion_dates | array | Conditional | Array of dates to exclude (format: "YYYY-MM-DD") for exclusion rules |
solar_start_event | string | Conditional | Solar event for start of solar window (e.g., "sunrise", "sunset") |
solar_end_event | string | Conditional | Solar event for end of solar window |
solar_lat | string | Conditional | Latitude for solar window rules (decimal degrees) |
solar_long | string | Conditional | Longitude for solar window rules (decimal degrees) |
max_run_to_terminate_after | integer | Conditional | Maximum number of runs before termination (for termination rules) |
expire_at | string | null | Conditional | ISO 8601 datetime when schedule should expire (for termination rules) |
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the rule was added successfully |
details | string | Success message |
rule_type: "time_window"start_time: Start time (e.g., "09:00:00")end_time: End time (e.g., "17:00:00")timezone: IANA timezone identifierrule_type: "calendar_window"allow_days: Array of day numbers (1-31), e.g., [1, 15] for 1st and 15thallow_months: Array of month numbers (1-12), optionalrule_type: "solar_window"solar_start_event: Solar event for start (e.g., "civil_dawn")solar_end_event: Solar event for end (e.g., "civil_dusk")solar_lat: Latitude in decimal degreessolar_long: Longitude in decimal degreesrule_type: "exclusion"exclusion_dates: Array of dates in "YYYY-MM-DD" formatrule_type: "termination"max_run_to_terminate_after OR expire_at (or both)"sunrise" - When the sun appears above the horizon"sunset" - When the sun disappears below the horizon"civil_dawn" - Morning when the sun is 6° below the horizon"civil_dusk" - Evening when the sun is 6° below the horizon"nautical_dawn" - Morning when the sun is 12° below the horizon"nautical_dusk" - Evening when the sun is 12° below the horizon"astronomical_dawn" - Morning when the sun is 18° below the horizon"astronomical_dusk" - Evening when the sun is 18° below the horizonAPI key for authentication. Get this from your dashboard by selecting a brand and going to API Keys section.
Brand UUID for authentication. Get this from your dashboard after adding a brand - it will be displayed in the UI.
Schedule rule configuration
UUID of the schedule to add the rule to
Type of rule
time_window, calendar_window, solar_window, exclusion, termination Start time for time window rules (format: HH:mm:ss)
End time for time window rules (format: HH:mm:ss)
Timezone for time window rules (IANA timezone identifier)
Array of day numbers (1-31) for calendar window rules
1 <= x <= 31Array of month numbers (1-12) for calendar window rules
1 <= x <= 12Array of dates to exclude (format: YYYY-MM-DD) for exclusion rules
Solar event for start of solar window
sunrise, sunset, civil_dawn, civil_dusk, nautical_dawn, nautical_dusk, astronomical_dawn, astronomical_dusk Solar event for end of solar window
sunrise, sunset, civil_dawn, civil_dusk, nautical_dawn, nautical_dusk, astronomical_dawn, astronomical_dusk Latitude for solar window rules (decimal degrees)
Longitude for solar window rules (decimal degrees)
Maximum number of runs before termination (for termination rules)
ISO 8601 datetime when schedule should expire (for termination rules)