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

# List organisation audit events

> Returns a paginated, newest-first list of audit events for the organisation. Use `cursor` (the `next_cursor` from a previous response) to page through results.



## OpenAPI

````yaml /api-reference/sis-openapi.json get /v0/organisation/{org_id}/events
openapi: 3.1.0
info:
  title: SIS API
  description: Sumvin Integration Services — third-party API for external consumers.
  version: 0.35.2
servers:
  - url: https://sis.sumvin.com
security: []
tags:
  - name: Users
    description: >

      Third-party user lookup via SRI (Sumvin Resource ID). Tiered data access
      controlled by API key scopes.


      ## Capabilities


      - **SRI-Based Lookup** - Resolve any SRI to its associated user record

      - **Tiered Data Access** - Response fields scale with granted scopes

      - **Account Status** - Current lifecycle state of the user


      ## Authentication


      All endpoints require an API key issued by Sumvin, passed as a Bearer
      token:


      ```

      Authorization: Bearer <api-key>

      ```


      Keys are scoped per-organisation via SIS policies. The granted scopes
      determine which

      data tier is returned for each request.


      ## Data Tiers


      | Tier | Required Scope | Fields |

      |------|---------------|--------|

      | **Thin** | `lookup` | `id`, `username`, `primary_eoa_address`, `sri`,
      `account_status`, `auth_provider`, `created_at`, `updated_at`,
      `kyc_verified_at` |

      | **Partner** | `get_details` | Thin + `email`, `phone`, `first_name`,
      `last_names`, `country_of_residence` |

      | **Full** | `get_kyc` | Partner + `sumsub_applicant_id`,
      `sumsub_global_id` |


      Higher scopes include all fields from lower tiers. A key with `get_kyc`
      automatically

      includes `get_details` and `lookup` data.


      ## SIS Action Scopes


      | Scope | Description |

      |-------|-------------|

      | `lookup` | Base tier — resolve SRI to user identity and account status |

      | `get_details` | Partner tier — includes PII (name, email, phone, wallet
      addresses) |

      | `get_kyc` | Full tier — includes KYC provider identifiers for
      verification cross-reference |


      ## SRI Format


      ```

      sr:<jurisdiction>:<resource_type>:<wallet_type>:<address>

      ```


      Example: `sr:us:person:safe:0xE23c9A70BC749EBddd8c78a864fd911D04E9e992`


      ## Related Resources


      - [KYC](#tag/KYC) - Verification details and document images

      - [Organisations](#tag/Organisations) - Self-service organisation
      management
  - name: KYC
    description: >

      Read-only access to KYC verification details and document images for
      third-party consumers.


      ## Capabilities


      - **Verification Status** - Current KYC state, timestamps, and personal
      info

      - **Document Metadata** - Submitted document types and review results

      - **Document Streaming** - Binary image streams of identity documents

      - **Rejection Details** - Structured rejection reasons when verification
      fails


      ## Authentication


      KYC endpoints require **dual authentication** — both an API key and a PINT
      token

      must be present on every request:


      | Header | Value | Purpose |

      |--------|-------|---------|

      | `Authorization` | `Bearer <api-key>` | Identifies the calling
      organisation (requires `get_kyc` scope) |

      | `x-sumvin-pint-token` | `<jwt>` | Proves user-level consent (requires
      `sigil:kyc_read` scope) |


      Both headers are mandatory. A missing or invalid value on either results
      in a 401 or 403.


      ## Auth Flow


      ```

      ┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐

      │  3P Consumer     │────►│  API Key check  │────►│ PINT Token check│

      │  sends request   │     │  (get_kyc scope)│     │ (kyc_read scope)│

      └─────────────────┘     └─────────────────┘     └────────┬────────┘
                                                               │
                                                          ┌────┴────┐
                                                          ▼         ▼
                                                    ┌──────────┐ ┌──────────┐
                                                    │ 200: KYC │ │ 401/403  │
                                                    │   data   │ │  denied  │
                                                    └──────────┘ └──────────┘
      ```


      ## Endpoints


      | Method | Path | Description |

      |--------|------|-------------|

      | `GET` | `/v0/users/{user_id}/kyc` | KYC verification details (status,
      personal info, documents, rejection) |

      | `GET` | `/v0/users/{user_id}/kyc/document/{document_id}` | Stream
      document image as binary (returns image media type) |


      ## PINT Token


      A PINT (Purchase Intent) token is a JWT carrying a user's explicit consent
      for a named

      third party to read their data. Obtain one by exchanging a user-signed
      purchase intent:


      ```

      POST /v0/sis/token/pint

      ```


      Present the returned JWT in the `x-sumvin-pint-token` header alongside
      your API key.


      ### How the token is verified


      Every request is verified in full. Any check that fails refuses the
      request — there is

      no partial or best-effort path, and no request is served on an unverified
      token.


      1. **Signature** — verified against Sumvin's published signing keys at
         `/v0/sis/.well-known/jwks.json`. A token that has been altered, or signed by anyone
         other than Sumvin, is refused.
      2. **Issuer and expiry** — the token must have been issued by Sumvin and
      must not have
         expired.
      3. **Audience** — the token must have been issued *for your organisation*.
      A token
         issued to another consumer will not work with your API key, so a token that leaks
         cannot be replayed by a different party.
      4. **Consent still live** — the user's consent is re-checked on every
      request. If the
         user revokes it, the very next request is refused; there is no cache window.
      5. **Scope** — the token must carry `sigil:kyc_read`.

      6. **Subject** — the token must have been issued for the same user named
      in the
         request path.

      ## Error Codes


      | Code | Description |

      |------|-------------|

      | `PINT-401-003` | Missing PINT token — `x-sumvin-pint-token` header not
      provided |

      | `PINT-401-004` | Invalid PINT token — failed signature, issuer,
      audience, or expiry verification, or the consent behind it is unknown or
      expired |

      | `PINT-401-006` | Revoked consent — the user has withdrawn the consent
      this token represents |

      | `PINT-403-003` | Insufficient PINT scope — token missing
      `sigil:kyc_read` |

      | `PINT-403-004` | Subject mismatch — the token was issued for a different
      user than the one in the request path |

      | `SRI-404-001` | No user found for the supplied SRI |

      | `KYC-404-001` | No KYC record found — user has no Sumsub applicant |

      | `KYC-502-001` | Upstream provider error — failed to fetch from Sumsub |


      ## KYC Statuses


      | Status | Description |

      |--------|-------------|

      | `pending` | KYC not yet started |

      | `in_progress` | Documents submitted, awaiting review |

      | `retry` | Additional documents or corrections needed — user CAN resubmit
      |

      | `approved` | Identity verified successfully |

      | `rejected` | Verification failed permanently — user CANNOT retry |


      ## Related Resources


      - [Users](#tag/Users) - SRI-based user lookup and tiered data access

      - Token Exchange — `POST /v0/sis/token/pint` (obtain PINT tokens)

      - Scopes Reference — SIS action scopes and PINT scope definitions
  - name: Organisation
    description: >

      Self-service organisation management for 3P integrators.


      ## Authentication


      All organisation endpoints require a Clerk JWT (separate deployment for
      SIS dashboard).


      | Endpoint | Auth | Description |

      |----------|------|-------------|

      | `POST /v0/organisation` | Clerk JWT only | Bootstrap — creates org +
      Unkey identity + founding member |

      | `GET /v0/organisation/{org_id}` | Clerk JWT + member lookup | Scoped to
      caller's org |

      | `PATCH /v0/organisation/{org_id}` | Clerk JWT + member lookup | Update
      org name/email |


      ## Related Resources


      - [Members](#tag/Members) - Manage organisation team members

      - [API Keys](#tag/API-Keys) - Manage API keys via Unkey

      - [Environments](#tag/Environments) - Manage organisation environments
  - name: Environments
    description: >

      Environment management for organisations. Environments represent isolated
      deployment contexts (e.g. staging, production) with independent auth
      configurations.


      ## Endpoints


      | Method | Path | Description |

      |--------|------|-------------|

      | `POST` | `/v0/organisation/{org_id}/environments` | Create environment |

      | `GET` | `/v0/organisation/{org_id}/environments` | List environments |

      | `GET` | `/v0/organisation/{org_id}/environments/{env_id}` | Get
      environment details |

      | `PATCH` | `/v0/organisation/{org_id}/environments/{env_id}` | Update
      environment |

      | `DELETE` | `/v0/organisation/{org_id}/environments/{env_id}` | Soft
      delete environment |


      ## Related Resources


      - [Organisation](#tag/Organisation) - Organisation management

      - [Auth Config](#tag/Auth-Config) - Per-environment auth provider
      configuration
  - name: Auth Config
    description: >

      Per-environment authentication provider configuration. Configure Dynamic
      or Privy credentials for each environment.


      ## Endpoints


      | Method | Path | Description |

      |--------|------|-------------|

      | `PUT` | `/v0/organisation/{org_id}/environments/{env_id}/auth` | Set
      auth config (upsert) |

      | `GET` | `/v0/organisation/{org_id}/environments/{env_id}/auth` | Get
      auth config (masked credentials) |

      | `DELETE` | `/v0/organisation/{org_id}/environments/{env_id}/auth` |
      Delete auth config |


      ## Related Resources


      - [Environments](#tag/Environments) - Environment management

      - [Organisation](#tag/Organisation) - Organisation management
  - name: Dashboard
    description: >

      Endpoints used by the SIS Dashboard UI. This is a grouping tag — see
      individual resource tags for detailed documentation.
  - name: Members
    description: >

      Organisation member management. All endpoints are scoped to the caller's
      organisation.


      ## Endpoints


      | Method | Path | Description |

      |--------|------|-------------|

      | `POST` | `/v0/organisation/{org_id}/members` | Add member (idempotent by
      email) |

      | `GET` | `/v0/organisation/{org_id}/members` | List active members |

      | `PATCH` | `/v0/organisation/{org_id}/members/{member_id}` | Update
      name/status |

      | `DELETE` | `/v0/organisation/{org_id}/members/{member_id}` | Soft delete
      |


      ## Related Resources


      - [Organisations](#tag/Organisations) - Organisation management

      - [API Keys](#tag/API-Keys) - API key lifecycle
  - name: API Keys
    description: >

      API key lifecycle management via Unkey. Keys are scoped to the caller's
      organisation.


      ## Endpoints


      | Method | Path | Description |

      |--------|------|-------------|

      | `POST` | `/v0/organisation/{org_id}/keys` | Create key (plaintext
      returned once) |

      | `GET` | `/v0/organisation/{org_id}/keys` | List keys |

      | `GET` | `/v0/organisation/{org_id}/keys/{key_id}` | Key details |

      | `DELETE` | `/v0/organisation/{org_id}/keys/{key_id}` | Revoke key (204)
      |


      ## Key Creation


      The plaintext key is returned **only** on creation. Store it securely — it
      cannot be retrieved again.


      ## Related Resources


      - [Organisations](#tag/Organisations) - Organisation management

      - [Members](#tag/Members) - Team member management
  - name: PINT
    description: >

      Purchase Intent (PINT) resource management. Verify PINT validity, check
      revocation status, and manage PINT lifecycle.


      ## Capabilities


      - **Status Check** - Lightweight revocation/expiry check for PINT tokens

      - **Revocation** - Revoke active PINTs (coming soon)


      ## Authentication


      All endpoints require an API key issued by Sumvin, passed as a Bearer
      token:


      ```

      Authorization: Bearer <api-key>

      ```


      No specific scope is required — any authenticated 3P organisation can
      check PINT status.


      ## Endpoints


      | Method | Path | Description |

      |--------|------|-------------|

      | `GET` | `/v0/sis/pint/{pint_id}/status` | Check whether a PINT is still
      valid |


      ## Related Resources


      - [Token Exchange](#tag/Token-Exchange) - Exchange signed PINTs for JWTs

      - [KYC](#tag/KYC) - Verification details gated by PINT tokens
paths:
  /v0/organisation/{org_id}/events:
    get:
      tags:
        - Audit Events
        - Dashboard
      summary: List organisation audit events
      description: >-
        Returns a paginated, newest-first list of audit events for the
        organisation. Use `cursor` (the `next_cursor` from a previous response)
        to page through results.
      operationId: list_audit_events_v0_organisation__org_id__events_get
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            title: Org Id
        - name: event_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by event type (e.g. key_created)
            title: Event Type
          description: Filter by event type (e.g. key_created)
        - name: resource_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by resource type (e.g. environment)
            title: Resource Type
          description: Filter by resource type (e.g. environment)
        - name: actor_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'Filter by actor type: member or api_key'
            title: Actor Type
          description: 'Filter by actor type: member or api_key'
        - name: period_start
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Earliest event time (ms since epoch, inclusive)
            title: Period Start
          description: Earliest event time (ms since epoch, inclusive)
        - name: period_end
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Latest event time (ms since epoch, inclusive)
            title: Period End
          description: Latest event time (ms since epoch, inclusive)
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'Pagination cursor: the `next_cursor` from the previous page'
            title: Cursor
          description: 'Pagination cursor: the `next_cursor` from the previous page'
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            description: Events per page (1-200, default 50)
            default: 50
            title: Limit
          description: Events per page (1-200, default 50)
        - name: expand
          in: query
          required: false
          schema:
            type: array
            items:
              enum:
                - actor
                - resource
              type: string
            description: >-
              Expand related entities inline on each event. Pass 'actor' to
              receive the member or API key that emitted the event as a typed
              object under `actor`. Pass 'resource' to receive the entity the
              event acted upon as a typed object under `resource`. Repeatable.
              When omitted, `actor` and `resource` are null on every event.
            default: []
            title: Expand
          description: >-
            Expand related entities inline on each event. Pass 'actor' to
            receive the member or API key that emitted the event as a typed
            object under `actor`. Pass 'resource' to receive the entity the
            event acted upon as a typed object under `resource`. Repeatable.
            When omitted, `actor` and `resource` are null on every event.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditEventListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AuditEventListResponse:
      properties:
        _links:
          $ref: '#/components/schemas/AuditEventsLinks'
        events:
          items:
            oneOf:
              - $ref: '#/components/schemas/OrgCreatedEvent'
              - $ref: '#/components/schemas/OrgUpdatedEvent'
              - $ref: '#/components/schemas/MemberInvitedEvent'
              - $ref: '#/components/schemas/MemberUpdatedEvent'
              - $ref: '#/components/schemas/MemberRemovedEvent'
              - $ref: '#/components/schemas/KeyCreatedEvent'
              - $ref: '#/components/schemas/KeyRevokedEvent'
              - $ref: '#/components/schemas/EnvCreatedEvent'
              - $ref: '#/components/schemas/EnvUpdatedEvent'
              - $ref: '#/components/schemas/EnvDeletedEvent'
              - $ref: '#/components/schemas/AuthConfigCreatedEvent'
              - $ref: '#/components/schemas/AuthConfigUpdatedEvent'
              - $ref: '#/components/schemas/AuthConfigDeletedEvent'
              - $ref: '#/components/schemas/UnknownAuditEvent'
          type: array
          title: Events
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - _links
        - events
        - has_more
      title: AuditEventListResponse
    ProblemDetail:
      properties:
        type:
          type: string
          title: Type
          description: >-
            URI reference identifying the problem type. Format:
            https://api.sumvin.com/errors/{error_code}
        title:
          type: string
          title: Title
          description: >-
            Short, human-readable summary of the problem type. Does not change
            between occurrences.
        status:
          type: integer
          title: Status
          description: HTTP status code for this error response.
        detail:
          type: string
          title: Detail
          description: >-
            Human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          title: Instance
          description: >-
            URI reference identifying the specific occurrence (typically the
            request path).
        error_code:
          $ref: '#/components/schemas/APIErrorCode'
          description: >-
            Machine-readable error code for programmatic handling. Format:
            {DOMAIN}-{STATUS}-{SEQUENCE}
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Trace Id
          description: >-
            Correlation ID for tracing this request. Include when contacting
            support.
      type: object
      required:
        - type
        - title
        - status
        - detail
        - instance
        - error_code
      title: ProblemDetail
      description: >-
        RFC 7807 Problem Details response for API errors.


        All error responses follow this standard format, enabling consistent
        error handling

        across different clients. The `error_code` field provides a
        machine-readable identifier

        for programmatic error handling, while `detail` provides human-readable
        context.


        Error codes follow the pattern `{DOMAIN}-{HTTP_STATUS}-{SEQUENCE}`.
        Domain prefixes

        in use today: ACC (account), AGT (agent token), ALC (Alchemy webhook),
        AST (asset),

        BNK (bank), BUD (budget), CALLER (request credentials), CHA (chat
        attachment), CHT

        (chat session), CLI (command-line

        sign-in & personal access tokens), CON

        (connector), CRD (card), DMO (built-in card), DYN (Dynamic credential),
        FAC

        (facilitator), GATE (feature

        gate), GEN (general validation), HEALTH (health check), IDT (identity
        token), INS

        (insight), IPA (intelligent purchase authorization), KYC
        (KYC/verification), MLD

        (MELD), MRC (merchant search), OBK (open banking), ONB (onboarding), ORG

        (organisation), PAY (payment

        link), PFP (profile

        picture), PHONE (phone verification), PINT (payment intent token), PRV
        (provider),

        RCT (receipt), RMP (ramp), RPC (RPC usage), RUL (rule), RUN (strategy

        run), SAF (Safe smart contract), SGN (signer setup), SIS (Sumvin
        Integration

        Services), SIW (Sign-In With Ethereum), SRI (Sumvin Resource
        Identifier), STR

        (strategy), STS (user status), SYS (system), TAP (Trusted Agent
        Protocol), TOL

        (tool), TXN (transaction), UCO

        (user connector), USR (user), UST (user strategy), VIC (Visa checkout),
        WAL

        (wallet), WID (widget).


        See the Error Reference section for a complete list of error codes and
        recovery actions.
      example:
        detail: No wallet found with ID 12345 for this user.
        error_code: WAL-404-001
        instance: /v0/wallets/12345
        status: 404
        title: Wallet Not Found
        trace_id: abc123-def456-ghi789
        type: https://api.sumvin.com/errors/wal-404-001
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AuditEventsLinks:
      properties:
        self:
          $ref: '#/components/schemas/Link'
          description: URL to the current resource.
        organisation:
          $ref: '#/components/schemas/Link'
      additionalProperties: true
      type: object
      required:
        - self
        - organisation
      title: AuditEventsLinks
    OrgCreatedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: org_created
          title: Event Type
        metadata:
          anyOf:
            - $ref: '#/components/schemas/OrgCreatedMeta'
            - type: 'null'
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: OrgCreatedEvent
    OrgUpdatedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: org_updated
          title: Event Type
        metadata:
          anyOf:
            - $ref: '#/components/schemas/OrgUpdatedMeta'
            - type: 'null'
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: OrgUpdatedEvent
    MemberInvitedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: member_invited
          title: Event Type
        metadata:
          anyOf:
            - $ref: '#/components/schemas/MemberInvitedMeta'
            - type: 'null'
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: MemberInvitedEvent
    MemberUpdatedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: member_updated
          title: Event Type
        metadata:
          anyOf:
            - $ref: '#/components/schemas/MemberUpdatedMeta'
            - type: 'null'
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: MemberUpdatedEvent
    MemberRemovedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: member_removed
          title: Event Type
        metadata:
          anyOf:
            - $ref: '#/components/schemas/MemberRemovedMeta'
            - type: 'null'
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: MemberRemovedEvent
    KeyCreatedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: key_created
          title: Event Type
        metadata:
          anyOf:
            - $ref: '#/components/schemas/KeyCreatedMeta'
            - type: 'null'
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: KeyCreatedEvent
    KeyRevokedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: key_revoked
          title: Event Type
        metadata:
          type: 'null'
          title: Metadata
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: KeyRevokedEvent
    EnvCreatedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: env_created
          title: Event Type
        metadata:
          anyOf:
            - $ref: '#/components/schemas/EnvCreatedMeta'
            - type: 'null'
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: EnvCreatedEvent
    EnvUpdatedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: env_updated
          title: Event Type
        metadata:
          anyOf:
            - $ref: '#/components/schemas/EnvUpdatedMeta'
            - type: 'null'
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: EnvUpdatedEvent
    EnvDeletedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: env_deleted
          title: Event Type
        metadata:
          type: 'null'
          title: Metadata
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: EnvDeletedEvent
    AuthConfigCreatedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: auth_config_created
          title: Event Type
        metadata:
          anyOf:
            - $ref: '#/components/schemas/AuthConfigChangedMeta'
            - type: 'null'
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: AuthConfigCreatedEvent
    AuthConfigUpdatedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: auth_config_updated
          title: Event Type
        metadata:
          anyOf:
            - $ref: '#/components/schemas/AuthConfigChangedMeta'
            - type: 'null'
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: AuthConfigUpdatedEvent
    AuthConfigDeletedEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          type: string
          const: auth_config_deleted
          title: Event Type
        metadata:
          type: 'null'
          title: Metadata
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: AuthConfigDeletedEvent
    UnknownAuditEvent:
      properties:
        id:
          type: string
          title: Id
        actor_type:
          type: string
          title: Actor Type
        actor_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Key Id
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        actor:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ActorMemberStub'
                - $ref: '#/components/schemas/ActorAPIKeyStub'
              discriminator:
                propertyName: type
                mapping:
                  api_key:
                    $ref: '#/components/schemas/ActorAPIKeyStub'
                  member:
                    $ref: '#/components/schemas/ActorMemberStub'
            - type: 'null'
          title: Actor
        resource:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResourceOrganisationStub'
                - $ref: '#/components/schemas/ResourceMemberStub'
                - $ref: '#/components/schemas/ResourceEnvironmentStub'
                - $ref: '#/components/schemas/ResourceKeyStub'
                - $ref: '#/components/schemas/ResourceAuthConfigStub'
              discriminator:
                propertyName: type
                mapping:
                  auth_config:
                    $ref: '#/components/schemas/ResourceAuthConfigStub'
                  environment:
                    $ref: '#/components/schemas/ResourceEnvironmentStub'
                  key:
                    $ref: '#/components/schemas/ResourceKeyStub'
                  member:
                    $ref: '#/components/schemas/ResourceMemberStub'
                  organisation:
                    $ref: '#/components/schemas/ResourceOrganisationStub'
            - type: 'null'
          title: Resource
        created_at:
          type: integer
          title: Created At
        event_type:
          not:
            enum:
              - auth_config_created
              - auth_config_deleted
              - auth_config_updated
              - env_created
              - env_deleted
              - env_updated
              - key_created
              - key_revoked
              - member_invited
              - member_removed
              - member_updated
              - org_created
              - org_updated
          type: string
          title: Event Type
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - id
        - actor_type
        - resource_type
        - created_at
        - event_type
      title: UnknownAuditEvent
      description: |-
        Audit event whose `event_type` is not recognised by this version of
        the API. The envelope fields are populated as usual; `metadata` is
        returned as a free-form object so newly introduced event types can be
        received without requiring a client update.
    APIErrorCode:
      type: string
      enum:
        - USR-208-001
        - USR-404-001
        - USR-401-001
        - USR-401-002
        - USR-400-001
        - USR-424-001
        - USR-409-002
        - USR-400-002
        - USR-404-002
        - USR-429-001
        - PFP-400-001
        - PFP-400-002
        - PFP-500-001
        - PFP-500-002
        - PFP-404-001
        - PFP-429-001
        - WAL-404-001
        - WAL-409-001
        - WAL-403-001
        - WAL-403-002
        - WAL-400-001
        - WAL-400-002
        - WAL-403-003
        - WAL-403-004
        - WAL-400-003
        - WAL-400-004
        - WAL-400-005
        - WAL-400-006
        - WAL-400-007
        - WAL-409-002
        - WAL-403-005
        - WAL-403-006
        - KYC-400-001
        - KYC-400-002
        - KYC-500-001
        - KYC-403-001
        - KYC-403-002
        - KYC-401-001
        - KYC-500-002
        - KYC-502-001
        - KYC-404-001
        - KYC-500-003
        - KYC-500-004
        - KYC-409-001
        - KYC-502-002
        - KYC-401-002
        - KYC-502-003
        - KYC-400-003
        - KYC-409-002
        - KYC-501-001
        - KYC-502-004
        - KYC-400-004
        - KYC-409-003
        - KYC-409-004
        - KYC-400-005
        - KYC-404-002
        - KYC-409-005
        - KYC-409-006
        - KYC-403-003
        - KYC-410-001
        - KYC-429-001
        - KYC-503-001
        - KYC-422-001
        - SAF-202-001
        - SAF-500-001
        - SAF-502-001
        - SAF-400-001
        - SAF-400-002
        - SAF-404-001
        - SAF-424-001
        - SAF-403-001
        - SAF-400-003
        - SAF-429-001
        - SAF-404-002
        - SAF-404-003
        - SAF-424-002
        - SAF-424-003
        - SAF-424-004
        - IDT-424-001
        - SAF-400-004
        - SAF-400-005
        - SAF-502-002
        - SAF-502-003
        - SAF-502-004
        - SAF-502-005
        - SAF-409-001
        - SAF-503-005
        - SAF-400-006
        - SAF-400-007
        - SAF-400-008
        - SAF-502-006
        - SAF-400-009
        - SAF-400-010
        - SAF-400-011
        - SAF-400-012
        - SAF-400-013
        - SAF-400-014
        - SAF-400-015
        - SAF-409-002
        - SAF-502-007
        - SAF-400-016
        - SAF-503-001
        - SAF-503-002
        - SAF-503-003
        - SAF-503-004
        - SGN-404-001
        - SGN-404-002
        - SGN-422-001
        - SGN-500-001
        - SGN-500-002
        - SGN-502-001
        - SGN-502-002
        - SGN-502-003
        - SGN-502-004
        - SGN-409-001
        - SGN-429-001
        - SGN-403-001
        - SGN-403-002
        - SGN-422-002
        - SGN-422-003
        - SGN-424-001
        - SGN-424-002
        - SGN-502-005
        - SGN-502-006
        - SGN-502-007
        - SGN-503-001
        - SGN-500-003
        - HEALTH-401-001
        - STS-400-001
        - STS-404-001
        - STS-403-001
        - STS-403-002
        - ONB-409-001
        - ONB-202-001
        - PHONE-409-001
        - PHONE-400-001
        - PHONE-422-002
        - PHONE-400-003
        - PHONE-429-001
        - PHONE-429-002
        - PHONE-409-002
        - PHONE-502-001
        - PHONE-403-001
        - STR-404-001
        - STR-409-001
        - STR-400-001
        - CON-404-001
        - CON-409-001
        - CON-401-001
        - CON-400-001
        - UST-404-001
        - UST-403-001
        - UST-400-001
        - UST-409-001
        - UST-503-001
        - UCO-404-001
        - UCO-403-001
        - TOL-404-001
        - RUL-404-001
        - RUL-403-001
        - RUL-400-001
        - RUN-404-001
        - RUN-403-001
        - RUN-409-001
        - RUN-400-001
        - RUN-400-002
        - RUN-404-002
        - RUN-409-002
        - RUN-409-003
        - RUN-208-001
        - RUN-400-003
        - RUN-408-001
        - ACC-404-001
        - ACC-409-001
        - ACC-403-001
        - ACC-400-001
        - ACC-400-002
        - ACC-502-001
        - ACC-403-002
        - OBK-401-001
        - OBK-400-001
        - OBK-502-001
        - TXN-404-001
        - TXN-403-001
        - TXN-500-001
        - TXN-400-001
        - TXN-400-002
        - TXN-409-001
        - TXN-409-002
        - TXN-409-003
        - TXN-422-001
        - RCT-400-001
        - RCT-400-002
        - RCT-500-001
        - RCT-404-001
        - RCT-500-002
        - RCT-500-003
        - RCT-429-001
        - INS-404-001
        - INS-403-001
        - INS-409-001
        - INS-400-001
        - INS-500-002
        - INS-500-003
        - INS-503-001
        - CRD-404-001
        - CRD-403-001
        - CRD-404-002
        - CRD-400-001
        - CRD-403-002
        - CRD-401-001
        - CRD-404-003
        - CRD-409-001
        - CRD-502-001
        - BUD-404-001
        - BUD-403-001
        - BUD-409-001
        - BUD-400-001
        - BUD-400-002
        - BUD-400-003
        - BUD-400-004
        - BUD-400-005
        - BUD-403-002
        - BUD-500-001
        - BUD-429-001
        - CHT-404-001
        - CHT-403-001
        - CHT-404-002
        - CHT-409-001
        - CHT-400-001
        - CHA-415-001
        - CHA-413-001
        - CHA-500-001
        - CHA-429-001
        - AGT-401-001
        - AGT-401-002
        - AGT-401-003
        - AGT-401-004
        - AGT-401-005
        - AGT-403-001
        - AGT-403-002
        - AGT-404-001
        - AGT-404-002
        - AGT-429-001
        - AST-404-001
        - AST-502-001
        - AST-400-001
        - BNK-500-001
        - BNK-400-001
        - BNK-404-001
        - BNK-403-001
        - BNK-409-001
        - BNK-400-002
        - BNK-202-001
        - BNK-400-003
        - BNK-400-004
        - BNK-502-001
        - BNK-410-001
        - BNK-403-002
        - BNK-400-005
        - BNK-400-006
        - BNK-404-002
        - BNK-403-003
        - BNK-422-001
        - WID-404-001
        - WID-403-001
        - WID-400-001
        - WID-400-002
        - GATE-403-001
        - GATE-429-001
        - GATE-503-001
        - SIS-401-001
        - SIS-401-002
        - SIS-404-001
        - SIS-403-001
        - SIS-403-002
        - SIS-403-003
        - SIS-404-002
        - SIS-403-004
        - SIS-403-005
        - SIS-403-006
        - SIS-409-001
        - SIS-409-002
        - SIS-404-003
        - SIS-502-001
        - SIS-502-002
        - SIS-502-003
        - SIS-401-003
        - SIS-409-003
        - SIS-502-004
        - SIS-502-005
        - SIS-409-004
        - SIS-409-005
        - SIS-400-001
        - ORG-401-001
        - ORG-503-001
        - SIS-404-004
        - SIS-409-006
        - SIS-422-002
        - SIS-404-005
        - SIS-422-003
        - SIS-404-006
        - SIS-404-007
        - SIS-422-004
        - SIS-409-008
        - SIS-404-008
        - SIS-409-007
        - SIS-422-005
        - SIS-422-006
        - SIS-422-007
        - SIS-502-006
        - PINT-400-001
        - PINT-400-002
        - PINT-400-003
        - PINT-400-004
        - PINT-400-005
        - PINT-400-006
        - PINT-400-007
        - PINT-401-001
        - PINT-401-002
        - PINT-401-005
        - PINT-401-007
        - PINT-401-008
        - PINT-401-009
        - PINT-403-001
        - PINT-403-002
        - PINT-404-001
        - PINT-409-001
        - PINT-409-002
        - PINT-409-003
        - PINT-409-004
        - PINT-409-005
        - PINT-410-001
        - PINT-410-002
        - PINT-424-001
        - PINT-424-002
        - PINT-424-003
        - PINT-424-004
        - PINT-424-005
        - PINT-424-006
        - PINT-424-007
        - PINT-424-008
        - PINT-429-001
        - PINT-401-003
        - PINT-401-004
        - PINT-401-006
        - PINT-403-003
        - PINT-403-004
        - PINT-403-005
        - PINT-403-006
        - PINT-403-007
        - PINT-403-008
        - PINT-403-009
        - PINT-409-006
        - PINT-422-001
        - PINT-422-002
        - PINT-422-003
        - PINT-422-004
        - PINT-422-005
        - PINT-422-006
        - PINT-500-001
        - PAY-404-001
        - PAY-403-001
        - PAY-409-001
        - PAY-409-002
        - PAY-409-003
        - PAY-410-001
        - PAY-422-001
        - PAY-422-002
        - PAY-400-003
        - PAY-400-004
        - PAY-400-005
        - PAY-400-006
        - PAY-422-003
        - PAY-501-001
        - PAY-502-001
        - PAY-504-001
        - FAC-400-001
        - FAC-400-002
        - FAC-400-003
        - FAC-400-004
        - FAC-400-005
        - FAC-409-001
        - FAC-422-001
        - FAC-422-002
        - FAC-422-003
        - FAC-502-001
        - FAC-502-002
        - FAC-503-001
        - SRI-400-001
        - SRI-400-002
        - SRI-404-001
        - SRI-400-003
        - SIW-401-001
        - SIW-401-002
        - SIW-401-003
        - SIW-401-004
        - SIW-401-005
        - SIW-401-006
        - SIW-400-001
        - SIW-400-002
        - SIW-502-001
        - SIW-429-001
        - SIW-429-002
        - SIW-404-001
        - SIW-404-002
        - SIW-401-007
        - SIW-401-008
        - SIW-401-009
        - SIW-401-010
        - IPA-404-001
        - IPA-400-001
        - IPA-400-002
        - IPA-409-001
        - IPA-403-001
        - IPA-403-002
        - IPA-401-001
        - IPA-401-002
        - IPA-401-003
        - IPA-401-004
        - IPA-409-002
        - IPA-409-003
        - IPA-422-001
        - IPA-424-001
        - IPA-409-004
        - IPA-409-005
        - IPA-422-002
        - IPA-424-002
        - IPA-409-006
        - ALC-401-001
        - ALC-400-001
        - MLD-401-001
        - MLD-502-001
        - RMP-400-001
        - RMP-400-002
        - RMP-400-003
        - RMP-400-004
        - RMP-403-001
        - RMP-403-002
        - RMP-404-001
        - RMP-502-001
        - ONB-400-001
        - ONB-400-002
        - ONB-400-003
        - ONB-400-004
        - ONB-409-003
        - ONB-409-002
        - PRV-404-001
        - MRC-404-001
        - MRC-400-001
        - MRC-401-001
        - MRC-403-001
        - MRC-503-001
        - RPC-400-001
        - RPC-404-002
        - RPC-402-001
        - RPC-404-001
        - RPC-400-002
        - RPC-502-001
        - RPC-409-001
        - RPC-409-002
        - RPC-409-003
        - RPC-401-001
        - RPC-403-001
        - CLI-400-001
        - CLI-401-001
        - CLI-401-002
        - CLI-401-003
        - CLI-401-004
        - CLI-403-001
        - CLI-404-001
        - CLI-409-001
        - CLI-410-001
        - CLI-503-001
        - CALLER-400-001
        - CALLER-403-001
        - CALLER-503-001
        - DMO-403-001
        - VIC-404-001
        - VIC-409-001
        - VIC-409-002
        - VIC-409-003
        - VIC-502-001
        - VIC-502-002
        - VIC-502-003
        - VIC-502-004
        - VIC-502-005
        - VIC-503-001
        - TAP-503-001
        - TAP-502-001
        - GEN-400-001
        - SYS-500-001
      title: APIErrorCode
    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
    Link:
      properties:
        href:
          type: string
          title: Href
          description: URL to the linked resource or action endpoint.
        method:
          type: string
          title: Method
          description: >-
            HTTP method to use when following this link. GET for navigation,
            POST/PUT/DELETE for actions.
          default: GET
        templated:
          type: boolean
          title: Templated
          description: >-
            If true, href contains URI template variables (e.g., {id}) that must
            be substituted.
          default: false
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Human-readable description of what this link does.
      type: object
      required:
        - href
      title: Link
      description: >-
        HAL-style hypermedia link for resource navigation and actions.


        Links enable clients to discover available actions and navigate related
        resources

        without hardcoding URLs. Action links include the HTTP method to use.
    ActorMemberStub:
      properties:
        type:
          type: string
          const: member
          title: Type
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        deleted_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Deleted At
      type: object
      required:
        - type
      title: ActorMemberStub
      description: |-
        Inline representation of a dashboard member who emitted an event.

        Returned only when the `actor` expand is requested. When the underlying
        member record is no longer available, only `id` is populated; when the
        member has been deleted, `deleted_at` carries the deletion timestamp.
    ActorAPIKeyStub:
      properties:
        type:
          type: string
          const: api_key
          title: Type
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
      type: object
      required:
        - type
      title: ActorAPIKeyStub
      description: |-
        Inline representation of the API key that emitted an event.

        Returned only when the `actor` expand is requested. The `id` matches
        the API key identifier already present on the event envelope.
    ResourceOrganisationStub:
      properties:
        type:
          type: string
          const: organisation
          title: Type
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        deleted_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Deleted At
      type: object
      required:
        - type
      title: ResourceOrganisationStub
      description: |-
        Inline representation of an organisation that an event acted upon.

        Returned only when the `resource` expand is requested. When the
        referenced organisation has been deleted, `deleted_at` carries the
        deletion timestamp.
    ResourceMemberStub:
      properties:
        type:
          type: string
          const: member
          title: Type
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        deleted_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Deleted At
      type: object
      required:
        - type
      title: ResourceMemberStub
      description: |-
        Inline representation of a dashboard member that an event acted upon.

        Returned only when the `resource` expand is requested. Describes the
        member that was the target of the event — distinct from the member
        that emitted the event, which is exposed under `actor`.
    ResourceEnvironmentStub:
      properties:
        type:
          type: string
          const: environment
          title: Type
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        deleted_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Deleted At
      type: object
      required:
        - type
      title: ResourceEnvironmentStub
      description: |-
        Inline representation of an environment that an event acted upon.

        Returned only when the `resource` expand is requested. The `label`
        field carries the optional human-readable description of the
        environment when one was set.
    ResourceKeyStub:
      properties:
        type:
          type: string
          const: key
          title: Type
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
      type: object
      required:
        - type
      title: ResourceKeyStub
      description: |-
        Inline representation of an API key that an event acted upon.

        Returned only when the `resource` expand is requested. The `id`
        matches the API key identifier already present on the event envelope;
        no further data is dereferenced.
    ResourceAuthConfigStub:
      properties:
        type:
          type: string
          const: auth_config
          title: Type
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
      type: object
      required:
        - type
      title: ResourceAuthConfigStub
      description: |-
        Inline representation of an authentication configuration that an
        event acted upon.

        Returned only when the `resource` expand is requested. The `id`
        matches the environment identifier the auth configuration belongs to.
    OrgCreatedMeta:
      properties:
        name:
          type: string
          title: Name
      additionalProperties: false
      type: object
      required:
        - name
      title: OrgCreatedMeta
      description: 'Metadata for `org_created` events: the new organisation''s name.'
    OrgUpdatedMeta:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        contact_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Email
      additionalProperties: false
      type: object
      title: OrgUpdatedMeta
      description: 'Metadata for `org_updated` events: the fields that changed.'
    MemberInvitedMeta:
      properties:
        email:
          type: string
          title: Email
        name:
          type: string
          title: Name
      additionalProperties: false
      type: object
      required:
        - email
        - name
      title: MemberInvitedMeta
      description: |-
        Metadata for `member_invited` events: the invited member's email and
        display name at invitation time.
    MemberUpdatedMeta:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        status:
          anyOf:
            - $ref: '#/components/schemas/SISMemberStatus'
            - type: 'null'
      additionalProperties: false
      type: object
      title: MemberUpdatedMeta
      description: |-
        Metadata for `member_updated` events: the fields that changed on the
        member record.
    MemberRemovedMeta:
      properties:
        email:
          type: string
          title: Email
      additionalProperties: false
      type: object
      required:
        - email
      title: MemberRemovedMeta
      description: 'Metadata for `member_removed` events: the removed member''s email.'
    KeyCreatedMeta:
      properties:
        name:
          type: string
          title: Name
        key_type:
          anyOf:
            - type: string
              enum:
                - standard
                - rpc
            - type: 'null'
          title: Key Type
      additionalProperties: false
      type: object
      required:
        - name
      title: KeyCreatedMeta
      description: |-
        Metadata for `key_created` events: the API key's display name and class.

        `key_type` is optional so legacy audit rows that predate the field still
        parse. New events always stamp it so forensics tooling can distinguish
        standard vs rpc keys without an Unkey round-trip.
    EnvCreatedMeta:
      properties:
        name:
          type: string
          title: Name
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
      additionalProperties: false
      type: object
      required:
        - name
      title: EnvCreatedMeta
      description: |-
        Metadata for `env_created` events: the new environment's identifier
        and optional human label.
    EnvUpdatedMeta:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
      additionalProperties: false
      type: object
      title: EnvUpdatedMeta
      description: |-
        Metadata for `env_updated` events: the fields that changed on the
        environment record.
    AuthConfigChangedMeta:
      properties:
        provider:
          $ref: '#/components/schemas/SISAuthProvider'
        privy_has_verification_key:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Privy Has Verification Key
        privy_has_app_secret:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Privy Has App Secret
      additionalProperties: false
      type: object
      required:
        - provider
      title: AuthConfigChangedMeta
      description: |-
        Metadata for auth-configuration create / update events: the active
        provider and presence flags for sensitive credentials (booleans only;
        secrets are never written to audit metadata).
    SISMemberStatus:
      type: string
      enum:
        - active
        - invited
        - deactivated
      title: SISMemberStatus
    SISAuthProvider:
      type: string
      enum:
        - dynamic
        - privy
      title: SISAuthProvider
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````