@@ -285,6 +285,120 @@ paths:
285285 message: Access Token Invalid
286286 schema:
287287 "$ref": "#/components/schemas/error"
288+ "/admins/activity_logs/search":
289+ post:
290+ summary: Search activity logs
291+ parameters:
292+ - name: Intercom-Version
293+ in: header
294+ schema:
295+ "$ref": "#/components/schemas/intercom_version"
296+ tags:
297+ - Admins
298+ operationId: searchActivityLogs
299+ description: Search and filter admin activity logs using a POST request
300+ with event type filter in the request body. You can find more details about the available event types in the List all activity logs endpoint.
301+ requestBody:
302+ required: true
303+ content:
304+ application/json:
305+ schema:
306+ type: object
307+ required:
308+ - created_at_after
309+ properties:
310+ created_at_after:
311+ type: string
312+ description: The start date that you request data for. It must
313+ be formatted as a UNIX timestamp.
314+ example: '1677253093'
315+ created_at_before:
316+ type: string
317+ description: The end date that you request data for. It must
318+ be formatted as a UNIX timestamp.
319+ example: '1775036326'
320+ event_types:
321+ type: array
322+ description: An optional list of event types to filter activity
323+ logs by. Use the List all activity log event types endpoint
324+ to retrieve available values.
325+ items:
326+ type: string
327+ example:
328+ - admin_login_success
329+ - app_name_change
330+ page:
331+ type: integer
332+ description: The page number of results to return.
333+ default: 1
334+ example: 1
335+ per_page:
336+ type: integer
337+ description: The number of results per page. Must be between
338+ 1 and 250.
339+ default: 20
340+ minimum: 1
341+ maximum: 250
342+ example: 20
343+ examples:
344+ search_with_event_types:
345+ summary: Search with event types filter
346+ value:
347+ created_at_after: '1677253093'
348+ created_at_before: '1775036326'
349+ event_types:
350+ - app_name_change
351+ - message_state_change
352+ search_without_filters:
353+ summary: Search with date range only
354+ value:
355+ created_at_after: '1677253093'
356+ created_at_before: '1775036326'
357+ responses:
358+ '200':
359+ description: Successful response
360+ content:
361+ application/json:
362+ examples:
363+ Successful response:
364+ value:
365+ type: activity_log.list
366+ pages:
367+ type: pages
368+ next:
369+ page: 1
370+ per_page: 20
371+ total_pages: 1
372+ activity_logs:
373+ - id: fca05814-4b72-4dce-ad4f-77a786a2c136
374+ performed_by:
375+ type: admin
376+ id: '991267464'
377+ email: admin5@email.com
378+ ip: 127.0.0.1
379+ metadata:
380+ before: before
381+ after: after
382+ created_at: 1734537253
383+ activity_type: app_name_change
384+ activity_description: Ciaran5 Lee changed your app name
385+ from before to after.
386+ schema:
387+ "$ref": "#/components/schemas/activity_log_list"
388+ '401':
389+ description: Unauthorized
390+ content:
391+ application/json:
392+ examples:
393+ Unauthorized:
394+ value:
395+ type: error.list
396+ request_id: 57cc6148-2c0a-471b-bd9e-859538110958
397+ errors:
398+ - code: unauthorized
399+ message: Access Token Invalid
400+ schema:
401+ "$ref": "#/components/schemas/error"
288402 "/admins/activity_log_event_types":
289403 get:
290404 summary: List all activity log event types
0 commit comments