Skip to content

Add Office Hours API (schedules and exceptions) to Preview spec#537

Merged
Apexinsideapex merged 2 commits into
mainfrom
rohitsharma/office-hours-openapi-refresh
Jun 4, 2026
Merged

Add Office Hours API (schedules and exceptions) to Preview spec#537
Apexinsideapex merged 2 commits into
mainfrom
rohitsharma/office-hours-openapi-refresh

Conversation

@Apexinsideapex
Copy link
Copy Markdown
Contributor

@Apexinsideapex Apexinsideapex commented Jun 4, 2026

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_week and twenty_four_seven were added and is_default removed. 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 Hours tag to the Preview spec, following existing Preview conventions. The API is in limited availability, so endpoints document the 403 gate.

Related

  • Developer docs sync: intercom/developer-docs#956

Generated with Claude Code

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>
@Apexinsideapex Apexinsideapex self-assigned this Jun 4, 2026
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>
@Apexinsideapex Apexinsideapex enabled auto-merge (squash) June 4, 2026 14:04
Copy link
Copy Markdown

@zilleeizad-inter zilleeizad-inter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 $ref targets (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 the read_write_office_hours scope 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 documented 0=Monday…6=Sunday rule; closed exceptions serialize time_intervals: null; update examples bump updated_at.

No Critical/Medium issues. A few Low / optional polish notes (non-blocking):

1. PUT update operations omit requestBody.required: trueupdateOfficeHoursSchedule 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.

~ Automated via Claude

@Apexinsideapex Apexinsideapex disabled auto-merge June 4, 2026 14:49
@Apexinsideapex Apexinsideapex merged commit d2fa3ae into main Jun 4, 2026
3 checks passed
@Apexinsideapex Apexinsideapex deleted the rohitsharma/office-hours-openapi-refresh branch June 4, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants