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

# The grant/revoke audit trail for a (partner, crew) pair



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/internal/crew/{crew_id}/partner-consents/{partner_id}/audit
openapi: 3.1.0
info:
  title: crewpass-api-v2
  description: >-
    CrewPass V2 Partner API — a scope-gated, consent-intersected, multi-tenant
    front door onto existing CrewPass crew/vessel/compliance data.
  version: 0.1.0
servers: []
security: []
paths:
  /api/v2/internal/crew/{crew_id}/partner-consents/{partner_id}/audit:
    get:
      tags:
        - consent
      summary: The grant/revoke audit trail for a (partner, crew) pair
      operationId: >-
        audit_api_v2_internal_crew__crew_id__partner_consents__partner_id__audit_get
      parameters:
        - name: crew_id
          in: path
          required: true
          schema:
            type: string
            title: Crew Id
        - name: partner_id
          in: path
          required: true
          schema:
            type: string
            title: Partner Id
        - name: X-Internal-Auth
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Internal-Auth
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsentAuditResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ConsentAuditResponse:
      properties:
        partner_id:
          type: string
          title: Partner Id
        crew_id:
          type: string
          title: Crew Id
        events:
          items:
            $ref: '#/components/schemas/ConsentAuditItem'
          type: array
          title: Events
      type: object
      required:
        - partner_id
        - crew_id
        - events
      title: ConsentAuditResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConsentAuditItem:
      properties:
        action:
          type: string
          title: Action
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        actor:
          type: string
          title: Actor
        ts:
          type: string
          format: date-time
          title: Ts
      type: object
      required:
        - action
        - scopes
        - actor
        - ts
      title: ConsentAuditItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````