set_org_work_schedule
Create or update a named organization-level work schedule (a weekly working-time profile). Provide schedule_id to update an existing one, or omit it to create a new one. weekly_schedule is a JSON object mapping lowercase day names to a working window, e.g. {"monday":{"start":"09:00","end":"18:00"},"saturday":null}. The organization is fixed by your context. On update, only the fields you supply are changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Schedule name (required when creating). | |
| notes | No | Optional free-text notes. | |
| is_active | No | Whether the profile is active. Defaults to true on create. | |
| schedule_id | No | Id of an existing schedule to UPDATE. Omit to CREATE a new one. | |
| idempotency_key | No | Optional caller-supplied key; retrying with the same key returns the original result instead of acting twice. | |
| weekly_schedule | No | A JSON object (as a string) mapping lowercase day names (sunday..saturday) to a {"start":"HH:mm","end":"HH:mm"} window, or null for a non-working day. Example: {"monday":{"start":"09:00","end":"18:00"},"sunday":null}. | |
| first_day_of_week | No | First day of the week: 0=Sunday .. 6=Saturday (1=Monday default). | |
| default_for_countries | No | Optional comma-separated ISO-2 country codes this profile is the default for, e.g. "US,CA". |