Skip to content

Commit fc07321

Browse files
Document Preview team office hours endpoints (#807)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 5defb9a commit fc07321

1 file changed

Lines changed: 171 additions & 4 deletions

File tree

‎descriptions/0/api.intercom.io.yaml‎

Lines changed: 171 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29831,6 +29831,138 @@ paths:
2983129831
message: "Team not found"
2983229832
schema:
2983329833
"$ref": "#/components/schemas/error"
29834+
"/teams/{team_id}/office_hours":
29835+
get:
29836+
summary: Retrieve team office hours
29837+
parameters:
29838+
- name: Intercom-Version
29839+
in: header
29840+
schema:
29841+
"$ref": "#/components/schemas/intercom_version_preview"
29842+
- name: team_id
29843+
in: path
29844+
required: true
29845+
description: The unique identifier of the team. Use `GET /teams` to list available team IDs.
29846+
example: '42'
29847+
schema:
29848+
type: string
29849+
tags:
29850+
- Teams
29851+
operationId: retrieveTeamOfficeHours
29852+
description: |
29853+
You can retrieve the team's linked office hours schedule, or the workspace default if the team has no schedule of its own.
29854+
29855+
The team must belong to your workspace. An unknown, malformed, or other-workspace team id returns a `404` error. If the team has no linked schedule and the workspace has no default, the endpoint returns a `404` error.
29856+
29857+
Requires either the `read_all` or `read_write_office_hours` OAuth scope and permission to manage workload management. Set `Intercom-Version: Preview`.
29858+
responses:
29859+
'200':
29860+
description: Team office hours schedule
29861+
content:
29862+
application/json:
29863+
examples:
29864+
Office hours schedule:
29865+
value:
29866+
type: office_hours_schedule
29867+
id: '123'
29868+
name: Standard Support Hours
29869+
time_zone_name: America/New_York
29870+
time_intervals:
29871+
- start_minute: 540
29872+
end_minute: 1020
29873+
day_of_week: 0
29874+
twenty_four_seven: false
29875+
created_at: 1717200000
29876+
updated_at: 1717200000
29877+
schema:
29878+
"$ref": "#/components/schemas/office_hours_schedule"
29879+
'401':
29880+
"$ref": "#/components/responses/Unauthorized"
29881+
'403':
29882+
"$ref": "#/components/responses/TeamOfficeHoursForbidden"
29883+
'404':
29884+
"$ref": "#/components/responses/TeamOfficeHoursNotFound"
29885+
put:
29886+
summary: Update team office hours
29887+
parameters:
29888+
- name: Intercom-Version
29889+
in: header
29890+
schema:
29891+
"$ref": "#/components/schemas/intercom_version_preview"
29892+
- name: team_id
29893+
in: path
29894+
required: true
29895+
description: The unique identifier of the team. Use `GET /teams` to list available team IDs.
29896+
example: '42'
29897+
schema:
29898+
type: string
29899+
tags:
29900+
- Teams
29901+
operationId: updateTeamOfficeHours
29902+
description: |
29903+
You can assign an office hours schedule to a team or set `office_hours_schedule_id` to `null` to remove the team's own schedule so it uses the workspace default. The field is required, even when its value is `null`.
29904+
29905+
The team and any non-null schedule must belong to your workspace. An unknown, malformed, or other-workspace team id returns a `404` error. An unknown, invalid, or other-workspace schedule id returns a `422` error. Sending the current value, including `null` for a team already using the workspace default, changes nothing.
29906+
29907+
Returns the same schedule object as `GET /teams/{team_id}/office_hours`. If removing the assignment leaves the team without a schedule and the workspace has no default, the assignment is removed but the response is a `404` error.
29908+
29909+
Requires the `read_write_office_hours` OAuth scope and permission to manage workload management. Set `Intercom-Version: Preview`.
29910+
requestBody:
29911+
required: true
29912+
content:
29913+
application/json:
29914+
schema:
29915+
"$ref": "#/components/schemas/update_office_hours_assignment_request"
29916+
examples:
29917+
Assign a schedule:
29918+
value:
29919+
office_hours_schedule_id: '123'
29920+
Use the workspace default:
29921+
value:
29922+
office_hours_schedule_id: null
29923+
responses:
29924+
'200':
29925+
description: Team office hours schedule
29926+
content:
29927+
application/json:
29928+
examples:
29929+
Office hours schedule:
29930+
value:
29931+
type: office_hours_schedule
29932+
id: '123'
29933+
name: Standard Support Hours
29934+
time_zone_name: America/New_York
29935+
time_intervals:
29936+
- start_minute: 540
29937+
end_minute: 1020
29938+
day_of_week: 0
29939+
twenty_four_seven: false
29940+
created_at: 1717200000
29941+
updated_at: 1717200000
29942+
schema:
29943+
"$ref": "#/components/schemas/office_hours_schedule"
29944+
'400':
29945+
"$ref": "#/components/responses/OfficeHoursScheduleIdMissing"
29946+
'401':
29947+
"$ref": "#/components/responses/Unauthorized"
29948+
'403':
29949+
"$ref": "#/components/responses/TeamOfficeHoursForbidden"
29950+
'404':
29951+
"$ref": "#/components/responses/TeamOfficeHoursNotFound"
29952+
'422':
29953+
description: Invalid office hours schedule
29954+
content:
29955+
application/json:
29956+
examples:
29957+
Unknown invalid or other-workspace schedule:
29958+
value:
29959+
type: error.list
29960+
request_id: 55555555-5555-4555-8555-555555555555
29961+
errors:
29962+
- code: parameter_invalid
29963+
message: Office hours schedule not found
29964+
schema:
29965+
"$ref": "#/components/schemas/error"
2983429966
"/news/news_items":
2983529967
get:
2983629968
summary: List all news items
@@ -39508,16 +39640,16 @@ components:
3950839640
update_office_hours_assignment_request:
3950939641
type: object
3951039642
title: Update Office Hours Assignment Request
39511-
description: Assign a schedule or remove a teammate's own schedule
39512-
so they inherit office hours.
39643+
description: Assign a schedule to a team or teammate, or remove the assignment
39644+
to use inherited office hours.
3951339645
required:
3951439646
- office_hours_schedule_id
3951539647
properties:
3951639648
office_hours_schedule_id:
3951739649
type: string
3951839650
nullable: true
3951939651
description: The id of an office hours schedule in your workspace. Set to
39520-
null to remove a teammate's own schedule. Required even when null.
39652+
null to remove the team's or teammate's own schedule. Required even when null.
3952139653
example: '123'
3952239654
bulk_update_admin_office_hours_request:
3952339655
type: object
@@ -59430,7 +59562,7 @@ components:
5943059562
Missing office_hours_schedule_id:
5943159563
value:
5943259564
type: error.list
59433-
request_id: your-request-id
59565+
request_id: 11111111-1111-4111-8111-111111111111
5943459566
errors:
5943559567
- code: parameter_missing
5943659568
message: 'param is missing or the value is empty or invalid: office_hours_schedule_id'
@@ -59457,6 +59589,41 @@ components:
5945759589
message: Teammate is not accessible
5945859590
schema:
5945959591
"$ref": "#/components/schemas/error"
59592+
TeamOfficeHoursForbidden:
59593+
description: Permission to manage workload management is required
59594+
content:
59595+
application/json:
59596+
examples:
59597+
Missing workload management permission:
59598+
value:
59599+
type: error.list
59600+
request_id: 22222222-2222-4222-8222-222222222222
59601+
errors:
59602+
- code: action_forbidden
59603+
message: Teammate lacks permission to manage team office hours
59604+
schema:
59605+
"$ref": "#/components/schemas/error"
59606+
TeamOfficeHoursNotFound:
59607+
description: Team or office hours schedule not found
59608+
content:
59609+
application/json:
59610+
examples:
59611+
Unknown malformed or other-workspace team:
59612+
value:
59613+
type: error.list
59614+
request_id: 33333333-3333-4333-8333-333333333333
59615+
errors:
59616+
- code: team_not_found
59617+
message: Team not found
59618+
No linked schedule or workspace default:
59619+
value:
59620+
type: error.list
59621+
request_id: 44444444-4444-4444-8444-444444444444
59622+
errors:
59623+
- code: office_hours_schedule_not_found
59624+
message: Office hours schedule not found
59625+
schema:
59626+
"$ref": "#/components/schemas/error"
5946059627
Unauthorized:
5946159628
description: Unauthorized
5946259629
content:

0 commit comments

Comments
 (0)