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

# Get entity history

> Returns all audit events for a specific entity in chronological order.



## OpenAPI

````yaml /api/openapi.json get /v1/audit-log/entity/{type}/{id}
openapi: 3.1.0
info:
  title: MeshQu API
  description: >-
    Governance infrastructure for policy-aware AI decisions. MeshQu does not run
    tools. It governs decisions about them.
  version: 1.9.0
  contact:
    name: MeshQu Support
    email: support@meshqu.com
  license:
    name: Proprietary
servers:
  - url: https://api.meshqu.com
    description: Deployed environment
security:
  - apiKey: []
    tenantId: []
tags:
  - name: Operations
    description: Health, readiness, metrics, and signing keys
  - name: Policies
    description: Policy management
  - name: Policy Groups
    description: Policy group management
  - name: Decisions
    description: Policy evaluation and recording
  - name: Chains
    description: Decision chain verification and sealing
  - name: Receipts
    description: Public receipt and bundle retrieval
  - name: Forms
    description: Attestation forms and public submission
  - name: Alerts
    description: Alert management and webhooks
  - name: Audit
    description: Audit log retrieval and verification
  - name: API Keys
    description: API key administration
  - name: Admin
    description: Tenant and platform administration
  - name: Dashboard
    description: Console dashboard data
  - name: Metrics
    description: Decision and overview metrics
  - name: Fields
    description: Field catalogue
  - name: Settings
    description: Tenant settings
  - name: Rule Creation Logs
    description: Rule authoring telemetry
paths:
  /v1/audit-log/entity/{type}/{id}:
    get:
      tags:
        - Audit
      summary: Get entity history
      description: Returns all audit events for a specific entity in chronological order.
      operationId: getV1AuditLogEntityByTypeById
      parameters:
        - schema:
            minLength: 1
            type: string
          in: path
          name: type
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: id
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    tenant_id:
                      format: uuid
                      type: string
                    action:
                      anyOf:
                        - type: string
                          enum:
                            - policy_created
                        - type: string
                          enum:
                            - policy_updated
                        - type: string
                          enum:
                            - policy_version_created
                        - type: string
                          enum:
                            - policy_deactivated
                        - type: string
                          enum:
                            - policy_ratified
                        - type: string
                          enum:
                            - policy_version_submitted
                        - type: string
                          enum:
                            - policy_version_rejected
                        - type: string
                          enum:
                            - policy_version_recalled
                        - type: string
                          enum:
                            - policy_group_created
                        - type: string
                          enum:
                            - policy_group_updated
                        - type: string
                          enum:
                            - policy_group_deactivated
                        - type: string
                          enum:
                            - decision_evaluated
                        - type: string
                          enum:
                            - decision_recorded
                        - type: string
                          enum:
                            - decision_replayed
                        - type: string
                          enum:
                            - decision_outcome_recorded
                        - type: string
                          enum:
                            - alert_created
                        - type: string
                          enum:
                            - alert_acknowledged
                        - type: string
                          enum:
                            - alerts_generated
                        - type: string
                          enum:
                            - subscription_created
                        - type: string
                          enum:
                            - subscription_deleted
                        - type: string
                          enum:
                            - webhook_delivered
                        - type: string
                          enum:
                            - webhook_failed
                        - type: string
                          enum:
                            - webhook_dead_lettered
                        - type: string
                          enum:
                            - webhook_retried
                        - type: string
                          enum:
                            - api_key_created
                        - type: string
                          enum:
                            - api_key_revoked
                        - type: string
                          enum:
                            - tenant_member_invited
                        - type: string
                          enum:
                            - tenant_member_role_changed
                        - type: string
                          enum:
                            - tenant_member_removed
                        - type: string
                          enum:
                            - tenant_provisioned
                        - type: string
                          enum:
                            - tenant_deactivated
                        - type: string
                          enum:
                            - chain_verified
                        - type: string
                          enum:
                            - chain_sealed
                        - type: string
                          enum:
                            - tenant_preferences_updated
                        - type: string
                          enum:
                            - regulation_activated
                        - type: string
                          enum:
                            - regulation_deactivated
                    entity_type:
                      type: string
                    entity_id:
                      type: string
                    actor_id:
                      type: string
                    changes:
                      type: object
                      additionalProperties:
                        type: object
                        properties:
                          old: {}
                          new: {}
                        required:
                          - old
                          - new
                    data:
                      type: object
                      additionalProperties: {}
                    integrity_hash:
                      type: string
                    previous_hash:
                      anyOf:
                        - type: string
                        - type: 'null'
                    created_at:
                      format: date-time
                      type: string
                  required:
                    - id
                    - tenant_id
                    - action
                    - entity_type
                    - integrity_hash
                    - previous_hash
                    - created_at
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        description: Error code
                        type: string
                      message:
                        description: Human-readable message
                        type: string
                      details:
                        description: Additional error details
                    required:
                      - code
                      - message
                  correlation_id:
                    description: Request correlation ID
                    type: string
                required:
                  - error
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: mqu_<token>
      description: >-
        MeshQu API key passed as a bearer token: `Authorization: Bearer mqu_…`.
        Mint one in the console (Settings → API keys).
    tenantId:
      type: apiKey
      name: X-MeshQu-Tenant-Id
      in: header
      description: >-
        Tenant UUID for multi-tenant isolation. Required on all authenticated
        routes — validated before authentication (middleware/tenant.ts), so a
        missing or non-UUID header returns 400 (MISSING_TENANT_ID /
        INVALID_TENANT_ID) before the API key is checked.

````