Skip to content

Commit 1c99cd7

Browse files
farukaydinclaude
andauthored
Add search activity logs endpoint and remove event_types from list endpoint (Unstable) (#436)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e7c5da3 commit 1c99cd7

File tree

1 file changed

+115
-14
lines changed

1 file changed

+115
-14
lines changed

descriptions/0/api.intercom.io.yaml

Lines changed: 115 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ paths:
192192
"$ref": "#/components/schemas/intercom_version"
193193
- name: created_at_after
194194
in: query
195-
required: true
195+
required: false
196196
description: The start date that you request data for. It must be formatted
197197
as a UNIX timestamp.
198198
example: '1677253093'
@@ -206,19 +206,6 @@ paths:
206206
example: '1677861493'
207207
schema:
208208
type: string
209-
- name: event_types
210-
in: query
211-
required: false
212-
description: An optional list of event types to filter activity logs by. When
213-
provided, only logs matching the specified event types are returned. Use
214-
the List all activity log event types endpoint to retrieve available values.
215-
schema:
216-
type: array
217-
items:
218-
type: string
219-
example:
220-
- admin_login_success
221-
- app_name_change
222209
tags:
223210
- Admins
224211
operationId: listActivityLogs
@@ -285,6 +272,120 @@ paths:
285272
message: Access Token Invalid
286273
schema:
287274
"$ref": "#/components/schemas/error"
275+
"/admins/activity_logs/search":
276+
post:
277+
summary: Search activity logs
278+
parameters:
279+
- name: Intercom-Version
280+
in: header
281+
schema:
282+
"$ref": "#/components/schemas/intercom_version"
283+
tags:
284+
- Admins
285+
operationId: searchActivityLogs
286+
description: Search and filter admin activity logs using a POST request
287+
with event type filter in the request body. You can find more details
288+
about the available event types in the List all activity log event
289+
types endpoint.
290+
requestBody:
291+
required: true
292+
content:
293+
application/json:
294+
schema:
295+
type: object
296+
properties:
297+
created_at_after:
298+
type: string
299+
description: The start date that you request data for. It must
300+
be formatted as a UNIX timestamp.
301+
example: '1677253093'
302+
created_at_before:
303+
type: string
304+
description: The end date that you request data for. It must
305+
be formatted as a UNIX timestamp.
306+
example: '1677861493'
307+
event_types:
308+
type: array
309+
description: An optional list of event types to filter activity
310+
logs by. Use the list all activity log event types endpoint
311+
to retrieve available values.
312+
items:
313+
type: string
314+
example:
315+
- app_name_change
316+
- message_state_change
317+
page:
318+
type: integer
319+
description: The page number of results to return.
320+
default: 1
321+
example: 1
322+
per_page:
323+
type: integer
324+
description: The number of results per page. Must be between
325+
1 and 250.
326+
default: 20
327+
minimum: 1
328+
maximum: 250
329+
example: 20
330+
examples:
331+
search_with_event_types:
332+
summary: Search with event types filter
333+
value:
334+
created_at_after: '1677253093'
335+
created_at_before: '1677861493'
336+
event_types:
337+
- app_name_change
338+
- message_state_change
339+
search_without_filters:
340+
summary: Search with date range only
341+
value:
342+
created_at_after: '1677253093'
343+
created_at_before: '1677861493'
344+
responses:
345+
'200':
346+
description: Successful response
347+
content:
348+
application/json:
349+
examples:
350+
Successful response:
351+
value:
352+
type: activity_log.list
353+
pages:
354+
type: pages
355+
next:
356+
page: 1
357+
per_page: 20
358+
total_pages: 1
359+
activity_logs:
360+
- id: fca05814-4b72-4dce-ad4f-77a786a2c136
361+
performed_by:
362+
type: admin
363+
id: '991267464'
364+
email: admin5@email.com
365+
ip: 127.0.0.1
366+
metadata:
367+
before: before
368+
after: after
369+
created_at: 1734537253
370+
activity_type: app_name_change
371+
activity_description: Ciaran5 Lee changed your app name
372+
from before to after.
373+
schema:
374+
"$ref": "#/components/schemas/activity_log_list"
375+
'401':
376+
description: Unauthorized
377+
content:
378+
application/json:
379+
examples:
380+
Unauthorized:
381+
value:
382+
type: error.list
383+
request_id: 57cc6148-2c0a-471b-bd9e-859538110958
384+
errors:
385+
- code: unauthorized
386+
message: Access Token Invalid
387+
schema:
388+
"$ref": "#/components/schemas/error"
288389
"/admins/activity_log_event_types":
289390
get:
290391
summary: List all activity log event types

0 commit comments

Comments
 (0)