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

# Get credential presets.



## OpenAPI

````yaml me-creds GET /presets/credentials
openapi: 3.0.0
info:
  version: 1.0.0
  title: Me Creds API
  description: >2-

          
    OpenAPI documentation for Me Creds API

          
      
    Following JSON:API spec https://jsonapi.org/format/ approach to response
    payload format.

          
     - [JSON - OpenAPI Specification](/me-creds/api/openapi.json)
servers:
  - url: https://test.didxtech.com/me-creds/api
    description: Test environment
security:
  - bearerAuth: []
paths:
  /presets/credentials:
    get:
      tags:
        - presets
      summary: Get credential presets.
      responses:
        '200':
          description: List of credential presets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialPresetListApiResponse'
components:
  schemas:
    CredentialPresetListApiResponse:
      type: object
      properties:
        data:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/SdJwtCredentialPresetResponse'
              - $ref: '#/components/schemas/MdocCredentialPresetResponse'
            discriminator:
              propertyName: credentialFormat
              mapping:
                sd-jwt:
                  $ref: '#/components/schemas/SdJwtCredentialPresetResponse'
                mdoc:
                  $ref: '#/components/schemas/MdocCredentialPresetResponse'
        links:
          $ref: '#/components/schemas/ApiLinks'
        meta:
          $ref: '#/components/schemas/ApiMeta'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
      required:
        - data
    SdJwtCredentialPresetResponse:
      type: object
      properties:
        credentialFormat:
          type: string
          enum:
            - sd-jwt
        id:
          type: string
        author:
          type: string
        templateName:
          type: string
        templateType:
          type: string
          format: uri
        code:
          type: string
        templateDescription:
          type: string
        templateAttributes:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SdJwtCredentialAttribute'
        issuerConfig:
          $ref: '#/components/schemas/IssuerConfigSdJwt'
        validUntil:
          oneOf:
            - type: object
              properties:
                start:
                  type: string
                  enum:
                    - issuance
                future:
                  type: object
                  properties:
                    days:
                      type: integer
                      minimum: 0
                    months:
                      type: integer
                      minimum: 0
                    years:
                      type: integer
                      minimum: 0
              required:
                - start
                - future
            - type: object
              properties:
                start:
                  type: string
                  enum:
                    - validFrom
                future:
                  type: object
                  properties:
                    days:
                      type: integer
                      minimum: 0
                    months:
                      type: integer
                      minimum: 0
                    years:
                      type: integer
                      minimum: 0
              required:
                - start
                - future
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - credentialFormat
        - id
        - author
        - templateName
        - templateType
        - code
        - templateDescription
        - templateAttributes
        - issuerConfig
        - createdAt
        - updatedAt
      example:
        credentialFormat: sd-jwt
        id: didx:basic-identity
        author: didx
        code: basic-identity
        templateName: Basic Identity Credential
        templateType: https://didx.co.za/vct/didx/basic-identity
        templateDescription: XYZ Board of Directors approved basic identity credential template
        templateAttributes:
          firstName:
            type: string
            name: First Name
            description: The first name of the person
            required: true
            alwaysDisclosed: false
          lastName:
            type: string
            name: Last Name
            description: The last name of the person
            required: true
            alwaysDisclosed: false
          verified:
            type: boolean
            name: Verified
            description: Whether the identity has been verified
            required: true
            alwaysDisclosed: true
          dateOfBirth:
            type: date
            name: Date of Birth
            description: Date of birth of the person
            required: true
            alwaysDisclosed: false
          address:
            type: object
            name: Address
            description: Residential address
            required: false
            alwaysDisclosed: false
            properties:
              streetName:
                type: string
                name: Street Name
                required: true
                alwaysDisclosed: false
              country:
                type: string
                name: Country
                required: true
                alwaysDisclosed: true
          nationalities:
            type: array
            name: Nationalities
            description: List of Alpha-2 country codes representing nationalities
            required: false
            alwaysDisclosed: false
            items:
              type: string
        issuerConfig:
          signer: did:web
        createdAt: '2025-02-20T11:27:37.051Z'
        updatedAt: '2025-02-20T11:27:37.051Z'
    MdocCredentialPresetResponse:
      type: object
      properties:
        credentialFormat:
          type: string
          enum:
            - mdoc
        id:
          type: string
        author:
          type: string
        templateName:
          type: string
        templateType:
          type: string
        code:
          type: string
        templateDescription:
          type: string
        templateAttributes:
          type: object
          additionalProperties:
            type: object
            properties:
              properties:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/MdocCredentialAttribute'
            required:
              - properties
        validUntil:
          type: object
          properties:
            future:
              type: object
              properties:
                days:
                  type: integer
                  minimum: 0
                months:
                  type: integer
                  minimum: 0
                years:
                  type: integer
                  minimum: 0
          required:
            - future
        issuerConfig:
          type: object
          nullable: true
          properties:
            signer:
              type: string
              enum:
                - certificate
            keyType:
              type: string
              enum:
                - P-256
                - Ed25519
          required:
            - signer
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - credentialFormat
        - id
        - author
        - templateName
        - templateType
        - code
        - templateDescription
        - templateAttributes
        - validUntil
        - issuerConfig
        - createdAt
        - updatedAt
      example:
        credentialFormat: mdoc
        id: didx:national-id
        author: didx
        code: national-id
        templateName: National ID
        templateType: za.co.didx.national-id
        templateDescription: South African national identity document
        templateAttributes:
          za.co.didx:
            properties:
              firstName:
                type: string
                name: First Name
                required: true
        validUntil:
          future:
            days: 365
        issuerConfig:
          signer: certificate
          keyType: P-256
        createdAt: '2025-02-20T11:27:37.051Z'
        updatedAt: '2025-02-20T11:27:37.051Z'
    ApiLinks:
      type: object
      properties:
        self:
          type: string
          format: uri
        first:
          type: string
          format: uri
        last:
          type: string
          format: uri
        prev:
          type: string
          format: uri
        next:
          type: string
          format: uri
        related:
          type: string
          format: uri
    ApiMeta:
      type: object
      additionalProperties:
        nullable: true
    ApiError:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              type: string
            parameter:
              type: string
        meta:
          type: object
          additionalProperties:
            nullable: true
      required:
        - detail
    SdJwtCredentialAttribute:
      oneOf:
        - type: object
          properties:
            name:
              type: string
            description:
              type: string
            required:
              type: boolean
            alwaysDisclosed:
              type: boolean
            type:
              type: string
              enum:
                - string
                - number
                - boolean
                - date
          required:
            - type
        - type: object
          properties:
            name:
              type: string
            description:
              type: string
            required:
              type: boolean
            alwaysDisclosed:
              type: boolean
            type:
              type: string
              enum:
                - object
            properties:
              type: object
              additionalProperties:
                nullable: true
          required:
            - type
            - properties
        - type: object
          properties:
            name:
              type: string
            description:
              type: string
            required:
              type: boolean
            alwaysDisclosed:
              type: boolean
            type:
              type: string
              enum:
                - array
            items:
              nullable: true
          required:
            - type
    IssuerConfigSdJwt:
      oneOf:
        - type: object
          properties:
            signer:
              type: string
              enum:
                - did:web
          required:
            - signer
        - type: object
          properties:
            signer:
              type: string
              enum:
                - certificate
            keyType:
              type: string
              enum:
                - P-256
                - Ed25519
          required:
            - signer
    MdocCredentialAttribute:
      anyOf:
        - type: object
          properties:
            name:
              type: string
            description:
              type: string
            required:
              type: boolean
            type:
              type: string
              enum:
                - string
                - number
                - boolean
                - date
                - binary
          required:
            - type
        - type: object
          properties:
            name:
              type: string
            description:
              type: string
            required:
              type: boolean
            type:
              type: string
              enum:
                - array
            items:
              nullable: true
          required:
            - type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````