> ## Documentation Index
> Fetch the complete documentation index at: https://botpress-ak-docs-20-document-updating-variables-from-outsid.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# getAuditRecords

> Get the audit records of a workspace, sorted from most recent to oldest.



## OpenAPI

````yaml admin-openapi.json get /v1/admin/workspaces/{id}/audit-records
openapi: 3.0.0
info:
  title: Botpress Admin API
  description: API for Botpress Cloud Manager
  version: 1.52.1
servers:
  - url: https://api.botpress.cloud
security:
  - BearerAuth: []
tags:
  - name: documented
  - name: experimental
paths:
  /v1/admin/workspaces/{id}/audit-records:
    get:
      tags:
        - Endpoints
      description: Get the audit records of a workspace, sorted from most recent to oldest.
      operationId: getAuditRecords
      parameters:
        - name: nextToken
          in: query
          description: >-
            Provide the `meta.nextToken` value provided in the last API response
            to retrieve the next page of results
          schema:
            type: string
        - name: id
          in: path
          description: Workspace ID
          required: true
          schema:
            type: string
        - name: x-multiple-integrations
          in: header
          description: >-
            Whether the client supports bots with multiple instances of the same
            integration. Set to "true" to receive integration instances keyed by
            their alias instead of their id. This header will be removed in the
            future, and the API will always return multiple instances keyed by
            alias.
          required: false
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/getAuditRecordsResponse'
        default:
          $ref: '#/components/responses/getAuditRecordsResponse'
components:
  responses:
    getAuditRecordsResponse:
      description: List of audit records
      content:
        application/json:
          schema:
            type: object
            properties:
              records:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    recordedAt:
                      type: string
                      format: date-time
                    userId:
                      type: string
                      format: uuid
                      nullable: true
                    userEmail:
                      type: string
                      nullable: true
                    resourceId:
                      type: string
                      nullable: true
                    resourceName:
                      type: string
                      nullable: true
                    value:
                      type: string
                      nullable: true
                    action:
                      type: string
                      enum:
                        - UNKNOWN
                        - ADD_WORKSPACE_MEMBER
                        - REMOVE_WORKSPACE_MEMBER
                        - UPDATE_WORKSPACE_MEMBER
                        - CLOSE_WORKSPACE
                        - CREATE_BOT
                        - CREATE_WORKSPACE
                        - DELETE_BOT
                        - DEPLOY_BOT
                        - TRANSFER_BOT
                        - DOWNLOAD_BOT_ARCHIVE
                        - UPDATE_BOT
                        - UPDATE_BOT_CHANNEL
                        - UPDATE_BOT_CONFIG
                        - UPDATE_PAYMENT_METHOD
                        - UPDATE_WORKSPACE
                        - SET_SPENDING_LIMIT
                        - SET_AI_SPENDING_LIMIT
                        - UPDATE_WORKSPACE_BILLING_READONLY
                        - EXECUTE_AUTO_RECHARGE_SUCCESS
                        - EXECUTE_AUTO_RECHARGE_FAILED
                  required:
                    - id
                    - recordedAt
                    - userId
                    - resourceId
                    - action
              meta:
                type: object
                properties:
                  nextToken:
                    type: string
                    description: >-
                      The token to use to retrieve the next page of results,
                      passed as a query string parameter (value should be
                      URL-encoded) to this API endpoint.
                additionalProperties: false
            required:
              - records
              - meta
            title: getAuditRecordsResponse
            additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````