> ## Documentation Index
> Fetch the complete documentation index at: https://docs.periskope.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Chat Audit Logs

> Returns the audit trail of a chat — who changed what and when — newest first. Filter by performed_by and action, and restrict to a timestamp window.



## OpenAPI

````yaml api-reference/openapi-generated.json GET /v1/chats/{chat_id}/audit-logs
openapi: 3.0.3
info:
  title: Periskope API
  version: 1.0.0
  description: >-
    Periskope external API.


    Responses use a flat, unwrapped shape: most endpoints return the resource at
    the top level, and list endpoints return a wrapper object with pagination
    inline (e.g. `{ from, to, count, chats: [...] }`). The documented response
    schemas describe these shapes directly.
servers:
  - url: https://api.periskope.app
security:
  - bearerAuth: []
paths:
  /v1/chats/{chat_id}/audit-logs:
    get:
      tags:
        - Chats
      summary: List the audit logs of a chat
      description: >-
        Returns the audit trail of a chat — who changed what and when — newest
        first. Filter by performed_by and action, and restrict to a timestamp
        window.
      operationId: listChatAuditLogs
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              Unique id of the chat. For 1-1 chats, country code + number
              optionally suffixed with @c.us (e.g. 922222222222@c.us — the
              suffix is added automatically when omitted); for groups, the id
              ending with @g.us.
            example: 120363000000000000@g.us
          required: true
          description: >-
            Unique id of the chat. For 1-1 chats, country code + number
            optionally suffixed with @c.us (e.g. 922222222222@c.us — the suffix
            is added automatically when omitted); for groups, the id ending with
            @g.us.
          name: chat_id
          in: path
        - schema:
            type: integer
            nullable: true
            minimum: 0
            description: >-
              Number of records to skip before the first returned record. Use
              together with limit to paginate: page N is offset = N * limit.
              Defaults to 0.
            example: 0
          required: false
          description: >-
            Number of records to skip before the first returned record. Use
            together with limit to paginate: page N is offset = N * limit.
            Defaults to 0.
          name: offset
          in: query
        - schema:
            type: integer
            minimum: 1
            description: Maximum number of records to return in one page. Defaults to 1000.
            example: 1000
          required: false
          description: Maximum number of records to return in one page. Defaults to 1000.
          name: limit
          in: query
        - schema:
            type: string
            description: Only log entries at or after this time (ISO 8601).
            example: '2026-01-01T00:00:00Z'
          required: false
          description: Only log entries at or after this time (ISO 8601).
          name: start_time
          in: query
        - schema:
            type: string
            description: Only log entries at or before this time (ISO 8601).
            example: '2026-01-31T23:59:00Z'
          required: false
          description: Only log entries at or before this time (ISO 8601).
          name: end_time
          in: query
        - schema:
            type: string
            description: One or more actors, comma-separated — member emails or "api".
            example: user@example.com
          required: false
          description: One or more actors, comma-separated — member emails or "api".
          name: performed_by
          in: query
        - schema:
            type: string
            description: >-
              One or more actions, comma-separated, e.g. 'NAME_CHANGED',
              'IMAGE_CHANGED', 'ASSIGNEE_CHANGED', 'LABEL_CHANGED',
              'CUSTOM_PROPERTY_CHANGED', 'CHAT_ARCHIVED', 'CHAT_UNARCHIVED'
            example: STATUS_CHANGED,ASSIGNEE_CHANGED
          required: false
          description: >-
            One or more actions, comma-separated, e.g. 'NAME_CHANGED',
            'IMAGE_CHANGED', 'ASSIGNEE_CHANGED', 'LABEL_CHANGED',
            'CUSTOM_PROPERTY_CHANGED', 'CHAT_ARCHIVED', 'CHAT_UNARCHIVED'
          name: action
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            description: 'Sort by timestamp: ''asc'' or ''desc'' (default).'
            example: desc
          required: false
          description: 'Sort by timestamp: ''asc'' or ''desc'' (default).'
          name: sort_order
          in: query
      responses:
        '200':
          description: Paginated list of audit log entries, newest first
          content:
            application/json:
              schema:
                type: object
                properties:
                  from:
                    type: integer
                    description: >-
                      1-based index of the first record in this page (offset +
                      1).
                    example: 1
                  to:
                    type: integer
                    description: 1-based index of the last record in this page.
                    example: 20
                  count:
                    type: integer
                    description: >-
                      Number of records in this page — the length of the `logs`
                      array, not the total across all pages.
                    example: 20
                  logs:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChatAuditLog'
                    description: The logs in this page.
              examples:
                default:
                  summary: Response body
                  value:
                    from: 1
                    to: 20
                    count: 20
                    logs:
                      - log_id: 00000000-0000-0000-0000-000000000000
                        org_id: 00000000-0000-0000-0000-000000000000
                        chat_id: 120363000000000000@g.us
                        action: STATUS_CHANGED
                        performed_by: user@example.com
                        type: chat
                        old_record: {}
                        new_record: {}
                        timestamp: '2026-01-15T09:30:00.000Z'
        '401':
          description: Invalid, expired or missing API token
          content:
            application/json:
              examples:
                error:
                  summary: Invalid, expired or missing API token
                  value:
                    code: UNAUTHORIZED_ERROR
                    message: Invalid bearer auth token
                    status: 401
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED_ERROR
                  message:
                    type: string
                    example: Invalid bearer auth token
                  status:
                    type: integer
                    example: 401
                example:
                  code: UNAUTHORIZED_ERROR
                  message: Invalid bearer auth token
                  status: 401
        '422':
          description: Request validation failed
          content:
            application/json:
              examples:
                error:
                  summary: Request validation failed
                  value:
                    code: VALIDATION_ERROR
                    message: Request validation failed
                    status: 422
                    fields:
                      body.chat_id:
                        message: chat_id is required
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                  message:
                    type: string
                    example: Request validation failed
                  status:
                    type: integer
                    example: 422
                  fields:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        message:
                          type: string
                        value: {}
                    example:
                      body.chat_id:
                        message: chat_id is required
                example:
                  code: VALIDATION_ERROR
                  message: Request validation failed
                  status: 422
                  fields:
                    body.chat_id:
                      message: chat_id is required
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              examples:
                error:
                  summary: Rate limit exceeded
                  value:
                    code: RATE_LIMIT_ERROR
                    message: You can only make 100 requests per second
                    status: 429
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: RATE_LIMIT_ERROR
                  message:
                    type: string
                    example: You can only make 100 requests per second
                  status:
                    type: integer
                    example: 429
                example:
                  code: RATE_LIMIT_ERROR
                  message: You can only make 100 requests per second
                  status: 429
        '500':
          description: Internal server error
          content:
            application/json:
              examples:
                error:
                  summary: Internal server error
                  value:
                    code: UNKNOWN_ERROR
                    message: Internal server error
                    status: 500
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNKNOWN_ERROR
                  message:
                    type: string
                    example: Internal server error
                  status:
                    type: integer
                    example: 500
                example:
                  code: UNKNOWN_ERROR
                  message: Internal server error
                  status: 500
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: TypeScript
          source: |-
            import { PeriskopeApi } from '@periskope/periskope-client';

            const client = new PeriskopeApi({
              authToken: 'YOUR_API_KEY',
            });

            async function main() {
              const response = await client.chats.listChatAuditLogs({
                chat_id: '120363000000000000@g.us',
              });
              console.log(response);
            }

            main();
        - lang: bash
          label: cURL
          source: >-
            curl -X GET
            'https://api.periskope.app/v1/chats/120363000000000000@g.us/audit-logs'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
