> ## 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 the presets an L3 mint can disclose by

> Lists the credential presets, by name by default, a page at a time (`limit`, default 10, maximum 1000; follow `X-Next-Cursor`): a use case an L3 mint can name as `preset` instead of listing `disclosed_fields`, with the exact paths it requests on an individual mint and on a business mint. Paths with nothing on file are skipped at mint time. `is_individual_default` and `is_business_default` name the most conservative preset per hat, the one a mint uses when it names none. The list is the same for every caller and fixed for an API release, so it may be cached for an hour.



## OpenAPI

````yaml /api-reference/openapi.json get /issuance/credentials/presets
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /issuance/credentials/presets:
    get:
      tags:
        - Credentials
      summary: List the presets an L3 mint can disclose by
      description: >-
        Lists the credential presets, by name by default, a page at a time
        (`limit`, default 10, maximum 1000; follow `X-Next-Cursor`): a use case
        an L3 mint can name as `preset` instead of listing `disclosed_fields`,
        with the exact paths it requests on an individual mint and on a business
        mint. Paths with nothing on file are skipped at mint time.
        `is_individual_default` and `is_business_default` name the most
        conservative preset per hat, the one a mint uses when it names none. The
        list is the same for every caller and fixed for an API release, so it
        may be cached for an hour.
      operationId: issuance_credentials_presets_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/CredentialPresetSortField'
              - type: 'null'
            description: >-
              `name`: the preset's label, ignoring case; ties break on `key`.
              Defaults to `name` `asc`.
            title: Sort
          description: >-
            `name`: the preset's label, ignoring case; ties break on `key`.
            Defaults to `name` `asc`.
        - 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: `name` `asc`.
            title: Sort Direction
          description: >-
            `asc` or `desc`, for every key of the sort. Defaults to the field's
            own: `name` `asc`.
      responses:
        '200':
          description: The presets, in the requested order.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.CredentialPresetResponse'
            application/vnd.baselayer.v1+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.CredentialPresetResponse'
          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:
    CredentialPresetSortField:
      type: string
      enum:
        - name
      title: CredentialPresetSortField
      description: What the credential presets list sorts by.
    SortMethod:
      type: string
      enum:
        - asc
        - desc
      title: SortMethod
    v1.CredentialPresetResponse:
      description: >-
        One entry of ``GET /issuance/credentials/presets``: a use case and the
        exact

        paths a mint by it requests under each hat.
      properties:
        key:
          $ref: '#/components/schemas/v1.CredentialPreset'
          description: The value a mint sends as `preset`.
        label:
          description: Display name.
          title: Label
          type: string
        requires_business:
          description: Whether only a business mint (a person at a business) accepts it.
          title: Requires Business
          type: boolean
        individual_disclosed_fields:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            The subject claim paths an individual mint by this preset requests;
            null when it requires a business.
          title: Individual Disclosed Fields
        business_disclosed_fields:
          description: >-
            The business credential's paths a business mint by this preset
            requests.
          items:
            type: string
          title: Business Disclosed Fields
          type: array
        business_actor_disclosed_fields:
          description: >-
            The actor credential's unprefixed paths a business mint by this
            preset requests, as `actor_disclosed_fields`.
          items:
            type: string
          title: Business Actor Disclosed Fields
          type: array
        is_individual_default:
          description: >-
            Whether this is the preset to preselect for a person on their own:
            the most conservative one an individual mint accepts.
          title: Is Individual Default
          type: boolean
        is_business_default:
          description: >-
            Whether this is the preset to preselect for a person at a business:
            the most conservative one a business mint accepts.
          title: Is Business Default
          type: boolean
      required:
        - key
        - label
        - requires_business
        - individual_disclosed_fields
        - business_disclosed_fields
        - business_actor_disclosed_fields
        - is_individual_default
        - is_business_default
      title: CredentialPresetResponse (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.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
  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.