Add Office Hours API (schedules and exceptions) to Preview spec#537
Conversation
Documents the Preview Office Hours API: schedule and exception CRUD endpoints, schemas, and tag. Includes day_of_week and twenty_four_seven on schedules, day_of_week on exception intervals, and the 403 limited-availability gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address Redocly review feedback: document that time interval minutes are week-relative for schedules but day-relative for exceptions (and that day_of_week derives from exception_date), and drop nullable on exception_date since it is always present. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zilleeizad-inter
left a comment
There was a problem hiding this comment.
Review: Office Hours API spec — approved ✅
Reviewed alongside the paired docs PR intercom/developer-docs#956. The YAML additions in both PRs are byte-for-byte identical (935 added lines each) — no spec drift between the two repos.
Structural integrity checks (all passed):
- All
$reftargets (Unauthorized,ObjectNotFound,ValidationError,intercom_version,error) resolve in this spec. - No path/schema collision with existing
office_hours_*names. - New ops correctly follow the spec's global
security: - bearerAuth: []model and document theread_write_office_hoursscope in prose — consistent with convention, since scopes aren't modelled per-operation anywhere in this spec. - Example data is internally accurate: week-offset minutes (
1980→ Tue 09:00 →day_of_week: 1) and exception calendar derivations (2026-12-24→Thu→3,2026-12-25→Fri→4) all match the documented0=Monday…6=Sundayrule;closedexceptions serializetime_intervals: null; update examples bumpupdated_at.
No Critical/Medium issues. A few Low / optional polish notes (non-blocking):
1. PUT update operations omit requestBody.required: true — updateOfficeHoursSchedule and updateOfficeHoursException don't set it, while both POST creates do. As written, an empty-body PUT is permitted. Consider adding required: true unless that's intentional.
2. Inconsistent x-tags — item schemas carry x-tags: [Office Hours], but the list wrappers (office_hours_schedule_list, office_hours_exception_list) and the four create_/update_* request schemas don't. May match the broader spec convention for wrappers/requests; worth a glance to confirm it's intentional (affects reference sidebar grouping).
3. DELETE responses are inlined — both delete ops define the {id, object, deleted} shape inline. The object: discriminator correctly matches Intercom's deletion-response convention (not a bug), but elsewhere these are factored into reusable deleted_*_object schemas. Optional cleanup.
Approving — all findings are Low/optional.
Why?
The Preview Office Hours API (schedules and their per-date exceptions) shipped, and its serializers were updated after an earlier spec attempt —
day_of_weekandtwenty_four_sevenwere added andis_defaultremoved. This repo is the source of truth that drives SDK generation, so the spec needs to match the current API. Re-do of a previously reverted change.How?
Adds the schedule and exception CRUD endpoints, schemas, and an
Office Hourstag to the Preview spec, following existing Preview conventions. The API is in limited availability, so endpoints document the403gate.Related
Generated with Claude Code