Skip to content

Commit 64cc149

Browse files
farukaydinclaude
andcommitted
Add monitoring admin activities endpoint to Unstable OpenAPI spec
Add GET /monitoring/admin_activities endpoint definition, schemas (admin_activity, admin_activity_list), and Monitoring tag to the Unstable (v0) spec. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 33aa1ec commit 64cc149

File tree

1 file changed

+120
-0
lines changed

1 file changed

+120
-0
lines changed

descriptions/0/api.intercom.io.yaml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12383,6 +12383,90 @@ paths:
1238312383
message: Whatsapp message not found
1238412384
schema:
1238512385
"$ref": "#/components/schemas/error"
12386+
"/monitoring/admin_activities":
12387+
get:
12388+
summary: List admin activity metrics
12389+
parameters:
12390+
- name: Intercom-Version
12391+
in: header
12392+
schema:
12393+
"$ref": "#/components/schemas/intercom_version"
12394+
- name: team_ids[]
12395+
in: query
12396+
required: true
12397+
description: A list of team IDs to retrieve admin activity metrics for. Use `GET /teams` to list available team IDs.
12398+
schema:
12399+
type: array
12400+
items:
12401+
type: string
12402+
example: ["42", "87"]
12403+
- name: idle_threshold
12404+
in: query
12405+
required: false
12406+
description: The number of seconds after which an open conversation is considered idle. Defaults to 1800 (30 minutes).
12407+
schema:
12408+
type: integer
12409+
default: 1800
12410+
example: 1800
12411+
tags:
12412+
- Monitoring
12413+
operationId: listAdminActivities
12414+
description: |
12415+
Returns real-time activity metrics for admins in the specified teams. For each admin, the response includes counts of open, idle, and snoozed conversations.
12416+
12417+
This endpoint requires the `realtime_monitoring` feature to be enabled for your workspace.
12418+
responses:
12419+
'200':
12420+
description: Successful response
12421+
content:
12422+
application/json:
12423+
examples:
12424+
Successful response:
12425+
value:
12426+
type: admin_activity.list
12427+
data:
12428+
- type: admin_activity
12429+
admin_id: "123"
12430+
open: 5
12431+
idle: 2
12432+
snoozed: 1
12433+
- type: admin_activity
12434+
admin_id: "456"
12435+
open: 3
12436+
idle: 0
12437+
snoozed: 2
12438+
schema:
12439+
$ref: "#/components/schemas/admin_activity_list"
12440+
'400':
12441+
description: Bad request - missing team_ids parameter
12442+
content:
12443+
application/json:
12444+
examples:
12445+
Missing team_ids:
12446+
value:
12447+
type: error.list
12448+
request_id: "req-123"
12449+
errors:
12450+
- code: parameter_not_found
12451+
message: "team_ids is a required parameter. Use GET /teams to list available team IDs."
12452+
schema:
12453+
"$ref": "#/components/schemas/error"
12454+
'401':
12455+
"$ref": "#/components/responses/Unauthorized"
12456+
'403':
12457+
description: Feature not enabled
12458+
content:
12459+
application/json:
12460+
examples:
12461+
Feature disabled:
12462+
value:
12463+
type: error.list
12464+
request_id: "req-456"
12465+
errors:
12466+
- code: api_plan_restricted
12467+
message: "Real-time monitoring is not enabled for your workspace."
12468+
schema:
12469+
"$ref": "#/components/schemas/error"
1238612470
"/news/news_items":
1238712471
get:
1238812472
summary: List all news items
@@ -18600,6 +18684,40 @@ components:
1860018684
"$ref": "#/components/schemas/customer_request"
1860118685
required:
1860218686
- email
18687+
admin_activity:
18688+
type: object
18689+
description: Activity metrics for an individual admin.
18690+
properties:
18691+
type:
18692+
type: string
18693+
example: "admin_activity"
18694+
admin_id:
18695+
type: string
18696+
description: The unique identifier for the admin.
18697+
example: "123"
18698+
open:
18699+
type: integer
18700+
description: The number of open conversations assigned to the admin.
18701+
example: 5
18702+
idle:
18703+
type: integer
18704+
description: The number of idle conversations assigned to the admin. A conversation is idle when it has been open and waiting for an admin reply longer than the idle_threshold.
18705+
example: 2
18706+
snoozed:
18707+
type: integer
18708+
description: The number of snoozed conversations assigned to the admin.
18709+
example: 1
18710+
admin_activity_list:
18711+
type: object
18712+
description: A list of admin activity metrics.
18713+
properties:
18714+
type:
18715+
type: string
18716+
example: "admin_activity.list"
18717+
data:
18718+
type: array
18719+
items:
18720+
$ref: "#/components/schemas/admin_activity"
1860318721
away_status_reason:
1860418722
type: object
1860518723
properties:
@@ -27387,6 +27505,8 @@ tags:
2738727505
x-displayName: Macros
2738827506
- name: Messages
2738927507
description: Everything about your messages
27508+
- name: Monitoring
27509+
description: Real-time monitoring metrics for your workspace. Use these endpoints to track admin workload and conversation activity in real time.
2739027510
- name: News
2739127511
description: Everything about your News
2739227512
externalDocs:

0 commit comments

Comments
 (0)