components:
  schemas:
    ChatAuditLog:
      type: object
      properties:
        log_id:
          type: string
          description: Unique id of the audit log entry
          example: 00000000-0000-0000-0000-000000000000
        org_id:
          type: string
          description: Id of the organization the log belongs to
          example: 00000000-0000-0000-0000-000000000000
        chat_id:
          type: string
          description: Id of the chat the log belongs to
          example: 120363000000000000@g.us
        action:
          type: string
          description: >-
            What changed, e.g. 'NAME_CHANGED', 'IMAGE_CHANGED',
            'ASSIGNEE_CHANGED', 'LABEL_CHANGED', 'CUSTOM_PROPERTY_CHANGED',
            'CHAT_ARCHIVED', 'CHAT_UNARCHIVED'
          example: STATUS_CHANGED
        performed_by:
          type: string
          description: 'Who performed the change: a member email, "api", or a system actor'
          example: user@example.com
        type:
          type: string
          description: Log scope — always 'chat' for this endpoint
          example: chat
        old_record:
          type: object
          description: Relevant fields of the record before the change
        new_record:
          type: object
          description: Relevant fields of the record after the change
        timestamp:
          type: string
          description: When the change happened, as an ISO 8601 timestamp
          example: '2026-01-15T09:30:00.000Z'
      description: An audit log entry recording a change to a chat
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Periskope API token, sent as `Authorization: Bearer <token>`.
        Generate one from the Periskope dashboard under **Settings → API &
        Webhooks**. API access requires an active Pro or Enterprise plan.

````