Skip to content

Commit 88015f3

Browse files
authored
Document the Preview SLA rules endpoints (#731)
* Add SLA rules endpoints to the Preview spec * Clarify SLA rule target descriptions and note the OAuth scope * Use the Preview version header on the SLA rules endpoints
1 parent efbf677 commit 88015f3

1 file changed

Lines changed: 257 additions & 0 deletions

File tree

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

Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23419,6 +23419,158 @@ paths:
2341923419
message: Access Token Invalid
2342023420
schema:
2342123421
"$ref": "#/components/schemas/error"
23422+
"/sla_rules":
23423+
get:
23424+
summary: List all SLA rules
23425+
parameters:
23426+
- name: Intercom-Version
23427+
in: header
23428+
schema:
23429+
"$ref": "#/components/schemas/intercom_version_preview"
23430+
tags:
23431+
- SLA Rules
23432+
operationId: listSlaRules
23433+
description: |
23434+
You can fetch a list of all SLA rules for the workspace.
23435+
23436+
The list is not paginated and is ordered by `id`, lowest first. It includes archived SLA rules; deleted SLA rules are not returned.
23437+
23438+
Requires the `read_conversations` OAuth scope.
23439+
responses:
23440+
'200':
23441+
description: Successful response
23442+
content:
23443+
application/json:
23444+
examples:
23445+
Successful response:
23446+
value:
23447+
type: sla_rule.list
23448+
data:
23449+
- type: sla_rule
23450+
id: '12'
23451+
name: VIP customers
23452+
created_at: 1717200000
23453+
updated_at: 1719800000
23454+
archived: false
23455+
archived_at:
23456+
first_reply_time_in_seconds: 3600
23457+
next_reply_time_in_seconds:
23458+
time_to_close_in_seconds:
23459+
resolution_time_in_seconds: 86400
23460+
speed_of_answer_in_seconds:
23461+
office_hours_schedule_id: '123'
23462+
pause_on_waiting_on_customer: true
23463+
pause_on_snooze: false
23464+
- type: sla_rule
23465+
id: '15'
23466+
name: Priority billing
23467+
created_at: 1718000000
23468+
updated_at: 1721000000
23469+
archived: true
23470+
archived_at: 1721000000
23471+
first_reply_time_in_seconds: 1800
23472+
next_reply_time_in_seconds: 3600
23473+
time_to_close_in_seconds:
23474+
resolution_time_in_seconds:
23475+
speed_of_answer_in_seconds:
23476+
office_hours_schedule_id:
23477+
pause_on_waiting_on_customer: false
23478+
pause_on_snooze: false
23479+
schema:
23480+
"$ref": "#/components/schemas/sla_rule_list"
23481+
'401':
23482+
"$ref": "#/components/responses/Unauthorized"
23483+
'403':
23484+
description: SLA rules are not available on the workspace's plan
23485+
content:
23486+
application/json:
23487+
examples:
23488+
SLA rules are not available on the workspace's plan:
23489+
value:
23490+
type: error.list
23491+
request_id: 7c1e5a9d-3b42-4f68-9d05-e2a8b4c6f713
23492+
errors:
23493+
- code: api_plan_restricted
23494+
message: SLA rules are not available on your current plan.
23495+
schema:
23496+
"$ref": "#/components/schemas/error"
23497+
"/sla_rules/{id}":
23498+
get:
23499+
summary: Retrieve an SLA rule
23500+
parameters:
23501+
- name: Intercom-Version
23502+
in: header
23503+
schema:
23504+
"$ref": "#/components/schemas/intercom_version_preview"
23505+
- name: id
23506+
in: path
23507+
required: true
23508+
description: The unique identifier for the SLA rule.
23509+
example: '12'
23510+
schema:
23511+
type: string
23512+
tags:
23513+
- SLA Rules
23514+
operationId: getSlaRule
23515+
description: |
23516+
You can fetch the details of a single SLA rule, including archived SLA rules.
23517+
23518+
Requires the `read_conversations` OAuth scope.
23519+
responses:
23520+
'200':
23521+
description: SLA rule found
23522+
content:
23523+
application/json:
23524+
examples:
23525+
SLA rule found:
23526+
value:
23527+
type: sla_rule
23528+
id: '12'
23529+
name: VIP customers
23530+
created_at: 1717200000
23531+
updated_at: 1719800000
23532+
archived: false
23533+
archived_at:
23534+
first_reply_time_in_seconds: 3600
23535+
next_reply_time_in_seconds:
23536+
time_to_close_in_seconds:
23537+
resolution_time_in_seconds: 86400
23538+
speed_of_answer_in_seconds:
23539+
office_hours_schedule_id: '123'
23540+
pause_on_waiting_on_customer: true
23541+
pause_on_snooze: false
23542+
schema:
23543+
"$ref": "#/components/schemas/sla_rule"
23544+
'401':
23545+
"$ref": "#/components/responses/Unauthorized"
23546+
'403':
23547+
description: SLA rules are not available on the workspace's plan
23548+
content:
23549+
application/json:
23550+
examples:
23551+
SLA rules are not available on the workspace's plan:
23552+
value:
23553+
type: error.list
23554+
request_id: 5a2f8c14-9e63-4b07-a1d9-0c7e3b5f2a86
23555+
errors:
23556+
- code: api_plan_restricted
23557+
message: SLA rules are not available on your current plan.
23558+
schema:
23559+
"$ref": "#/components/schemas/error"
23560+
'404':
23561+
description: SLA rule not found
23562+
content:
23563+
application/json:
23564+
examples:
23565+
SLA rule not found:
23566+
value:
23567+
type: error.list
23568+
request_id: 9e4d1b72-6c35-4a80-8f29-b3d7a0e5c164
23569+
errors:
23570+
- code: sla_rule_not_found
23571+
message: SLA rule not found
23572+
schema:
23573+
"$ref": "#/components/schemas/error"
2342223574
"/subscription_types":
2342323575
get:
2342423576
summary: List subscription types
@@ -44033,6 +44185,108 @@ components:
4403344185
- `missed`: If there are any missed sla_events for the conversation and no canceled events. If there’s even a single missed sla event, the status will always be missed. A missed status is not applied when the SLA expires, only the next time a teammate replies.
4403444186
- `active`: An SLA has been applied to a conversation, but has not yet been fulfilled. SLA status is active only if there are no “hit, “missed”, or “canceled” events.
4403544187
example: hit
44188+
sla_rule:
44189+
title: SLA Rule
44190+
type: object
44191+
x-tags:
44192+
- SLA Rules
44193+
description: An SLA rule is a workspace's service-level agreement definition.
44194+
It sets the response-time targets a conversation is measured against.
44195+
properties:
44196+
type:
44197+
type: string
44198+
description: The type of the object - always `sla_rule`.
44199+
example: sla_rule
44200+
id:
44201+
type: string
44202+
description: The unique identifier for the SLA rule.
44203+
example: '12'
44204+
name:
44205+
type: string
44206+
description: The name of the SLA rule. It is unique within the workspace.
44207+
example: VIP customers
44208+
created_at:
44209+
type: integer
44210+
description: The time the SLA rule was created as a Unix timestamp.
44211+
example: 1717200000
44212+
updated_at:
44213+
type: integer
44214+
description: The time the SLA rule was last updated as a Unix timestamp.
44215+
example: 1719800000
44216+
archived:
44217+
type: boolean
44218+
description: Whether the SLA rule is archived.
44219+
example: false
44220+
archived_at:
44221+
type: integer
44222+
nullable: true
44223+
description: The time the SLA rule was archived as a Unix timestamp, or
44224+
`null` if it is not archived.
44225+
example: 1721000000
44226+
first_reply_time_in_seconds:
44227+
type: integer
44228+
nullable: true
44229+
description: The target time in seconds for the first reply, or `null`
44230+
if no target is set.
44231+
example: 3600
44232+
next_reply_time_in_seconds:
44233+
type: integer
44234+
nullable: true
44235+
description: The target time in seconds for a teammate to reply to each
44236+
subsequent customer message, or `null` if no target is set.
44237+
example: 7200
44238+
time_to_close_in_seconds:
44239+
type: integer
44240+
nullable: true
44241+
description: The target time in seconds for closing the conversation, or
44242+
`null` if no target is set.
44243+
example: 172800
44244+
resolution_time_in_seconds:
44245+
type: integer
44246+
nullable: true
44247+
description: The target time in seconds for a ticket to be resolved, or
44248+
`null` if no target is set.
44249+
example: 86400
44250+
speed_of_answer_in_seconds:
44251+
type: integer
44252+
nullable: true
44253+
description: The target time in seconds to answer an inbound phone call,
44254+
or `null` if no target is set. This timer does not pause.
44255+
example: 120
44256+
office_hours_schedule_id:
44257+
type: string
44258+
nullable: true
44259+
description: The unique identifier for the [office hours schedule](/docs/references/preview/rest-api/api.intercom.io/office-hours/getofficehoursschedule)
44260+
the SLA rule's timers count against. This is the SLA rule's own schedule
44261+
if it has one, otherwise the workspace's default schedule. It is `null`
44262+
if neither exists.
44263+
example: '123'
44264+
pause_on_waiting_on_customer:
44265+
type: boolean
44266+
description: Whether the SLA rule's timers pause while the conversation
44267+
is waiting on the customer.
44268+
example: true
44269+
pause_on_snooze:
44270+
type: boolean
44271+
description: Whether the SLA rule's timers pause while the conversation
44272+
is snoozed.
44273+
example: false
44274+
sla_rule_list:
44275+
title: SLA Rule List
44276+
type: object
44277+
x-tags:
44278+
- SLA Rules
44279+
description: A list of SLA rules for the workspace.
44280+
properties:
44281+
type:
44282+
type: string
44283+
description: The type of the object - always `sla_rule.list`.
44284+
example: sla_rule.list
44285+
data:
44286+
type: array
44287+
description: An array of SLA rules.
44288+
items:
44289+
"$ref": "#/components/schemas/sla_rule"
4403644290
snooze_conversation_request:
4403744291
title: Snooze Conversation Request
4403844292
type: object
@@ -46930,6 +47184,9 @@ tags:
4693047184
description: Everything about your Roles
4693147185
- name: Segments
4693247186
description: Everything about your Segments
47187+
- name: SLA Rules
47188+
description: |
47189+
Read the SLA rules defined in your workspace. An SLA rule is a service-level agreement definition: the response-time targets a conversation is measured against.
4693347190
- name: Subscription Types
4693447191
description: Everything about subscription types
4693547192
- name: Switch

0 commit comments

Comments
 (0)