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

# List your organization's credential events

> Every issuance and revocation of your organization's credentials, newest first by default, a page at a time: `limit`, then `cursor` from `X-Next-Cursor`, or `offset`. `X-Total-Count` and `X-Total-Pages` count every match and are sent on the first cursor page and on every offset page.



## OpenAPI

````yaml /api-reference/openapi.json get /issuance/credentials/events
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /issuance/credentials/events:
    get:
      tags:
        - Credentials
      summary: List your organization's credential events
      description: >-
        Every issuance and revocation of your organization's credentials, newest
        first by default, a page at a time: `limit`, then `cursor` from
        `X-Next-Cursor`, or `offset`. `X-Total-Count` and `X-Total-Pages` count
        every match and are sent on the first cursor page and on every offset
        page.
      operationId: issuance_credentials_events_list
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: >-
              Maximum number of records to return in a single page. Must be
              between 1 and 1000.
            default: 10
            title: Limit
          description: >-
            Maximum number of records to return in a single page. Must be
            between 1 and 1000.
        - name: offset
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            description: >-
              Number of records to skip from the beginning. Use 0 for the first
              page. Cannot be used with cursor.
            title: Offset
          description: >-
            Number of records to skip from the beginning. Use 0 for the first
            page. Cannot be used with cursor.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Opaque pagination cursor token that identifies the position in the
              result set. Use the cursor from the previous response to get the
              next page. Cannot be used with offset.
            title: Cursor
          description: >-
            Opaque pagination cursor token that identifies the position in the
            result set. Use the cursor from the previous response to get the
            next page. Cannot be used with offset.
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/CredentialEventSortField'
              - type: 'null'
            description: >-
              `occurred_at`: when the credential was issued or revoked; ties
              break on the credential's `created_at`, then its id, then the
              event (`ISSUED` before `REVOKED` ascending). Defaults to
              `occurred_at` `desc`.
            title: Sort
          description: >-
            `occurred_at`: when the credential was issued or revoked; ties break
            on the credential's `created_at`, then its id, then the event
            (`ISSUED` before `REVOKED` ascending). Defaults to `occurred_at`
            `desc`.
        - name: sort_direction
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/SortMethod'
              - type: 'null'
            description: >-
              `asc` or `desc`, for every key of the sort. Defaults to the
              field's own: `occurred_at` `desc`.
            title: Sort Direction
          description: >-
            `asc` or `desc`, for every key of the sort. Defaults to the field's
            own: `occurred_at` `desc`.
        - name: level
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/CredentialMintLevel'
              - type: 'null'
            description: >-
              Only credentials of these levels; repeat for more than one.
              Default all.
            title: Level
          description: >-
            Only credentials of these levels; repeat for more than one. Default
            all.
        - name: state
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/IssuedCredentialLifecycleState'
              - type: 'null'
            description: Only events of credentials in this state now.
            title: State
          description: Only events of credentials in this state now.
        - name: individual_ref
          in: query
          required: false
          schema:
            anyOf:
              - maxLength: 255
                minLength: 1
                type: string
              - type: 'null'
            description: >-
              Only credentials minted for this individual or by them for a
              business.
            title: Individual Ref
          description: >-
            Only credentials minted for this individual or by them for a
            business.
        - name: business_ref
          in: query
          required: false
          schema:
            anyOf:
              - maxLength: 255
                minLength: 1
                type: string
              - type: 'null'
            description: Only credentials minted for this business.
            title: Business Ref
          description: Only credentials minted for this business.
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - maxLength: 255
                type: string
              - type: 'null'
            description: >-
              Every word must match the person's or business's name as the
              credential minted it, the audience or the credential id; a
              `individual_ref` or `business_ref` your organization holds matches
              exactly.
            title: Search
          description: >-
            Every word must match the person's or business's name as the
            credential minted it, the audience or the credential id; a
            `individual_ref` or `business_ref` your organization holds matches
            exactly.
        - name: event_type
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/CredentialEventKind'
              - type: 'null'
            description: Only these events; repeat for several.
            title: Event Type
          description: Only these events; repeat for several.
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: 'Filter records created on or after this date (format: YYYY-MM-DD).'
            title: Start Date
          description: 'Filter records created on or after this date (format: YYYY-MM-DD).'
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: >-
              Filter records created on or before this date (format:
              YYYY-MM-DD).
            title: End Date
          description: 'Filter records created on or before this date (format: YYYY-MM-DD).'
        - name: tz
          in: query
          required: false
          schema:
            type: string
            description: >-
              IANA timezone identifier used to interpret start_date and end_date
              (defaults to UTC).
            examples:
              - UTC
              - America/Los_Angeles
              - Europe/London
            default: UTC
            title: Tz
          description: >-
            IANA timezone identifier used to interpret start_date and end_date
            (defaults to UTC).
      responses:
        '200':
          description: Credential events in the requested order.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.CredentialEventResponse'
            application/vnd.baselayer.v1+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.CredentialEventResponse'
          headers:
            X-Total-Count:
              description: Total number of records matching the query.
              schema:
                type: integer
            X-Total-Pages:
              description: Total number of pages available based on the current limit.
              schema:
                type: integer
            X-Next-Cursor:
              description: >-
                Cursor for the next page (only present when using the keyset
                pagination and if `has_more` is true.
              schema:
                type: string
        '422':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                title: ValidationFailed
                description: The request is invalid.
                examples:
                  - type: validation_failed
                    code: 7112
                    message: The request is invalid.
                    metadata: {}
      security:
        - APIKeyHeader: []
components:
  schemas:
    CredentialEventSortField:
      type: string
      enum:
        - occurred_at
      title: CredentialEventSortField
      description: What a credential event list sorts by.
    SortMethod:
      type: string
      enum:
        - asc
        - desc
      title: SortMethod
    CredentialMintLevel:
      description: |-
        The credential layer a subject mint request selects (KYA).

        Deliberately narrower than ``IssuedCredentialType``: the individual
        and business mint routes issue only the two subject layers.
        Counterparty credentials have their own route and request shape, so
        a ``level`` of COUNTERPARTY must stay an edge-level payload refusal
        — this enum is what keeps issuance-record vocabulary growth from
        widening the mint requests.
      enum:
        - L2
        - L3
      title: CredentialMintLevel
      type: string
    IssuedCredentialLifecycleState:
      description: |-
        A credential's effective state as an issuance-log reader sees it.

        Derived, never stored: ``IssuedCredentialStatus`` deliberately keeps
        expiry out of the persisted status (verifiers check ``exp``), but the
        console and API consumers filter the log by what a credential *is*
        right now — still presentable, aged out, or killed.
      enum:
        - ACTIVE
        - EXPIRED
        - REVOKED
      title: IssuedCredentialLifecycleState
      type: string
    CredentialEventKind:
      description: What happened to a credential, as one row of its event stream.
      enum:
        - ISSUED
        - REVOKED
      title: CredentialEventKind
      type: string
    v1.CredentialEventResponse:
      description: One issuance or revocation, as the organization that minted reads it.
      properties:
        event_type:
          $ref: '#/components/schemas/v1.CredentialEventKind'
        occurred_at:
          format: date-time
          title: Occurred At
          type: string
        credential_id:
          description: 'The credential''s unique id: its token''s `jti`.'
          title: Credential Id
          type: string
        environment:
          $ref: '#/components/schemas/v1.ApplicationType'
          description: The environment the credential was minted in.
        source_environment:
          anyOf:
            - $ref: '#/components/schemas/v1.ApplicationType'
            - type: 'null'
          default: null
          description: >-
            On a test credential for a person or business verified in another
            environment, that environment; the credential itself is signed in
            `environment`. Null otherwise.
        level:
          $ref: '#/components/schemas/v1.CredentialMintLevel'
        preset:
          anyOf:
            - $ref: '#/components/schemas/v1.CredentialPreset'
            - type: 'null'
          description: The preset the mint named; null when it listed its own paths.
        individual_display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Individual Display Name
        individual_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Individual Ref
        business_legal_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Business Legal Name
        business_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Business Ref
        issued_to:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The Issued to column: the person's name, or the business's when no
            person acts for it.
          title: Issued To
        audience:
          title: Audience
          type: string
        state:
          $ref: '#/components/schemas/v1.IssuedCredentialLifecycleState'
          description: The credential's state now, not at the event.
        actor:
          anyOf:
            - $ref: '#/components/schemas/v1.ActedBy'
            - type: 'null'
          description: Who minted (issued) or revoked (revoked), as they were then.
        revocation_reason:
          anyOf:
            - $ref: '#/components/schemas/v1.AuditRevocationReason'
            - type: 'null'
          description: Why it was revoked; null on issued rows.
      required:
        - event_type
        - occurred_at
        - credential_id
        - environment
        - level
        - preset
        - individual_display_name
        - individual_ref
        - business_legal_name
        - business_ref
        - issued_to
        - audience
        - state
        - actor
        - revocation_reason
      title: CredentialEventResponse (v1)
      type: object
    Error:
      properties:
        type:
          type: string
          title: Type
          description: >-
            Stable snake_case name of the error. Branch on this, never on
            `message`.
        code:
          type: integer
          title: Code
          description: Integer catalog code of the error.
        message:
          type: string
          title: Message
          description: For a human reading a log; not stable and not localized.
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Context documented per `type`.
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: The `X-Request-ID` of the failed request.
      type: object
      required:
        - type
        - code
        - message
      title: Error
      description: The one body of every error a KYA route answers.
    v1.CredentialEventKind:
      description: What happened to a credential, as one row of its event stream.
      enum:
        - ISSUED
        - REVOKED
      title: CredentialEventKind
      type: string
    v1.ApplicationType:
      enum:
        - sandbox
        - production
      title: ApplicationType
      type: string
    v1.CredentialMintLevel:
      description: |-
        The credential layer a subject mint request selects (KYA).

        Deliberately narrower than ``IssuedCredentialType``: the individual
        and business mint routes issue only the two subject layers.
        Counterparty credentials have their own route and request shape, so
        a ``level`` of COUNTERPARTY must stay an edge-level payload refusal
        — this enum is what keeps issuance-record vocabulary growth from
        widening the mint requests.
      enum:
        - L2
        - L3
      title: CredentialMintLevel
      type: string
    v1.CredentialPreset:
      description: |-
        A named use case an L3 mint can disclose by instead of listing paths.

        The paths each preset shares live in
        ``osiris.identity.credential_presets``; this is the stored vocabulary
        (``issued_credentials.preset``). Retiring a preset is deleting its
        member: every read of a stored record types the key as text.
      enum:
        - consumer_ecommerce
        - age_gated
        - consumer_regulated
        - b2b_ecommerce
        - b2b_regulated
      title: CredentialPreset
      type: string
    v1.IssuedCredentialLifecycleState:
      description: |-
        A credential's effective state as an issuance-log reader sees it.

        Derived, never stored: ``IssuedCredentialStatus`` deliberately keeps
        expiry out of the persisted status (verifiers check ``exp``), but the
        console and API consumers filter the log by what a credential *is*
        right now — still presentable, aged out, or killed.
      enum:
        - ACTIVE
        - EXPIRED
        - REVOKED
      title: IssuedCredentialLifecycleState
      type: string
    v1.ActedBy:
      description: |-
        Who acted on a record, as they were named when they acted: the one actor
        shape every route answers.
      properties:
        kind:
          $ref: '#/components/schemas/v1.ActedByKind'
          description: '`USER` for a console user, `API_KEY` for a key.'
        label:
          description: >-
            The user's first and last name or the API key's name, as they were
            when they acted; never rewritten by a later rename or deletion.
          title: Label
          type: string
      required:
        - kind
        - label
      title: ActedBy (v1)
      type: object
    v1.AuditRevocationReason:
      description: >-
        Why a credential was revoked.


        The reason is the part of a revocation record a dispute actually reads,
        so

        the vocabulary has to distinguish the paths that reach it.
      enum:
        - agent_key_compromise
        - identity_superseded
        - identity_withdrawn
        - operator_link_revoked
        - fraud_suspected
        - administrative_action
      title: AuditRevocationReason
      type: string
    v1.ActedByKind:
      description: 'Who acted on a record: a console user or an API key.'
      enum:
        - USER
        - API_KEY
      title: ActedByKind
      type: string
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.