openapi: 3.0.2
info:
  version: '1'
  title: Truvera API
  description: |
    Truvera provides a complete solution for creating and managing verifiable credentials on the blockchain. This includes a free trial and simple, monthly pricing. For more info about [Truvera Pricing](https://www.truvera.io/pricing).   <br />
    <br /> 1- Get your first API key after login from [Truvera Workspace](https://truvera.io/).
    <br />2- Create the `API Key` by switching to test mode, copy and save it to enjoy `free unlimited API calls`.
    <br />3- Select the right server in which you have created your API key.
    <br /> 4- Now click <b>`Authorize`</b> button, and paste the API key into `bearerAuth  (http, Bearer)` text box.
    <br /> 5- Click again the `Authorize` button to complete authorization process. Click `Close` to execute the API calls.
servers:
  - url: https://api-testnet.truvera.io
    description: Sandbox server (uses test data)
  - url: https://api.truvera.io
    description: Production server (uses live data)
tags:
  - name: dids
    description: Operations about DIDs
  - name: credentials
    description: Operations about Credentials
  - name: presentations
    description: Operations about Presentations and Proof Requests
  - name: registries
    description: Operations about Registries
  - name: revocationStatus
    description: Operations about Revocation Status
  - name: delegatableRevocation
    description: Operations about Delegatable Credential Revocation
  - name: schemas
    description: Operations about Schemas
  - name: delegationRules
    description: Operations about Delegation Rules
  - name: jobs
    description: Operations about Jobs
  - name: profiles
    description: Operations about Profiles
  - name: webhooks
    description: Operations about Webhooks
  - name: templates
    description: Operations about Templates
  - name: subaccounts
    description: Operations about Subaccounts
  - name: teams
    description: Operations about Teams
  - name: messaging
    description: Operations about DIDComm messaging
  - name: openid
    description: Operations about OpenID
  - name: trustRegistries
    description: Operations about trust registries
  - name: data
    description: Operations relating to your own account data
  - name: openid-holder
    description: Routes used by a wallet application to receive/present OpenID credentials, not used directly by an API user
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    accessToken:
      type: apiKey
      in: header
      name: DOCK-API-TOKEN
    nextAuth:
      type: apiKey
      in: header
      name: CERTS-TOKEN
    sponsorKey:
      type: apiKey
      in: header
      name: X-MOBILE-SPONSOR-KEY
  schemas:
    null_type:
      title: "OpenAPI 3.0 null-type ref"
      description: "for adding nullability to a ref"
      enum: [null]
    DelegationRulePolicyDocument:
      type: object
      additionalProperties: true
      description: Delegation policy document payload (validated server-side against DelegationPolicy schema)
    DelegationRuleSet:
      type: object
      required:
        - id
        - name
        - createdAt
        - policy
        - schemaIds
      properties:
        id:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
          maxLength: 256
          description: Human-readable delegation ruleset name
        createdAt:
          type: string
          format: date
        policy:
          $ref: '#/components/schemas/DelegationRulePolicyDocument'
        schemaIds:
          type: array
          items:
            type: string
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
    DelegationRulesRequest:
      type: object
      required:
        - name
        - policy
        - schemaIds
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 256
          description: Human-readable delegation ruleset name
        policy:
          $ref: '#/components/schemas/DelegationRulePolicyDocument'
        schemaIds:
          type: array
          minItems: 1
          items:
            type: string
    DelegationRulesList:
      type: array
      items:
        $ref: '#/components/schemas/DelegationRuleSet'
    DelegatableRevocationControlRequest:
      type: object
      required:
        - action
        - credentialId
      properties:
        action:
          type: string
          enum:
            - revoke
            - unrevoke
        registryId:
          $ref: '#/components/schemas/Hex32'
        credentialId:
          type: string
    DelegatableRevocationControlResponse:
      type: object
      properties:
        registryId:
          type: string
        action:
          type: string
          enum:
            - revoke
            - unrevoke
        credentialId:
          type: string
        statusListCredential:
          type: string
          format: uri
    DelegatableStatusList2021Credential:
      type: object
      required:
        - '@context'
        - id
        - type
        - issuer
        - credentialSubject
      properties:
        '@context':
          type: array
          items:
            oneOf:
              - type: string
              - type: object
                additionalProperties: true
        id:
          type: string
          format: uri
        type:
          type: array
          items:
            type: string
        issuer:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
        issuanceDate:
          type: string
          format: date-time
        credentialSubject:
          type: object
          required:
            - id
            - type
            - statusPurpose
            - encodedList
          properties:
            id:
              type: string
              format: uri
            type:
              type: string
            statusPurpose:
              type: string
              enum:
                - revocation
            encodedList:
              type: string
    OID4VPRequestCreate:
      properties:
        withIdToken:
          type: boolean
          default: false
        withRequestURI:
          type: boolean
          default: false
    UserProfile:
      required:
        - image
        - name
      properties:
        name:
          type: string
        image:
          type: string
    TrustRegistryQueryRequest:
      type: object
      properties:
        verifierDID:
          $ref: '#/components/schemas/DID'
        issuerDID:
          $ref: '#/components/schemas/DID'
        schema:
          type: string
    TrustRegistryCreateRequest:
      type: object
      required:
        - convener
        - name
        - description
        - logoUrl
        - ecosystemUrl
        - governanceFramework
        - governanceFrameworkVersion
      properties:
        convener:
          $ref: '#/components/schemas/DID'
        name:
          type: string
          description: Trust registry name
          example: 'Truvera Example Ecosystem'
        description:
          type: string
          description: Trust registry description
          example: 'Labore voluptate adipisicing magna duis eu fugiat pariatur excepteur irure.'
        logoUrl:
          type: string
          format: uri
          minimum: 8
          example: https://logo.truvera.io/trust-registry
        ecosystemUrl:
          type: string
          format: uri
          minimum: 8
          example: https://ecosystem.truvera.io
        governanceFramework:
          type: string
          description: Trust registry governance framework
          example: 'Lorem ea ea reprehenderit cupidatat minim incididunt occaecat est sit.'
        governanceFrameworkVersion:
          type: string
          description: Trust registry governance framework version
          example: '1.0.0'
    TrustRegistryUpdateRequest:
      type: object
      required:
        - name
        - description
        - logoUrl
        - ecosystemUrl
        - governanceFramework
        - governanceFrameworkVersion
      properties:
        name:
          type: string
          description: Trust registry name
          example: 'Truvera Example Ecosystem'
        description:
          type: string
          description: Trust registry description
          example: 'Labore voluptate adipisicing magna duis eu fugiat pariatur excepteur irure.'
        logoUrl:
          type: string
          description: Trust registry logo URL
          format: uri
          minimum: 8
          example: https://logo.truvera.io/trust-registry
        ecosystemUrl:
          type: string
          description: Trust registry ecosystem URL
          format: uri
          minimum: 8
          example: https://ecosystem.truvera.io
        governanceFramework:
          type: string
          description: Trust registry governance framework
          example: 'Lorem ea ea reprehenderit cupidatat minim incididunt occaecat est sit.'
        governanceFrameworkVersion:
          type: string
          description: Trust registry governance framework version
          example: '1.0.0'
    TrustRegistry:
      type: object
      required:
        - id
        - convener
        - name
        - description
        - created
        - logoUrl
        - ecosystemUrl
        - governanceFramework
        - governanceFrameworkVersion
      properties:
        id:
          type: string
          description: Trust registry ID
          example: '0x601d148fb8895aca83eafb264293069911f76805b748b014ae64fcf0fd2d765d'
        convener:
          $ref: '#/components/schemas/DID'
        convenerName:
          type: string
          description: Convener name
          example: 'Truvera'
        convenerLogoUrl:
          type: string
          description: Convener logo URL
          example: 'https://logo.truvera.io/convener'
        slug:
          type: string
          description: Trust registry slug
          example: 'truvera-example-ecosystem-1'
        nonce:
          type: string
          description: Trust registry nonce
          example: '0x57aecb3863404812'
        created:
          type: string
          format: date-time
        name:
          type: string
          description: Trust registry name
          example: 'Truvera Example Ecosystem'
        description:
          type: string
          description: Trust registry description
          example: 'Labore voluptate adipisicing magna duis eu fugiat pariatur excepteur irure.'
        logoUrl:
          type: string
          description: Trust registry logo URL
          format: uri
          minimum: 8
          example: https://logo.truvera.io/trust-registry
        ecosystemUrl:
          type: string
          description: Trust registry ecosystem URL
          format: uri
          minimum: 8
          example: https://ecosystem.truvera.io
        governanceFramework:
          type: string
          description: Trust registry governance framework
          example: 'Lorem ea ea reprehenderit cupidatat minim incididunt occaecat est sit.'
        governanceFrameworkVersion:
          type: string
          description: Trust registry governance framework version
          example: '1.0.0'
        issuerCount:
          type: integer
          description: Trust registry issuer count
          example: 10
        verifierCount:
          type: integer
          description: Trust registry verifier count
          example: 5
    TrustRegistries:
      type: array
      items:
        $ref: '#/components/schemas/TrustRegistry'
    TrustRegistryInviteAcceptRequest:
      type: object
      required:
        - token
        - did
        - infoUrl
      properties:
        token:
          type: string
          description: The invite token
          example: 'eyJhbGc...2VVqUw'
        did:
          $ref: '#/components/schemas/DID'
        infoUrl:
          anyOf:
            - type: string
              description: Trust registry participant info URL
              format: uri
              minimum: 8
            - type: string
              description: Trust registry participant info URL
              enum: [""]
          example: https://info.truvera.io/trust-registry/participant/1234
    TrustRegistryInviteRequest:
      type: object
      properties:
        maxAge:
          type: integer
          description: Max age of the invite in seconds
        issuerSchemas:
          type: array
          items:
            type: string
            description: Trust registry issuer schema
            example: 'https://schema.truvera.io/ExampleSchema-V5-1722512884923.json'
        verifierSchemas:
          type: array
          items:
            type: string
            description: Trust registry verifier schema
            example: 'https://schema.truvera.io/ExampleSchema-V5-1722512884923.json'
    TrustRegistryInviteResponse:
      type: object
      required:
        - link
      properties:
        link:
          type: string
          description: The trust registry invite link
          example: 'https://trust-registry.truvera.io/ecosystems?token=eyJhbGc...2VVqUw'
    TrustRegistryParticipant:
      type: object
      required:
        - id
        - name
        - did
      properties:
        id:
          type: string
          description: Trust registry participant ID
          example: '23314808-eec6-4492-9a8a-8f32e34b8155'
        name:
          type: string
          description: Trust registry participant name
          example: 'Truvera Issuer'
        did:
          $ref: '#/components/schemas/DID'
        description:
          type: string
          description: Trust registry participant description
          example: 'Labore voluptate adipisicing magna duis eu fugiat pariatur excepteur irure.'
        logoUrl:
          anyOf:
            - type: string
              description: Trust registry participant logo URL
              format: uri
              minimum: 8
            - type: string
              description: Trust registry participant logo URL
              enum: [""]
          example: https://logo.truvera.io/participant
        infoUrl:
          anyOf:
            - type: string
              description: Trust registry participant info URL
              format: uri
              minimum: 8
            - type: string
              description: Trust registry participant info URL
              enum: [""]
          example: https://info.truvera.io/trust-registry/participant/1234
        status:
          type: string
          description: Trust registry participant status
          example: 'active'
          enum: [active, suspended]
        role:
          type: string
          description: Trust registry participant role
          example: 'issuer'
          enum: [verifier+issuer, issuer, verifier]
        created:
          type: string
          format: date-time
        suspendedAt:
          type: string
        issuerSchemas:
          type: array
          items:
            type: string
            description: Trust registry participant issuer schema
            example: 'https://schema.truvera.io/ExampleSchema-V5-1722512884923.json'
        verifierSchemas:
          type: array
          items:
            type: string
            description: Trust registry participant verifier schema
            example: 'https://schema.truvera.io/ExampleSchema-V5-1722512884923.json'
    TrustRegistryParticipantPatch:
      type: object
      properties:
        name:
          type: string
          description: Trust registry participant name
          example: 'Truvera Issuer'
        logoUrl:
          type: string
          description: Trust registry participant logo URL
          format: uri
          minimum: 8
          example: https://logo.truvera.io/trust-registry-participant/1234
        infoUrl:
          anyOf:
            - type: string
              description: Trust registry participant info URL
              format: uri
              minimum: 8
            - type: string
              description: Trust registry participant info URL
              enum: [""]
          example: https://info.truvera.io/trust-registry/participant/1234
        status:
          type: string
          description: Trust registry participant status
          example: 'active'
          enum: [active, suspended]
        suspendedAt:
          type: string
        issuerSchemas:
          type: array
          items:
            type: string
            description: Trust registry participant issuer schema
            example: 'https://schema.truvera.io/ExampleSchema-V5-1722512884923.json'
        verifierSchemas:
          type: array
          items:
            type: string
            description: Trust registry participant verifier schema
            example: 'https://schema.truvera.io/ExampleSchema-V5-1722512884923.json'
    TrustRegistryParticipantInfoPatch:
      type: object
      properties:
        infoUrl:
          anyOf:
            - type: string
              description: Trust registry participant info URL
              format: uri
              minimum: 8
            - type: string
              description: Trust registry participant info URL
              enum: [""]
          example: https://info.truvera.io/trust-registry/participant/1234
    TrustRegistryParticipants:
      type: object
      required:
        - total
        - list
      properties:
        total:
          type: integer
          description: Total number of participants
          example: 42
        list:
          type: array
          items:
            $ref: '#/components/schemas/TrustRegistryParticipant'
    TrustRegistrySchema:
      type: object
      required:
        - id
        - name
        - participantCount
        - topParticipants
        - public
      properties:
        id:
          type: string
          description: Trust registry schema ID
          example: 'https://schema.truvera.io/ExampleSchema-V5-1722512884923.json'
        name:
          type: string
          description: Trust registry schema name
          example: 'Example Schema'
        public:
          type: boolean
          description: Whether the schema is currently public (i.e. can be verified by anyone).
        participantCount:
          type: integer
          description: How many participants have this schema assigned
          example: 10
        prices:
          type: array
          description: Prices assigned to this schema
          items:
            $ref: '#/components/schemas/TrustRegistrySchemaPrice'
        topParticipants:
          type: array
          description: Top participants that have this schema assigned
          items:
            $ref: '#/components/schemas/TrustRegistryParticipant'
    TrustRegistrySchemaPrice:
      type: object
      required:
        - currency
        - digits
      properties:
        currency:
          type: string
          description: Currency code
          example: USD
        digits:
          description: Bigint representation of the price. Multiply by 1,000,000 to support fractional cents.
          oneOf:
            - type: integer
            - type: string
          example: 100000000
        verifier:
          $ref: '#/components/schemas/DID'
    TrustRegistryReport:
      type: object
      required:
        - verifierDID
        - issuerDID
        - schemaId
        - currency
        - verifierFee
        - vendorFee
        - created
      properties:
        trustRegistryId:
          description: Trust registry ID
          type: string
          example: '0x601d148fb8895aca83eafb264293069911f76805b748b014ae64fcf0fd2d765d'
        verificationId:
          description: Verification ID
          type: string
          example: 798e9e9f-9a73-4bd3-881f-367e1d1c70ee
        verificationTemplateId:
          description: Verification Template ID
          type: string
          example: d0194072-b706-485d-bc5a-02a433641f63
        isValid:
          description: Was the verification successful with valid credentials
          type: boolean
          example: true
        verifierDID:
          $ref: '#/components/schemas/DID'
        issuerDID:
          $ref: '#/components/schemas/DID'
        schemaId:
          description: Schema ID
          type: string
          example: https://schema.truvera.io/ExampleSchema-V5-1722512884923.json
        currency:
          description: Currency code
          type: string
          example: USD
        verifierFee:
          description: Verifier fee
          type: string
          example: 123456
        vendorFee:
          description: Vendor fee
          type: string
          example: 6172
        created:
          type: string
          format: date-time
    TrustRegistryReports:
      type: object
      required:
        - total
        - list
      properties:
        total:
          type: integer
        list:
          type: array
          items:
            $ref: '#/components/schemas/TrustRegistryReport'
    TrustRegistrySchemas:
      type: object
      required:
        - total
        - list
      properties:
        total:
          type: integer
          description: Total number of schemas
          example: 200
        list:
          type: array
          items:
            $ref: '#/components/schemas/TrustRegistrySchema'
    TrustRegistryProofTemplateAssignRequest:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: The proof template ID
          example: a6cd414a-6eba-4241-9a9c-6f75864edbd5
    TrustRegistryProofTemplates:
      type: object
      required:
        - total
        - list
      properties:
        total:
          type: integer
          description: Total number of proof templates
          example: 200
        list:
          type: array
          items:
            $ref: '#/components/schemas/ProofRequest'
    TrustRegistryPublic:
      type: object
      required:
        - id
        - name
        - logoUrl
        - ecosystemUrl
      properties:
        id:
          type: string
          description: The unique identifier for the ecosystem, usually a hash value.
          example: '0xe7e0f253c5f05059904109e33fb63b104edddd7e114a8746a5faf07a944d58aa'
        slug:
          type: string
          description: A human-readable identifier for the ecosystem, used as a URL path or reference name.
          example: 'truvera-ecosystem-419'
        convener:
          type: string
          description: The DID of the convener or owner of the ecosystem, responsible for its management.
          example: 'did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59'
        created:
          type: string
          format: date-time
          description: The date and time when the ecosystem was created.
          example: '2024-09-26T13:18:51.534Z'
        name:
          type: string
          description: The name of the ecosystem.
          example: 'Truvera Ecosystem'
        description:
          type: string
          description: A brief description of the ecosystem.
          example: 'This is my new awesome ecosystem!'
        logoUrl:
          type: string
          format: uri
          minimum: 8
          description: A URL pointing to the logo image of the ecosystem.
          example: https://logo.truvera.io/trust-registry
        ecosystemUrl:
          type: string
          format: uri
          minimum: 8
          description: The main website URL of the ecosystem.
          example: https://ecosystem.truvera.io
        governanceFramework:
          type: string
          description: A markdown document describing the governance framework of the ecosystem.
          example: 'This is a markdown document describing my framework'
        governanceFrameworkVersion:
          type: string
          description: The version of the governance framework.
          example: '1.0.0'
        participantRole:
          type: string
          description: The role of the participant within the ecosystem, such as 'verifier' or 'issuer'.
          example: 'verifier'
        participantStatus:
          type: string
          description: The current status of the participant in the ecosystem.
          example: 'active'
        participantName:
          type: string
          description: The name of the participant in the ecosystem.
          example: 'My Convener'
        participantLogoUrl:
          type: string
          format: uri
          minimum: 8
          description: A URL pointing to the logo image of the participant.
          example: https://logo.com/participant
        participantInfoUrl:
          anyOf:
            - type: string
              format: uri
              minimum: 8
              description: A URL providing additional information about the participant.
              example: https://participant.truvera.io
            - type: string
              enum: [""]
    TrustRegistryPublicList:
      type: object
      required:
        - total
        - list
      properties:
        total:
          type: integer
        list:
          type: array
          items:
            $ref: '#/components/schemas/TrustRegistryPublic'
    TrustRegistryGenericSchemaPrice:
      type: object
      required:
        - currency
        - digits
        - trustRegistryId
        - trustRegistryMetadata
      properties:
        currency:
          type: string
          description: Currency code
          example: USD
        digits:
          description: Bigint representation of the price. Multiply by 1,000,000 to support fractional cents.
          oneOf:
            - type: integer
            - type: string
          example: 100000000
        trustRegistryId:
          description: Trust registry ID
          type: string
          example: '0x601d148fb8895aca83eafb264293069911f76805b748b014ae64fcf0fd2d765d'
        trustRegistryMetadata:
          type: object
          description: Trust registry metadata
          properties:
            name:
              type: string
              description: Trust registry name
              example: Example Trust Registry
            logoUrl:
              type: string
              description: Trust registry logo URL
              format: uri
              minimum: 8
              example: https://logo.truvera.io/trust-registry
            description:
              type: string
              description: Trust registry description
              example: Example Trust Registry Description
            ecosystemUrl:
              type: string
              description: Trust registry ecosystem URL
              format: uri
              minimum: 8
              example: https://ecosystem.truvera.io
            governanceFramework:
              type: string
              description: Trust registry governance framework
              example: Example Governance Framework
            governanceFrameworkVersion:
              type: string
              description: Trust registry governance framework version
              example: 1.0
    ListOfDIDs:
      description: List of DID strings
      type: array
      items:
        type: string
    TrustRegistryGenericSchemaPrices:
      description: Trust registry schema prices
      type: array
      items:
        type: object
        properties:
          schema:
            type: string
            description: The schema ID
            example: https://schema.truvera.io/ExampleSchema-V5-1722512884923.json
          prices:
            type: array
            items:
              $ref: '#/components/schemas/TrustRegistryGenericSchemaPrice'
    TrustRegistryGenericSchemaDids:
      description: Trust registry schema dids
      type: array
      items:
        type: object
        properties:
          schema:
            type: string
            description: The schema ID
            example: https://schema.truvera.io/ExampleSchema-V5-1722512884923.json
          dids:
            type: array
            items:
              $ref: '#/components/schemas/DID'
    CredentialIssueRequest:
      type: object
      required:
        - credential
      properties:
        persist:
          type: boolean
          default: false
          description: Whether to store an encrypted version of this credential with us. Defaults to false, if true you must supply password. When choosing to persist a credential containing Personally Identifiable Information (PII), consider the implications for data storage regulatory compliance.
          example: false
        password:
          type: string
          maxLength: 32
          minLength: 4
          description: Password used to encrypt the credential if you choose to store it. The same password must be used to retrieve the credential contents. Truvera does not store this password.
          example: ""
        anchor:
          type: boolean
          default: false
          description: Anchor the credential on the blockchain or not
          example: false
          deprecated: true
        template:
          type: string
          format: uuid
          description: The credential template UUID, only required for PDF and web rendering customization
          example: ""
        recipientDID:
          type: string
          description: The holder's DID for DID distribution, optional. Not required for OpenID flows.
          example: ""
        recipientEmail:
          type: string
          description: The holder's email for email distribution, optional. Not required for OpenID flows.
          example: ""
        algorithm:
          type: string
          default: ed25519
          maxLength: 32
          minLength: 4
          description: Optional. Specifies which signing algorithm to use to sign the issued credential. Defaults to ed25519, for ZKP credendials use dockbbs.  
          example: "dockbbs"
        distribute:
          type: boolean
          default: false
          description: Whether to distribute the credential or not based on subject DID or email address. Not required for OpenID flows.
          example: false
        format:
          type: string
          enum: [jsonld, jwt, sdjwt]
          description: Specifies the output format of the credential, either jsonld or jwt. Defaults to jsonld.
          example: "jsonld"
        credential:
          $ref: '#/components/schemas/Credential'
        revocable:
          type: boolean
          default: false
          description: Whether the credential can be revoked or not. If true the revocation registry will be automatically provisioned.
          example: true
    DIDCommMessage:
      description: A DIDComm message with metadata
      type: object
      properties:
        messageId:
          type: string
          description: Unique identifier for the message
          example: "msg_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
        to:
          type: string
          description: The DID that received this message
          example: "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59"
        messageType:
          type: string
          description: The type of the message (from the message content)
          example: "https://didcomm.org/basicmessage/2.0/basic-message"
        sender:
          type: string
          nullable: true
          description: The DID of the message sender (if available)
          example: "did:example:sender"
        receivedAt:
          type: string
          format: date-time
          description: When the message was received
          example: "2024-01-15T10:30:01Z"
        content:
          type: object
          description: The message content (decrypted if encrypted, plaintext if not). Not included in message lists.
          additionalProperties: true
      required:
        - messageId
        - to
        - receivedAt
    Error:
      description: An API Error
      type: object
      properties:
        status:
          type: integer
        type:
          type: string
        message:
          type: string
    Hex32:
      description: 32 byte hex string. Ignoring higher base (base64) for simplicity.
      type: string
      minLength: 64
      maxLength: 64
      pattern: '^[0-9a-fA-F]{64}$'
    JobStartedResult:
      description: Object containing unique id of the background task and associated data. This id can be used to query the job status
      properties:
        id:
          type: string
        data:
          type: object
    JobId:
      description: Unique id of the background task. This id can be used to query the job status
      type: string
      example: '900'
    JobStatus:
      description: Status of the job.
      type: string
      enum: [todo, finalized, in_progress, error]
    JobDesc:
      description: Description of the job including result if available
      properties:
        id:
          $ref: '#/components/schemas/JobId'
        status:
          $ref: '#/components/schemas/JobStatus'
        result:
          type: object
    DID:
      description: DID as fully qualified, typically. `did:cheqd:`
      type: string
      minimum: 32
      example: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
    NumericID:
      description: A unique numeric ID
      type: string
    URI:
      description: Valid URI
      type: string
      format: uri
      minimum: 8
      example: https://credentials.truvera.io/1234
    KeyType:
      description: 'Type of public key for DID (NOTE: secp256k1, sr25519 are deprecated)'
      type: string
      enum:
        - ed25519
        - bjj
        - secp256k1
        - sr25519
    SigType:
      description: 'Type of signature (NOTE: EcdsaSecp256k1Signature2019, Sr25519Signature2020 are deprecated)'
      type: string
      enum:
        - Ed25519Signature2018
        - Ed25519Signature2020
        - Bls12381BBS+SignatureDock2022
        - Bls12381BBS+SignatureProofDock2022
        - Bls12381BBDT16MACDock2024
        - Bls12381BBSSignatureDock2023
        - Bls12381BBSVerificationKeyDock2023
        - BJJSignature2021
        - EcdsaSecp256k1Signature2019
        - Sr25519Signature2020
    ProofPurpose:
      description: Purpose of credential
      type: string
      enum:
        - assertionMethod
        - authentication
    Context:
      description: JSON-LD context array of strings or single string
      example: "https://docknetwork.github.io/vc-schemas/basic-credential.json-ld"
      oneOf:
        - type: array
          items:
            oneOf:
              - type: string
              - type: object
        - type: string
    DIDDoc:
      description: A DID Document containing information about a decentralized identifier (DID) and its associated entities.
      type: object
      properties:
        "@context":
          $ref: '#/components/schemas/Context'
        id:
          $ref: '#/components/schemas/DID'
        authentication:
          type: array
          description: Array of verification methods used for authentication.
          items:
            oneOf:
              - type: object
              - type: string
          example:
            - 'did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1'
        assertionMethod:
          type: array
          description: Array of verification methods used for assertion.
          items:
            oneOf:
              - type: object
              - type: string
          example:
            - 'did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1'
        capabilityInvocation:
          type: array
          description: Array of verification methods used for capability invocation.
          items:
            oneOf:
              - type: object
              - type: string
          example:
            - 'did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1'
        publicKey:
          type: array
          description: Array of public keys associated with the DID document.
          items:
            type: object
            properties:
              id:
                type: string
                description: The unique identifier for the public key.
                example: 'did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1'
              type:
                type: string
                description: The type of the public key.
                example: 'Sr25519VerificationKey2020'
              controller:
                type: string
                description: The DID that controls the key.
                example: 'did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59'
              publicKeyBase58:
                type: string
                description: The public key encoded in base58 format.
                example: 'Cs8XUWkpkscPhEVCsUAicLqd8pL2MoGqahywfRhbtVEi'
    DIDsResponse:
      description: Response containing a list of DIDs
      type: array
      items:
        type: object
        properties:
          id:
            $ref: '#/components/schemas/DID'
          did:
            $ref: '#/components/schemas/DID'
          type:
            type: string
            description: The type of DID, indicating the network or method used.
            enum:
              - cheqd
              - key
              - dock
            example: 'cheqd'
          controller:
            description: The controller of the DID, who has authority over it.
            $ref: '#/components/schemas/DID'
          credentialCount:
            type: string
            description: The number of credentials issued by this DID.
            example: '0'
          updatedLast:
            type: string
            format: date-time
            description: The timestamp of the last update to the DID metadata.
            example: '2024-09-26T12:38:10.871Z'
          profile:
            description: Additional profile information associated with the DID, such as a public profile or other descriptive metadata.
            type: object
            nullable: true
            properties:
              name:
                type: string
                description: The name associated with the profile.
                example: 'My Convener'
              logo:
                anyOf:
                  - type: string
                    maxLength: 0
                  - type: string
                    format: uri
                    description: A URL pointing to the logo image associated with the profile.
                    example: 'https://logo.truvera.io/convener.png'
              description:
                type: string
                description: A brief description of the profile.
                example: 'An ecosystem convener'
          keyId:
            type: string
            description: The identifier of the key associated with the DID.
            example: 'did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651#keys-1'
          jobId:
            anyOf:
              - $ref: "#/components/schemas/null_type"
              - $ref: '#/components/schemas/JobId'
          trustRegistries:
            type: array
            description: A list of trust registries associated with this DID.
            items:
              type: object
              properties:
                id:
                  type: string
                  description: The unique identifier of the trust registry.
                  example: '0x592a...c99b'
                name:
                  type: string
                  description: The name of the trust registry.
                  example: 'Updated Name'
                logoUrl:
                  type: string
                  format: uri
                  description: A URL pointing to the logo image of the trust registry.
                  example: 'https://logo.com/ecosystemnew'
    Credential:
      description: Format to create credentials with the API
      type: object
      properties:
        id:
          type: string
          description: Optional credential ID, ideally as a URI or UUID. Leave blank to auto generate
          example: ""
        previousCredentialId:
          type: string
          description: Optional credential ID that denotes the previous credential in the delegation chain
          example: ""
        rootCredentialId:
          type: string
          description: Optional credential ID that denotes the delegation root
          example: ""
        name:
          type: string
          example: "Basic Credential"
          description: Optional name to be inserted in the credential
        description:
          type: string
          example: "My first credential"
          description: Optional description to be inserted in the credential
        schema:
          example: "https://docknetwork.github.io/vc-schemas/basic-credential.json"
          oneOf:
            - type: object
            - type: string
              format: uri
        context:
          $ref: '#/components/schemas/Context'
        type:
          example: [BasicCredential]
          description: Custom type, leave empty to auto generate where possible
          type: array
          items:
            type: string
        subject:
          example:
            id: did:key:z6MkqBcwvYurNSSqyBkxavv4fkaq2iu3v3YGMbdyfa4bVNxD
            name: A. Holder
          oneOf:
            - type: object
            - type: array
        issuer:
          oneOf:
            - type: string
              $ref: '#/components/schemas/DID'
            - type: object
        issuanceDate:
          type: string
          format: date-time
        expirationDate:
          type: string
          format: date-time
          example: "2030-09-20T00:13:59.270Z"
        status:
          description: Revocation registry id or user supplied status object
          example: null
          oneOf:
            - type: object
            - type: string
    Team:
      type: object
      required:
        - id
      properties:
        id:
          type: integer
          description: The team ID
        team_owner_id:
          type: integer
          description: The team owner ID
        name:
          type: string
          description: The team name
          nullable: true
    TeamMember:
      type: object
      required:
        - id
        - name
      properties:
        id:
          description: The team member ID
          type: integer
        name:
          description: The team member name
          type: string
        email:
          description: The team member email
          type: string
        image:
          description: The team member image
          type: string
        role:
          description: The team member role
          type: string
          enum: ['member', 'administrator', 'owner']
    Notification:
      type: object
      required:
        - type
        - data
        - created
      properties:
        type:
          description: The type of the notification
          type: string
        data:
          description: The data of the notification, varies depending on type
          type: object
        created:
          description: The datetime of the notification 
          type: string
          format: date-time
    Notifications:
      type: object
      required:
        - total
        - list
      properties:
        total:
          description: The total number of records
          type: integer
        list:
          description: The current paged records
          type: array
          items:
            $ref: '#/components/schemas/Notification'
    TeamMembers:
      type: array
      items:
        $ref: '#/components/schemas/TeamMember'
    TeamMemberInvitation:
      type: object
      required:
        - id
        - email
      properties:
        id:
          description: The team member invitation ID
          type: integer
        email:
          description: The team member invitation email
          type: string
        status:
          description: The team member invitation status
          type: string
          enum: ['pending', 'accepted', 'canceled']
    TeamMemberInvitations:
      type: array
      items:
        $ref: '#/components/schemas/TeamMemberInvitation'
    EncryptedWallet:
      description: An encrypted Universal Wallet JSON-LD document
      type: object
      properties:
        '@context':
          type: array
          items:
            type: string
          description: The context defining the terms used in the credential
          example:
            - 'https://www.w3.org/2018/credentials/v1'
            - 'https://w3id.org/wallet/v1'
        id:
          type: string
          description: The ID of the credential, typically a DID with a fragment identifier
          example: 'did:key:z6LS...Wa19#encrypted-wallet'
        type:
          type: array
          items:
            type: string
          description: The type of the credential, includes VerifiableCredential and other specific types
          example:
            - 'VerifiableCredential'
            - 'EncryptedWallet'
        issuer:
          type: string
          description: The issuer of the credential, typically a DID
          example: 'did:key:z6LS...Wa19'
        issuanceDate:
          type: string
          format: date-time
          description: The date and time the credential was issued
          example: '2024-09-26T12:08:18.803Z'
        credentialSubject:
          type: object
          description: The subject of the credential, containing encrypted wallet contents
          properties:
            id:
              type: string
              description: The ID of the credential subject, typically a DID
              example: 'did:key:z6LS...Wa19'
            encryptedWalletContents:
              type: object
              description: The encrypted contents of the wallet
              properties:
                protected:
                  type: string
                  description: The protected header of the encrypted wallet
                  example: 'eyJlbmMiOiJYQzIwUCJ9'
                recipients:
                  type: array
                  items:
                    type: object
                    description: List of recipients who can decrypt the wallet
                    properties:
                      encrypted_key:
                        type: string
                        description: The encrypted key for the recipient
                        example: 'OHwaAnWZThM_lGP-9g_zBSBhbRjOeFEG4LsvTEA5V-5WW63J--Xw4w'
                      header:
                        type: object
                        description: The header information for the recipient
                        properties:
                          kid:
                            type: string
                            description: Key ID of the recipient
                            example: 'did:key:z6LS...Wa19#z6LS...Wa19'
                          alg:
                            type: string
                            description: Algorithm used for encryption
                            example: 'ECDH-ES+A256KW'
                          epk:
                            type: object
                            description: Ephemeral public key used for encryption
                            properties:
                              kty:
                                type: string
                                description: Key type
                                example: 'OKP'
                              crv:
                                type: string
                                description: Curve type
                                example: 'X25519'
                              x:
                                type: string
                                description: Public key value
                                example: '4xA5LWWdfhLed5AUvHPsDAYaxhsMdV4UBw1kN0As1Hs'
                          apu:
                            type: string
                            description: Agreement PartyU Info
                            example: '4xA5LWWdfhLed5AUvHPsDAYaxhsMdV4UBw1kN0As1Hs'
                          apv:
                            type: string
                            description: Agreement PartyV Info
                            example: 'ZGlkOmtleTp6NkxTaFZ0VlJiUlA4REFoZm05ODFyQ244WWhNVFBhZzlWNFNNakN...'
                iv:
                  type: string
                  description: The initialization vector for the encryption
                  example: 'NyMwyU-0QGnaqRVy0u0_Ilae3ETvcZq_'
                ciphertext:
                  type: string
                  description: The encrypted data
                  example: 8MJvLT..._wYO54
                tag:
                  type: string
                  description: Authentication tag for the encrypted wallet
                  example: 'b-fL728NLEZkqz5SEIMI8Q'
    UnsignedVerifiablePresentation:
      description: Verifiable Presentation that is unsigned
      type: object
      properties:
        "@context":
          $ref: '#/components/schemas/Context'
        id:
          type: string
          format: uri
        type:
          type: array
          items:
            type: string
        verifiableCredential:
          oneOf:
            - type: object
              $ref: '#/components/schemas/VerifiableCredential'
            - type: array
              items:
                type: object
                $ref: '#/components/schemas/VerifiableCredential'
    VerifiablePresentation:
      description: Verifiable Presentation that has been signed
      type: object
      properties:
        "@context":
          $ref: '#/components/schemas/Context'
        id:
          type: string
          format: uri
        type:
          type: array
          items:
            type: string
        verifiableCredential:
          oneOf:
            - type: object
              $ref: '#/components/schemas/VerifiableCredential'
            - type: array
              items:
                type: object
                $ref: '#/components/schemas/VerifiableCredential'
        proof:
          oneOf:
            - type: object
              $ref: '#/components/schemas/VerifiableProof'
            - type: array
              items:
                type: object
                $ref: '#/components/schemas/VerifiableProof'
    VerifiableProof:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SigType'
        proofPurpose:
          $ref: '#/components/schemas/ProofPurpose'
        verificationMethod:
          type: string
        created:
          type: string
          format: date-time
        proofValue:
          type: string
    CredentialMetadata:
      type: object
      description: Represents metadata related to a verifiable credential. This includes information about the credential's issuer, issuance and expiration dates, revocation status, and additional properties such as size and subject reference.
      properties:
        id:
          type: string
          format: uri
          description: The unique identifier for the credential, typically a URL pointing to its location or a hash value.
          example: 'https://creds.truvera.io/521bb7...'
        issuerKey:
          type: string
          nullable: true
          description: The DID and key identifier of the issuer that signed the credential. This key is used to verify the authenticity of the credential.
          example: 'did:key:z6Mk...dsmK'
        issuerName:
          type: string
          nullable: true
          description: The profile name of the issuer that signed the credential.
          example: 'Truvera Issuer'
        type:
          type: string
          description: The type of credential.
          example: 'VerifiableCredential'
        revocationRegistry:
          type: string
          description: The registry identifier for revocation information associated with the credential.
          example: 'e6d3...59d1'
        revoked:
          type: boolean
          description: Indicates whether the credential has been revoked. If true, the credential is no longer valid
          example: false
        createdAt:
          type: string
          format: date-time
          description: The date and time when the credential metadata was created.
          example: '2024-09-20T11:13:03.445Z'
        expiryDate:
          type: string
          format: date-time
          nullable: true
          description: The expiration date of the credential.
          example: '2024-09-20T11:13:03.445Z'
        expirationDate:
          type: string
          format: date-time
          nullable: true
          description: Alternative field for the expiration date of the credential.
          example: '2024-09-20T11:13:03.445Z'
        issuanceDate:
          type: string
          format: date-time
          description: The date and time when the credential was issued.
          example: '2024-09-20T11:13:02.648Z'
        byteSize:
          type: integer
          description: The size of the credential in bytes.
          example: 1003
        persist:
          type: boolean
          description: Indicates whether the credential is persisted in storage.
          example: false
        index:
          type: string
          description: A unique index or identifier within a collection of credentials.
          example: '1004'
        subjectRef:
          type: string
          description: A reference to the subject of the credential, typically used to identify the entity to which the credential pertains.
          example: 'Truvera Ref'
        subjectId:
          type: string
          description: The credential subject ID (e.g. holder DID), stored when the team setting is enabled. Useful for filtering credentials by holder.
          example: 'did:dock:5DDtWbr9C5HmK3mcz5HRXKbmf5sSCvAycqzWffVbvg9nq9fk'
        whitelabel:
          type: number
          nullable: true
          description: Indicates if the credential is associated with a specific whitelabel or brand.
          example: null
        algorithm:
          type: string
          description: The algorithm used for creating or signing the credential.
          maxLength: 32
          minLength: 4
          example: "dockbbs"
        credential:
          anyOf:
            - $ref: "#/components/schemas/null_type"
            - $ref: '#/components/schemas/VerifiableCredential'
    VerifiableCredential:
      description: Verifiable (signed) Credential returned by API. The current set of properties is almost complete
      type: object
      properties:
        "@context":
          $ref: '#/components/schemas/Context'
        id:
          type: string
        type:
          type: array
          items:
            type: string
        credentialSubject:
          oneOf:
            - type: object
            - type: array
              items:
                type: object
        issuer:
          oneOf:
            - type: string
              $ref: '#/components/schemas/DID'
            - type: object
        issuanceDate:
          type: string
          format: date-time
        expirationDate:
          type: string
          format: date-time
        credentialStatus:
          description: Revocation registry id or user supplied status object
          oneOf:
            - type: object
            - type: string
        proof:
          oneOf:
            - type: object
              $ref: '#/components/schemas/VerifiableProof'
            - type: array
              items:
                type: object
                $ref: '#/components/schemas/VerifiableProof'
    VerifiableCredentialSchema:
      description: Verifiable Credential Schema
      type: object
      properties:
        '$schema':
          type: string
          description: The schema version, generally following the JSON-schema specification.
          example: 'http://json-schema.org/draft-07/schema#'
        name:
          type: string
          description: Name of the schema.
          example: 'My Schema'
        description:
          type: string
          description: A brief description of the schema.
          example: 'Truvera Schema Example'
        type:
          type: string
          description: Defines the type of schema. Usually 'object'.
          example: 'object'
        properties:
          type: object
          description: The properties that define the schema.
          example:
            id:
              type: 'string'
            emailAddress:
              type: 'string'
              format: 'email'
            alumniOf:
              type: 'string'
        required:
          type: array
          items:
            type: string
          description: Required fields within the schema.
          example:
            - emailAddress
            - alumniOf
        additionalProperties:
          type: boolean
          description: Specifies whether additional properties outside the defined schema are allowed.
          example: true
    VerifiableCredentialSchemaResponse:
      type: object
      properties:
        id:
          type: string
          description: The schema ID
          example: 'https://schema.truvera.io/ExampleSchema-V5-1722512884923.json'
        schema:
          anyOf:
            - $ref: "#/components/schemas/null_type"
            - $ref: '#/components/schemas/VerifiableCredentialSchema'
        uri:
          type: string
          description: The schema URI
          example: 'https://schema.truvera.io/ExampleSchema-V5-1722512884923.json'
        created:
          type: string
          format: date-time
        isOwner:
          type: boolean
          description: Whether the current user is the owner of the schema
          example: true
        ownerName:
          type: string
          description: The owner name
          example: 'Truvera'
        ownerLogo:
          type: string
          description: The owner logo
          example: 'https://logo.truvera.io/owner'
    VerifiableCredentialSchemasResponse:
      type: array
      items:
        $ref: '#/components/schemas/VerifiableCredentialSchemaResponse'
    Registry:
      description: Revocation registry
      type: object
      properties:
        addOnly:
          type: boolean
        policy:
          description: Only one policy supported as of now called `OneOf`
          type: array
          minItems: 1
          uniqueItems: true
          items:
            $ref: '#/components/schemas/DID'
        type:
          type: string
          enum:
            - CredentialStatusList2017 # Deprecated, remove eventually
            - StatusList2021Entry
            - DockVBAccumulator2022
          default: "StatusList2021Entry"
    VerificationResponse:
      description: Whether a credential/presentation/anchor is verified or not
      type: object
      properties:
        verified:
          type: boolean
        results:
          type: array
          items:
            type: object
    Response:
      description: Default response
      type: object
      properties:
        code:
          type: integer
    PaginatedListResponse:
      type: object
      required:
        - total
        - list
      properties:
        total:
          type: integer
        list:
          type: array
          items:
            type: object
    ArrayResponse:
      description: Default response
      type: array
      items:
        type: object
    Template:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
        html:
          type: string
        css:
          type: string
        name:
          type: string
        metadata:
          type: object
    Templates:
      type: array
      items:
        $ref: '#/components/schemas/Template'
    Subaccount:
      type: object
      required:
        - id
        - name
      properties:
        id:
          description: The sub account ID
          type: integer
        name:
          description: The sub account name
          type: string
        email:
          description: The sub account email
          type: string
        image:
          description: The sub account image
          type: string
        createdAt:
          type: string
          format: date-time
          description: The date and time when the subaccount was created
          example: '2024-09-20T11:13:03.445Z'
    SubaccountsList:
      type: object
      properties:
        total:
          type: integer
          description: Total number of subaccounts
          example: 42
        list:
          type: array
          items:
            $ref: '#/components/schemas/Subaccount'
    Subaccounts:
      type: array
      items:
        $ref: '#/components/schemas/Subaccount'
    Profile:
      type: object
      required:
        - did
        - name
      properties:
        did:
          type: string
        name:
          type: string
        logo:
          type: string
    Profiles:
      type: array
      items:
        $ref: '#/components/schemas/Profile'
    ApiKey:
      type: object
      required:
        - key
        - created
        - expires
      properties:
        ips:
          type: array
          items:
            type: string
        alias:
          type: string
          description: The alias of the API key
          example: My API
          nullable: true
          maxLength: 256
        key:
          type: string
        created:
          type: string
        expires:
          type: string
    ApiKeys:
      type: array
      items:
        $ref: '#/components/schemas/ApiKey'
    TemporaryKey:
      type: object
      properties:
        key:
          type: string
        selectedTeamId:
          type: integer
    WebhookCreate:
      type: object
      required:
        - url
        - events
      properties:
        url:
          type: string
          description: The URL to send the webhook to
          example: 'https://webhook.example.io'
        description:
          type: string
          description: The description of the webhook
          example: 'My webhook'
        status:
          type: integer
          description: The status of the webhook (0 = disabled, 1 = enabled)
          enum:
            - 0
            - 1
        events:
          type: array
          items:
            type: string
            description: The events to listen for
            enum:
              - did_create
              - did_update_key
              - did_update_controller
              - did_delete
              - credential_revoke
              - credential_unrevoke
              - registry_create
              - registry_delete
              - schema_create
              - credential_issued
              - presentation_created
              - proof_submitted
              - didcomm_message_received
    ApiWebhook:
      type: object
      required:
        - id
        - url
        - events
        - created
        - status
        - description
        - secret
      properties:
        events:
          type: array
          items:
            type: string
            description: The events to listen for
            enum:
              - did_create
              - did_update_key
              - did_update_controller
              - did_delete
              - credential_revoke
              - credential_unrevoke
              - registry_create
              - registry_delete
              - schema_create
              - credential_issued
              - presentation_created
              - proof_submitted
              - didcomm_message_received
        url:
          type: string
          description: The URL to send the webhook to.
          example: 'https://webhook.example.io'
        id:
          $ref: '#/components/schemas/NumericID'
        created:
          type: string
          description: The timestamp when the webhook was created.
          example: '2024-09-26T12:38:10.871Z'
        secret:
          type: string
          description: The secret token of the webhook.
        description:
          type: string
          description: The description of the webhook.
          example: My Webhook
        status:
          type: integer
          description: The status of the webhook (0 = disabled, 1 = enabled)
          enum:
            - 0
            - 1
    ApiWebhooks:
      type: array
      items:
        $ref: '#/components/schemas/ApiWebhook'
    IndyProofReqAttrSpec:
      type: object
      properties:
        name:
          type: string
          example: favouriteDrink
          description: Attribute name
        names:
          type: array
          description: Attribute name group
          items:
            type: string
            example: age
    ProofRequestPayload:
      type: object
      description: Represents a proof request payload in a verifiable credential system.
      properties:
        attributes:
          type: object
          description: Requested attribute specifications of proof request
          additionalProperties:
            $ref: '#/components/schemas/IndyProofReqAttrSpec'
        name:
          type: string
          description: Proof request name
          example: Proof request
        cedarVerificationPolicy:
          type: string
          description: Optional Cedar policy to run on verification
        template:
          type: string
          format: uuid
          description: The unique identifier for the template.
          example: '37275574-7ea4-438d-b8ef-f8fc61dbf09e'
        nonce:
          type: string
          description: Nonce or challenge for the presentation to match
          example: '1234567890'
        did:
          description: A DID
          $ref: '#/components/schemas/DID'
        request:
          type: object
          description: The actual details of the proof request.
          properties:
            name:
              type: string
              description: The name of the proof request.
              example: 'test request'
            purpose:
              type: string
              description: The purpose of the proof request.
              example: 'my purpose'
            input_descriptors:
              description: Sphereon PEX input descriptors V1
      required:
        - name
    ProofTemplatePayload:
      type: object
      description: Represents a proof template payload in a verifiable credential system.
      properties:
        name:
          type: string
          description: Proof request name
          example: Proof request
        cedarVerificationPolicy:
          type: string
          description: Optional Cedar policy to run on verification
        request:
          type: object
          description: The actual details of the proof request.
          properties:
            name:
              type: string
              description: The name of the proof request.
              example: 'test request'
            purpose:
              type: string
              description: The purpose of the proof request.
              example: 'my purpose'
            input_descriptors:
              description: Sphereon PEX input descriptors V1
        expirationTime:
          description: Expiration time as interval object
          $ref: '#/components/schemas/IntervalObject'
        did:
          description: A DID
          $ref: '#/components/schemas/DID'
      required:
        - name
    IntervalObject:
      type: object
      description: An object to define an interval
      example:
        amount: 1
        unit: months
      properties:
        amount:
          oneOf:
            - type: string
            - type: number
        unit:
          type: string
    ProofRequest:
      type: object
      description: Represents a proof request in a verifiable credential system.
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier for the proof request.
          example: '37275574-7ea4-438d-b8ef-f8fc61dbf09e'
        attributes:
          type: object
          description: Requested attribute specifications of proof request
          additionalProperties:
            $ref: '#/components/schemas/IndyProofReqAttrSpec'
        cedarVerificationPolicy:
          type: string
          description: Optional Cedar policy to run on verification
        name:
          type: string
          description: Proof request name
          example: Proof request
        nonce:
          type: string
          description: Nonce or challenge for the presentation to match
          example: '1234567890'
        qr:
          type: string
          description: QR code deep link for mobile wallet scanning
          example: 'http://creds-testnet.truvera.io/proof/37275574-7ea4-438d-b8ef-f8fc61dbf09e'
        did:
          description: A DID
          $ref: '#/components/schemas/DID'
        verified:
          type: boolean
          description: Indicates whether the proof request has been verified.
          example: false
      required:
        - name
    ProofRequests:
      type: array
      items:
        $ref: '#/components/schemas/ProofRequest'
    ProofTemplate:
      type: object
      required:
        - id
        - created
        - updated
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier for the proof template.
        totalRequests:
          type: integer
          description: The total number of proof requests associated with the template.
          example: 1
        isOwner:
          type: boolean
          description: Whether the current user is the owner of the template
          example: true
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
        did:
          description: A DID
          $ref: '#/components/schemas/DID'
        request:
          type: object
          description: The actual details of the proof request.
          properties:
            name:
              type: string
              description: The name of the proof request.
              example: 'test request'
            purpose:
              type: string
              description: The purpose of the proof request.
              example: 'my purpose'
            input_descriptors:
              description: Sphereon PEX input descriptors V1
        types:
          type: array
          description: An array of types indicating the formats or methods that can be used for the proof.
          items:
            type: string
            example: 'jsonld'
    ProofTemplates:
      type: array
      items:
        $ref: '#/components/schemas/ProofTemplate'
    ProofRequestsHistory:
      type: array
      items:
        allOf:
          - $ref: '#/components/schemas/ProofRequestBaseResponse'
          - type: object
            properties:
              credentialsIssuers:
                type: array
                items:
                  type: object
                  properties:
                    issuerDid:
                      type: string
                    issuerName:
                      type: string
                    issuerLogo:
                      type: string
                    issuerTrustRegistries:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          logoUrl:
                            type: string
    ProofRequestBaseResponse:
      type: object
      required:
        - id
        - created
        - response_url
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier for the proof request.
          example: '37275574-7ea4-438d-b8ef-f8fc61dbf09e'
        attributes:
          type: object
          description: Requested attribute specifications of proof request
          additionalProperties:
            $ref: '#/components/schemas/IndyProofReqAttrSpec'
        name:
          type: string
          description: Proof request name
          example: Proof request
        cedarVerificationPolicy:
          type: string
          description: Optional Cedar policy to run on verification
        nonce:
          type: string
          description: Nonce or challenge for the presentation to match
          example: '1234567890'
        error:
          type: string
        response_url:
          type: string
          format: uri
          description: The URL to send the proof presentation response.
          example: 'http://api-testnet.truvera.io/proof-requests/37275574-7ea4-438d-b8ef-f8fc61dbf09e/send-presentation'
        qr:
          type: string
          description: QR code deep link for mobile wallet scanning
          example: 'http://creds-testnet.truvera.io/proof/37275574-7ea4-438d-b8ef-f8fc61dbf09e'
        did:
          description: A DID
          $ref: '#/components/schemas/DID'
        verified:
          type: boolean
          description: Indicates whether the proof request has been verified.
          example: false
        expired:
          type: boolean
          description: Indicates whether the proof request has expired
          example: false
        presentation:
          type: object
        created:
          type: string
          format: date-time
          description: The timestamp when the proof request was created.
          example: '2024-09-26T12:38:10.871Z'
        updated:
          type: string
          format: date-time
          description: The timestamp when the proof request was last updated.
          example: '2024-09-26T12:38:10.871Z'
        request:
          type: object
          description: The actual details of the proof request.
          properties:
            name:
              type: string
              description: The name of the proof request.
              example: 'test request'
            purpose:
              type: string
              description: The purpose of the proof request.
              example: 'my purpose'
            input_descriptors:
              description: Sphereon PEX input descriptors V1
        type:
          type: string
          description: The type of the request.
          example: 'proof-request'
        types:
          type: array
          description: An array of types indicating the formats or methods that can be used for the proof.
          items:
            type: string
            example: 'jsonld'
    ProofRequestResponse:
      allOf:
        - $ref: '#/components/schemas/ProofRequestBaseResponse'
        - type: object
          properties:
            verifierName:
              type: string
              description: The name of the verifier.
              example: 'Truvera'
            verifierLogo:
              type: string
              description: The logo of the verifier.
              example: 'https://logo.truvera.io/verifier'
    OpenIDAuthProviderOptions:
      type: object
      description: OpenID provider configuration
      properties:
        url:
          type: string
          example: "https://creds.truvera.io/claims"
        scope:
          type: array
          items:
            type: string
          example:
            - "openid"
        clientId:
          type: string
          example: "eyAic2NoZW1hIjogImh0dHBzOi8vZG9ja25ldHdvcmsuZ2l0aHViLmlvL3ZjLXNjaGVtYXMvYmFzaWMtY3JlZGVudGlhbC5qc29uIiwgImNsYWltcyI6IFsibmFtZSJdIH0="
        clientSecret:
          type: string
          example: "gpO2IVK+OALL8W+DcFlIfFhJtNA="
        claimsSource:
          type: string
          enum:
            - idToken
            - userInfo
          default: "idToken"
          example: "idToken"
        requestParameters:
          type: object
          description: Optional extra request parameters passed to the federated OpenID provider, such as login hint
          example:
            login_hint: "user@example.com"
            prompt: "login"
    OpenIDIssuerCreateRequest:
      type: object
      description: Represents the configuration and options to create an OpenID issuer, including credential options, authentication provider details, and claim mappings.
      properties:
        credentialOptions:
          $ref: '#/components/schemas/CredentialIssueRequest'
        authProvider:
          $ref: '#/components/schemas/OpenIDAuthProviderOptions'
        claimMap:
          type: object
          description: Key/value pair mapping for OpenID claims to JSON-LD terms. Can be null/undefined if no 3rd party claims to pull.
          example:
            name: "name"
        singleUse:
          type: boolean
          default: false
          description: Whether or not to expire this issuer (and all URLs related to it) after one credential is issued
          example: false
      required:
        - credentialOptions
    OpenIDIssuer:
      type: object
      description: Represents the configuration and options for an OpenID issuer, including credential options, authentication provider details, and claim mappings.
      properties:
        credentialOptions:
          $ref: '#/components/schemas/CredentialIssueRequest'
        authProvider:
          $ref: '#/components/schemas/OpenIDAuthProviderOptions'
        claimMap:
          type: object
          description: Key/value pair mapping for OpenID claims to JSON-LD terms
          example:
            name: "name"
        singleUse:
          type: boolean
          default: false
        issuer:
          type: string
        protocol:
          type: string
          default: "default"
      required:
        - credentialOptions
    OpenIDIssuers:
      type: array
      items:
        $ref: '#/components/schemas/OpenIDIssuer'
    OpenIDCredentialIssuerConfig:
      type: object
      description: Defines the configuration details for an OpenID credential issuer, including endpoints for authorization, token exchange, and key sets.
      properties:
        authorization_endpoint:
          type: string
          format: uri
          description: The endpoint used by the client to obtain authorization from the resource owner.
          example: 'https://example.com/openid/issuers/b582...173c/authorize'
        token_endpoint:
          type: string
          format: uri
          description: The endpoint used by the client to exchange an authorization grant for an access token.
          example: 'https://example.com/openid/issuers/b582...173c/token'
        jwks_uri:
          type: string
          format: uri
          description: The URI for the JSON Web Key Set, which contains the public keys used to verify tokens.
          example: 'https://example.com/openid/issuers/b582...173c/jwks'
        issuer:
          type: string
          format: uri
          description: The issuer identifier for the authorization server.
          example: 'https://example.com/openid/issuers/b582...173c'
        code_challenge_methods_supported:
          type: array
          description: List of supported code challenge methods for PKCE.
          items:
            type: string
          example:
            - 'S256'
        token_endpoint_auth_signing_alg:
          type: string
          description: The algorithm used for signing at the token endpoint.
          example: 'HS256'
        token_endpoint_auth_signing_alg_values_supported:
          type: array
          description: The list of signing algorithms supported by the token endpoint.
          items:
            type: string
          example:
            - 'HS256'
        request_object_signing_alg_values_supported:
          type: array
          description: Supported signing algorithms for request objects.
          items:
            type: string
          example:
            - 'EdDSA'
            - 'ES256'
        claims_parameter_supported:
          type: boolean
          description: Indicates whether the claims parameter is supported.
          example: true
        claims_supported:
          type: array
          description: List of claims supported by the issuer.
          items:
            type: string
          example:
            - 'sub'
            - 'sid'
            - 'auth_time'
            - 'iss'
        grant_types_supported:
          type: array
          description: List of grant types supported by the authorization server.
          items:
            type: string
          example:
            - 'authorization_code'
        id_token_signing_alg_values_supported:
          type: array
          description: List of signing algorithms supported for ID tokens.
          items:
            type: string
          example:
            - 'HS256'
        response_modes_supported:
          type: array
          description: List of response modes supported by the authorization server.
          items:
            type: string
          example:
            - 'fragment'
            - 'query'
        response_types_supported:
          type: array
          description: List of response types supported by the authorization server.
          items:
            type: string
          example:
            - 'code'
        scopes_supported:
          type: array
          description: List of scopes supported by the authorization server.
          items:
            type: string
          example:
            - 'ldp_vc:MyCredential'
        subject_types_supported:
          type: array
          description: List of subject types supported by the issuer.
          items:
            type: string
          example:
            - 'public'
        token_endpoint_auth_methods_supported:
          type: array
          description: List of supported token endpoint authentication methods.
          items:
            type: string
          example:
            - 'client_secret_basic'
            - 'client_secret_post'
        request_parameter_supported:
          type: boolean
          description: Indicates whether the request parameter is supported.
          example: true
        request_uri_parameter_supported:
          type: boolean
          description: Indicates whether the request URI parameter is supported.
          example: false
        require_request_uri_registration:
          type: boolean
          description: Indicates whether request URI registration is required.
          example: true
        require_signed_request_object:
          type: boolean
          description: Indicates whether a signed request object is required.
          example: true
        credential_supported:
          type: boolean
          description: Indicates whether credential issuance is supported.
          example: true
        dids_supported:
          type: boolean
          description: Indicates whether Decentralized Identifiers (DIDs) are supported.
          example: true
        did_methods_supported:
          type: array
          description: List of DID methods supported by the issuer.
          items:
            type: string
          example:
            - 'did:key:'
            - 'did:web:'
            - 'did:cheqd:'
            - 'did:ebsi:'
        claim_types_supported:
          type: array
          description: List of claim types supported by the issuer.
          items:
            type: string
          example:
            - 'normal'
        credential_formats_supported:
          type: array
          description: List of credential formats supported by the issuer.
          items:
            type: string
          example:
            - 'w3cvc-jsonld'
        credential_claims_supported:
          type: array
          description: List of claims supported within credentials issued by the issuer.
          items:
            type: string
          example:
            - 'id'
            - 'nested.field'
            - 'inheritedField'
            - 'name'
        credential_issuer:
          type: string
          format: uri
          description: The issuer identifier for credential issuance.
          example: 'https://example.com/openid/issuers/b582...173c'
        credential_endpoint:
          type: string
          format: uri
          description: The endpoint used to issue credentials.
          example: 'https://example.com/openid/credential'
        credentials_supported:
          type: array
          description: List of credentials supported by the issuer.
          items:
            type: object
            properties:
              id:
                type: string
                description: The identifier for the credential.
                example: 'ldp_vc:MyCredential'
              format:
                type: string
                description: The format of the credential.
                example: 'ldp_vc'
              scope:
                type: string
                description: The scope associated with the credential.
                example: 'ldp_vc:MyCredential'
              '@context':
                type: array
                description: JSON-LD contexts used in the credential.
                items:
                  type: string
                example:
                  - 'https://www.w3.org/2018/credentials/v1'
              type:
                type: array
                description: The type(s) of the credential.
                items:
                  type: string
                example:
                  - 'VerifiableCredential'
              credentialSubject:
                type: object
                description: The subject of the credential.
                additionalProperties: true
              display:
                type: array
                description: Information about how the credential is displayed.
                items:
                  type: object
                  additionalProperties: true
              cryptographic_binding_methods_supported:
                type: array
                description: Supported cryptographic binding methods.
                items:
                  type: string
                example:
                  - 'binding_method_1'
              cryptographic_suites_supported:
                type: array
                description: Supported cryptographic suites.
                items:
                  type: string
                example:
                  - 'suite_1'
        mdoc_iacas_uri:
          type: string
          format: uri
          description: The URI for mobile driver's license issuance and credential acquisition.
          example: 'https://example.com/openid/mdoc-iacas'
    OpenIDCredentialOfferResponse:
      type: object
      description: The response object for an OpenID Credential Offer request, containing the URL and details of the credential offer.
      properties:
        url:
          type: string
          description: OpenId Credential Offers URL
          example: 'openid-credential-offer://?credential_offer_uri=...'
        offer:
          type: object
          properties:
            credential_issuer:
              type: string
              description: The issuer of the credential
            credentials:
              type: array
              description: The credentials to be issued
              items:
                type: string
                description: The credential id
            request_parameters:
              type: object
              description: Extra request parameters passed to the federated OpenID provider, such as login hint
            grants:
              type: object
              description: OpenID grants
    OpenIDIssuerOpenIDConfig:
      type: object
      description: The OpenID configuration for an issuer, including supported authentication methods, response modes, and token signing algorithms.
      properties:
        authorization_endpoint:
          type: string
          format: uri
          description: The endpoint used by the client to obtain authorization from the resource owner.
          example: 'https://example.com/openid/issuers/e10a...3213/authorize'
        token_endpoint:
          type: string
          format: uri
          description: The endpoint used by the client to exchange an authorization grant for an access token.
          example: 'https://example.com/openid/issuers/e10a...3213/token'
        jwks_uri:
          type: string
          format: uri
          description: The URI for the JSON Web Key Set, which contains the public keys used to verify tokens.
          example: 'https://example.com/openid/issuers/e10a...3213/jwks'
        issuer:
          type: string
          format: uri
          description: The issuer identifier for the authorization server.
          example: 'https://example.com/openid/issuers/e10a...3213'
        code_challenge_methods_supported:
          type: array
          description: List of supported code challenge methods for PKCE.
          items:
            type: string
          example: 
            - 'S256'
        token_endpoint_auth_signing_alg:
          type: string
          description: The algorithm used for signing at the token endpoint.
          example: 'HS256'
        token_endpoint_auth_signing_alg_values_supported:
          type: array
          description: The list of signing algorithms supported by the token endpoint.
          items:
            type: string
          example:
            - 'HS256'
        request_object_signing_alg_values_supported:
          type: array
          description: Supported signing algorithms for request objects.
          items:
            type: string
          example:
            - 'EdDSA'
            - 'ES256'
        claims_parameter_supported:
          type: boolean
          description: Indicates whether the claims parameter is supported.
          example: true
        claims_supported:
          type: array
          description: List of claims supported by the issuer.
          items:
            type: string
          example:
            - 'sub'
            - 'sid'
            - 'auth_time'
            - 'iss'
        grant_types_supported:
          type: array
          description: List of grant types supported by the authorization server.
          items:
            type: string
          example:
            - 'authorization_code'
        id_token_signing_alg_values_supported:
          type: array
          description: List of signing algorithms supported for ID tokens.
          items:
            type: string
          example:
            - 'HS256'
        response_modes_supported:
          type: array
          description: List of response modes supported by the authorization server.
          items:
            type: string
          example:
            - 'form_post'
            - 'fragment'
            - 'query'
        response_types_supported:
          type: array
          description: List of response types supported by the authorization server.
          items:
            type: string
          example:
            - 'code id_token'
            - 'code'
            - 'id_token'
            - 'none'
        scopes_supported:
          type: array
          description: List of scopes supported by the authorization server.
          items:
            type: string
          example:
            - 'openid'
            - 'openid_credential'
        subject_types_supported:
          type: array
          description: List of subject types supported by the issuer.
          items:
            type: string
          example:
            - 'public'
        token_endpoint_auth_methods_supported:
          type: array
          description: List of supported token endpoint authentication methods.
          items:
            type: string
          example:
            - 'client_secret_basic'
            - 'client_secret_post'
        request_parameter_supported:
          type: boolean
          description: Indicates whether the request parameter is supported.
          example: true
        request_uri_parameter_supported:
          type: boolean
          description: Indicates whether the request URI parameter is supported.
          example: false
        require_request_uri_registration:
          type: boolean
          description: Indicates whether request URI registration is required.
          example: true
        require_signed_request_object:
          type: boolean
          description: Indicates whether a signed request object is required.
          example: true
        credential_supported:
          type: boolean
          description: Indicates whether credential issuance is supported.
          example: true
        dids_supported:
          type: boolean
          description: Indicates whether Decentralized Identifiers (DIDs) are supported.
          example: true
        did_methods_supported:
          type: array
          description: List of DID methods supported by the issuer.
          items:
            type: string
          example:
            - 'did:key:'
            - 'did:web:'
            - 'did:cheqd:'
            - 'did:ebsi:'
        claim_types_supported:
          type: array
          description: List of claim types supported by the issuer.
          items:
            type: string
          example:
            - 'normal'
        credential_formats_supported:
          type: array
          description: List of credential formats supported by the issuer.
          items:
            type: string
          example:
            - 'w3cvc-jsonld'
        credential_claims_supported:
          type: array
          description: List of claims supported within credentials issued by the issuer.
          items:
            type: string
          example:
            - 'id'
            - 'nested.field'
            - 'inheritedField'
            - 'name'
    OpenIDIssuerDIDConfig:
      type: object
      description: Configuration for an OpenID issuer's DID, detailing supported methods, cryptographic bindings, and related metadata.
      properties:
        entries:
          type: array
          description: A list of verifiable credentials.
          items:
            type: object
            properties:
              '@context':
                type: array
                description: The JSON-LD context defining the terms used in the credential.
                items:
                  type: string
                example:
                  - 'https://www.w3.org/2018/credentials/v1'
                  - 'https://identity.foundation/.well-known/contexts/did-configuration-v0.2.jsonld'
              type:
                type: array
                description: The type(s) of the credential.
                items:
                  type: string
                example:
                  - 'VerifiableCredential'
                  - 'DomainLinkageCredential'
              issuer:
                type: string
                description: The DID of the entity that issued the credential.
                example: 'did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59'
              issuanceDate:
                type: string
                format: date-time
                description: The date and time when the credential was issued.
                example: '2024-08-20T12:12:53.336Z'
              credentialSubject:
                type: object
                description: The subject of the credential, typically containing the DID of the subject.
                properties:
                  id:
                    type: string
                    description: The DID of the credential subject.
                    example: 'did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59'
                  origin:
                    type: string
                    description: The origin associated with the credential subject.
                    example: 'https://example.com/openid/issuers/2a7a...8b85'
              proof:
                type: object
                description: The proof section of the credential, containing the cryptographic proof.
                properties:
                  type:
                    type: string
                    description: The type of proof used.
                    example: 'Ed25519Signature2018'
                  created:
                    type: string
                    format: date-time
                    description: The date and time when the proof was created.
                    example: '2024-08-20T12:12:53Z'
                  verificationMethod:
                    type: string
                    description: The verification method used to create the proof.
                    example: 'did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1'
                  proofPurpose:
                    type: string
                    description: The purpose of the proof, typically assertionMethod.
                    example: 'assertionMethod'
                  jws:
                    type: string
                    description: The JSON Web Signature (JWS) representing the proof.
                    example: 'eyJhbG...rQcJAQ'
    OID4VPConfig:
      type: object
      description: Configuration for the OpenID for Verifiable Presentations (OID4VP) endpoint, including details on authorization and token endpoints, and supported cryptographic methods.
      properties:
        authorization_endpoint:
          type: string
          format: uri
          description: The endpoint used by the client to obtain authorization from the resource owner.
          example: 'https://example.com/openid/vp/5b40...d96a/authorize'
        token_endpoint:
          type: string
          format: uri
          description: The endpoint used by the client to exchange an authorization grant for an access token.
          example: 'https://example.com/openid/vp/5b40...d96a/token'
        jwks_uri:
          type: string
          format: uri
          description: The URI for the JSON Web Key Set, which contains the public keys used to verify tokens.
          example: 'https://example.com/openid/vp/5b40...d96a/jwks'
        issuer:
          type: string
          format: uri
          description: The issuer identifier for the authorization server.
          example: 'https://example.com/openid/vp/5b40...d96a'
        code_challenge_methods_supported:
          type: array
          description: List of supported code challenge methods for PKCE.
          items:
            type: string
          example: 
            - 'S256'
        token_endpoint_auth_signing_alg:
          type: string
          description: The algorithm used for signing at the token endpoint.
          example: 'HS256'
        token_endpoint_auth_signing_alg_values_supported:
          type: array
          description: The list of signing algorithms supported by the token endpoint.
          items:
            type: string
          example:
            - 'HS256'
        request_object_signing_alg_values_supported:
          type: array
          description: Supported signing algorithms for request objects.
          items:
            type: string
          example:
            - 'EdDSA'
            - 'ES256'
        claims_parameter_supported:
          type: boolean
          description: Indicates whether the claims parameter is supported.
          example: true
        claims_supported:
          type: array
          description: List of claims supported by the issuer.
          items:
            type: string
          example:
            - 'sub'
            - 'sid'
            - 'auth_time'
            - 'iss'
        grant_types_supported:
          type: array
          description: List of grant types supported by the authorization server.
          items:
            type: string
          example:
            - 'authorization_code'
        id_token_signing_alg_values_supported:
          type: array
          description: List of signing algorithms supported for ID tokens.
          items:
            type: string
          example:
            - 'HS256'
        response_modes_supported:
          type: array
          description: List of response modes supported by the authorization server.
          items:
            type: string
          example:
            - 'form_post'
            - 'fragment'
            - 'query'
        response_types_supported:
          type: array
          description: List of response types supported by the authorization server.
          items:
            type: string
          example:
            - 'code id_token'
            - 'code'
            - 'id_token'
            - 'none'
        scopes_supported:
          type: array
          description: List of scopes supported by the authorization server.
          items:
            type: string
          example:
            - 'openid'
            - 'openid_credential'
        subject_types_supported:
          type: array
          description: List of subject types supported by the issuer.
          items:
            type: string
          example:
            - 'public'
        token_endpoint_auth_methods_supported:
          type: array
          description: List of supported token endpoint authentication methods.
          items:
            type: string
          example:
            - 'client_secret_basic'
            - 'client_secret_post'
        request_parameter_supported:
          type: boolean
          description: Indicates whether the request parameter is supported.
          example: true
        request_uri_parameter_supported:
          type: boolean
          description: Indicates whether the request URI parameter is supported.
          example: false
        require_request_uri_registration:
          type: boolean
          description: Indicates whether request URI registration is required.
          example: true
        require_signed_request_object:
          type: boolean
          description: Indicates whether a signed request object is required.
          example: true
        credential_supported:
          type: boolean
          description: Indicates whether credential issuance is supported.
          example: true
        dids_supported:
          type: boolean
          description: Indicates whether Decentralized Identifiers (DIDs) are supported.
          example: true
        did_methods_supported:
          type: array
          description: List of DID methods supported by the issuer.
          items:
            type: string
          example:
            - 'did:key:'
            - 'did:web:'
            - 'did:cheqd:'
            - 'did:ebsi:'
        claim_types_supported:
          type: array
          description: List of claim types supported by the issuer.
          items:
            type: string
          example:
            - 'normal'
    OID4VPJWK:
      type: object
      description: Represents a JSON Web Key (JWK) used in OID4VP, detailing the key type, curve, public key material, and associated algorithms.
      properties:
        kty:
          type: string
          description: The key type (e.g., "OKP", "EC").
          example: 'OKP'
        crv:
          type: string
          description: The curve used with the key (e.g., "Ed25519", "P-256").
          example: 'Ed25519'
        x:
          type: string
          description: The public key material (base64url encoded).
          example: 'Q49t...IT0E'
        y:
          type: string
          description: The y-coordinate for the public key (only for EC keys).
          example: 'afTq...pD3w'
        kid:
          type: string
          description: The key identifier, typically including the DID and key fragment.
          example: 'did:key:z6Mk...MMw48G#z6Mk...MMw48G'
        alg:
          type: string
          description: The algorithm used with the key.
          example: 'EdDSA'
    OID4VPJWKsResponse:
      type: object
      properties:
        keys:
          type: array
          description: A list of cryptographic keys.
          items:
            $ref: '#/components/schemas/OID4VPJWK'
    OpenIDIssuersTokenResponse:
      type: object
      description: The response from an OpenID token endpoint, containing an access token, ID token, and any related credential information.
      properties:
        access_token:
          type: string
          description: The access token issued by the authorization server.
          example: 'df0c70ac-70c3...Qs0IVH4'
        token_type:
          type: string
          description: The type of the token issued, typically "bearer".
          example: 'bearer'
        expires_in:
          type: integer
          description: The lifetime in seconds of the access token.
          example: 86400
        id_token:
          type: string
          description: The ID token representing the identity of the user.
          example: 'eyJhbG...d9ttgM'
        credential:
          type: object
          description: The credential information issued alongside the access token.
          properties:
            data:
              oneOf:
                - type: string
                - type: object
                  $ref: '#/components/schemas/VerifiableCredential'
security:
  - bearerAuth: []
  - accessToken: []
  - nextAuth: []

paths:
  /teams/accept-member-invite:
    post:
      summary: Accept invitation to be a team member
      tags:
        - teams
      requestBody:
        description: Accept invitation token
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - accept_invitation_token
              properties:
                accept_invitation_token:
                  description: The token received in the mail
                  type: string
      responses:
        '200':
          description: Invitation has been accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '400':
          description: Error accepting the invitation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /teams/{id}/invite:
    post:
      summary: Send email invitations to a list of emails
      tags:
        - teams
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: integer
      requestBody:
        description: Emails array
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - emails
              properties:
                emails:
                  description: The emails list
                  type: array
      responses:
        '200':
          description: Invitations have been sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Error sending the invitations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You are not the owner or the administrator of this team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /teams/{id}:
    get:
      summary: Get team data
      tags:
        - teams
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: integer
      responses:
        '200':
          description: Team has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '401':
          description: You are not a part of this team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a Team
      tags:
        - teams
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: integer
      requestBody:
        description: Team JSON object that will be applied
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  description: The new team name
                  type: string
                retentionPolicy:
                  description: The team data retention policy
                  type: object
                storeSubjectRef:
                  description: Whether to store the subject reference in the team
                  type: boolean
      responses:
        '200':
          description: Team has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '400':
          description: Error updating team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You are not the owner or the administrator of this team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  # Disabled
  # /teams/{id}/transfer-ownership:
  #   post:
  #     summary: Transfer ownership of a Team
  #     tags:
  #       - teams
  #     parameters:
  #       - name: id
  #         in: path
  #         required: true
  #         description: An ID
  #         schema:
  #           type: string
  #     requestBody:
  #       description: JSON object that will be applied
  #       required: true
  #       content:
  #         application/json:
  #           schema:
  #             type: object
  #             required:
  #               - new_owner_id
  #             properties:
  #               new_owner_id:
  #                 description: The id of the new owner
  #                 type: string
  #     responses:
  #       '200':
  #         description: Invitation email has been sent
  #         content:
  #           application/json:
  #             schema:
  #               $ref: '#/components/schemas/Response'
  #       '400':
  #         description: Error updating team
  #         content:
  #           application/json:
  #             schema:
  #               $ref: '#/components/schemas/Error'
  # /teams/accept-transfer-ownership:
  #   post:
  #     summary: Accept transfer ownership of a Team
  #     tags:
  #       - teams
  #     requestBody:
  #       description: JSON object that will be applied
  #       required: true
  #       content:
  #         application/json:
  #           schema:
  #             type: object
  #             required:
  #               - accept_token
  #             properties:
  #               accept_token:
  #                 description: The token received with all the needed information
  #                 type: string
  #     responses:
  #       '200':
  #         description: Ownership of the team transferred
  #         content:
  #           application/json:
  #             schema:
  #               $ref: '#/components/schemas/Response'
  #       '400':
  #         description: Error updating team
  #         content:
  #           application/json:
  #             schema:
  #               $ref: '#/components/schemas/Error'
  /teams/{id}/invitations:
    get:
      summary: List all Team Member Invitations
      tags:
        - teams
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: integer
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
        - name: status
          in: query
          description: Filter invitations by status (pending, canceled, accepted)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A paged array of invitations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamMemberInvitations'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /teams/{id}/invitations/{invitation_id}/resend:
    post:
      summary: Resend the invitation email
      tags:
        - teams
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: integer
        - name: invitation_id
          in: path
          required: true
          description: An ID
          schema:
            type: string
      responses:
        '200':
          description: The invitation has been resent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Invitation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You are not the owner or the administrator of this team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /teams/{id}/invitations/{invitation_id}/cancel:
    post:
      summary: Cancel the current invitation
      tags:
        - teams
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: integer
        - name: invitation_id
          in: path
          required: true
          description: An ID
          schema:
            type: string
      responses:
        '200':
          description: The invitation has been canceled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Invitation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You are not the owner or the administrator of this team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /teams/{id}/members:
    get:
      summary: List all Team Members
      tags:
        - teams
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: integer
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of team members
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamMembers'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /teams/{id}/members/{user_id}:
    delete:
      summary: Deletes a single team member
      tags:
        - teams
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: integer
        - name: user_id
          in: path
          required: true
          description: An ID
          schema:
            type: string
      responses:
        '200':
          description: Team member deleted
        '400':
          description: Error deleting team member
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Team member was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You are not the owner or the administrator of this team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a team member
      tags:
        - teams
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: string
        - name: user_id
          in: path
          required: true
          description: An ID
          schema:
            type: string
      requestBody:
        description: Team member JSON object that will be applied
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - role
              properties:
                role:
                  description: The new team member role
                  type: string
                  enum: ['member', 'administrator']
      responses:
        '200':
          description: Team member updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamMember'
        '400':
          description: Error updating team member
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Team member was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You are not the owner or the administrator of this team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subaccounts:
    post:
      summary: Create a Sub-account
      tags:
        - subaccounts
      requestBody:
        description: Subaccount object
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  description: The sub account name
                  type: string
                image:
                  description: The sub account image
                  type: string
      responses:
        '200':
          description: Subaccount has been created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subaccount'
        '400':
          description: Error creating subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      summary: List all Subaccounts
      tags:
        - subaccounts
      parameters:
        - name: newFormat
          in: query
          description: Whether to use updated array format for the response
          required: false
          schema:
            type: boolean
            default: false
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of subaccounts
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Subaccounts'
                  - $ref: '#/components/schemas/SubaccountsList'

  /subaccounts/{id}:
    get:
      summary: Info for a specific sub-account by ID
      tags:
        - subaccounts
      parameters:
        - name: id
          in: path
          required: true
          description: An subaccount ID
          schema:
            type: integer

      responses:
        '200':
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subaccount'
        '400':
          description: Error getting subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Subaccount was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You do not own this subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a sub-account
      tags:
        - subaccounts
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: string
      requestBody:
        description: Subaccount properties
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  description: The sub account name
                  type: string
                image:
                  description: The sub account image
                  type: string
      responses:
        '200':
          description: Subaccount has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subaccount'
        '400':
          description: Error creating subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You do not own this subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Deletes a single sub-account
      tags:
        - subaccounts
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: string
      responses:
        '200':
          description: Subaccount deleted
        '400':
          description: Error deleting subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Subaccount was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You do not own this subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subaccounts/{id}/usage:
    get:
      summary: Lists transaction usage for this sub account
      tags:
        - subaccounts
      parameters:
        - name: id
          in: path
          required: true
          description: An subaccount ID
          schema:
            type: integer
        - name: startTime
          in: query
          description: Timestamp for the start of the range (ISO 8601)
          required: false
          schema:
            type: string
            format: date-time
        - name: endTime
          in: query
          description: Timestamp for the end of the range (ISO 8601)
          required: false
          schema:
            type: string
            format: date-time
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of subaccount transaction usage metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayResponse'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You do not own this subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subaccounts/{id}/keys:
    post:
      summary: Creates an API key for a subaccount
      tags:
        - subaccounts
      parameters:
        - name: id
          in: path
          required: true
          description: An subaccount ID
          schema:
            type: integer
            format: int32
      requestBody:
        description: Subaccount properties
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Subaccoun API key created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Error creating subaccount API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You do not own this subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      summary: List all subaccount keys
      tags:
        - subaccounts
      parameters:
        - name: id
          in: path
          required: true
          description: An ID
          schema:
            type: string
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of subaccount key metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayResponse'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You do not own this subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /subaccounts/{id}/keys/{keyId}:
    delete:
      summary: Deletes a sub-account API key 
      tags:
        - subaccounts
      parameters:
        - name: id
          in: path
          required: true
          description: An subaccount ID
          schema:
            type: integer
            format: int32
        - name: keyId
          in: path
          required: true
          description: An API key ID
          schema:
            type: string
      responses:
        '200':
          description: Subaccount API key deleted
        '400':
          description: Error deleting subaccount API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Subaccount API key was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: You do not own this subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /profiles:
    post:
      summary: Create a Profile
      tags:
        - profiles
      requestBody:
        description: Profile JSON object that will be applied to each issuer object when you create a credential that has an issuer DID profile
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - did
              properties:
                did:
                  description: A DID
                  $ref: '#/components/schemas/DID'
      responses:
        '200':
          description: Profile has been created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Profile'
        '400':
          description: Error creating profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: User does not own profile DID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      summary: List all Profiles
      tags:
        - profiles
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of profiles
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Profiles'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /profiles/{did}:
    get:
      summary: Info for a specific profile by DID
      tags:
        - profiles
      parameters:
        - name: did
          in: path
          required: true
          description: A DID
          schema:
            $ref: '#/components/schemas/DID'
      responses:
        '200':
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Profile'
        '400':
          description: Error getting profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Profile was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a Profile
      tags:
        - profiles
      parameters:
        - name: did
          in: path
          required: true
          description: A DID
          schema:
            $ref: '#/components/schemas/DID'
      requestBody:
        description: Profile JSON object that will be applied to each issuer object when you create a credential that has an issuer DID profile
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - did
              properties:
                did:
                  description: A DID
                  $ref: '#/components/schemas/DID'
      responses:
        '200':
          description: Profile has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Profile'
        '400':
          description: Error creating profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Deletes a single profile based on the supplied value of DID
      tags:
        - profiles
      parameters:
        - name: did
          in: path
          required: true
          description: A DID
          schema:
            $ref: '#/components/schemas/DID'
      responses:
        '200':
          description: Profile Deleted
        '400':
          description: Error deleting profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Profile was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /templates:
    post:
      summary: Create a template
      tags:
        - templates
      requestBody:
        description: Template JSON object
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - html
                - css
                - name
              properties:
                html:
                  description: The HTML content of the template
                  type: string
                css:
                  description: The CSS content of the template
                  type: string
                name:
                  description: The name of the template
                  type: string
      responses:
        '200':
          description: template has been created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
        '400':
          description: Error creating template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: User does not own template DID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      summary: List all templates
      tags:
        - templates
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of templates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Templates'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /templates/{id}:
    get:
      summary: Info for a specific template by DID
      tags:
        - templates
      parameters:
        - name: id
          in: path
          required: true
          description: The template ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
        '400':
          description: Error getting template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: template was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a template
      tags:
        - templates
      parameters:
        - name: id
          in: path
          required: true
          description: A template ID
          schema:
            type: string
      requestBody:
        description: Template JSON object
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - html
                - css
                - name
              properties:
                html:
                  description: The HTML content of the template
                  type: string
                css:
                  description: The CSS content of the template
                  type: string
                name:
                  description: The name of the template
                  type: string
      responses:
        '200':
          description: Template has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
        '400':
          description: Error creating template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Deletes a single template based on ID provided
      tags:
        - templates
      parameters:
        - name: id
          in: path
          required: true
          description: A template ID
          schema:
            type: string
      responses:
        '200':
          description: Template deleted
        '400':
          description: Error deleting template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: template was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /jobs/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: A Job id
        schema:
          $ref: '#/components/schemas/JobId'
    get:
      tags:
        - jobs
      summary: Get Job Status and data
      description: Returns information related to the job being processed and its associated blockchain transaction. On completion or failure, the job data will be updated with a response from the blockchain. More info about [Job Status](https://docs.truvera.io/developer-documentation/truvera-api/jobs)
      responses:
        '200':
          description: Job description is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobDesc'
              example:
                id: '2436'
                result:
                  encodedTx: '0x9101040900d729a93bba53d7f3a4e81d7a3f4e61474d2736cbf4b872af7447342d5eede0c5d729a93bba53d7f3a4e81d7a3f4e61474d2736cbf4b872af7447342d5eede0c500de0e54cef15c9654aef41805b5624e28cd0d00a2cfb274ff4e4f1273dc0ae277'
                  userData: did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651
                  result:
                    InBlock: '0x42a20e7e74001680ff7f1cb1833d5941c641c2961a46d655b72bb36e0dd602d3'
                status: finalized
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Job id was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /dids:
    post:
      tags:
        - dids
      summary: Create DID
      description: Creates a new DID on chain with an auto generated keypair, the controller will be the same as the DID unless otherwise specified. More info about [Create DID](https://docs.truvera.io/developer-documentation/truvera-api/dids)
      requestBody:
        description: Properties of DID
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  default: cheqd
                  type: string
                  enum:
                    - cheqd
                    - dock
                    - key
                did:
                  $ref: '#/components/schemas/DID'
                controller:
                  $ref: '#/components/schemas/DID'
                keyType:
                  $ref: '#/components/schemas/KeyType'
                didcommServiceUrl:
                  type: string
                  format: uri
                  description: Optional custom DIDComm service endpoint URL. If not provided, a default URL will be generated using the server URL and DID. This is not supported for `did:key`.
                  example: "https://api.example.com/messaging/did:cheqd:testnet:abc123/receive"
                includeDidcommService:
                  type: boolean
                  default: true
                  description: Whether to include a DIDComm service endpoint in the DID document. Defaults to true. Set to false to create a DID without DIDComm service endpoint.
              example:
                type: cheqd
                did: did:cheqd:testnet:3b68ef6c-1eea-493e-9fd5-6f51e5a87fa9
                controller: did:cheqd:testnet:3b68ef6c-1eea-493e-9fd5-6f51e5a87fa9
                keyType: 'ed25519'
      responses:
        '200':
          description: DID will be created on the network.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStartedResult'
              example:
                id: "2432"
                data:
                  did: "did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651"
                  controller: "did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651"
        '400':
          description: Invalid params
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict or duplicate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      tags:
        - dids
      summary: List DIDs
      description: Return a list of all DIDs that your user account controls as fully resolved DID documents. More info about [Get DID](https://docs.truvera.io/developer-documentation/truvera-api/dids)
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
        - name: type
          in: query
          description: The type of DID for filtering
          required: false
          schema:
            type: string
      responses:
        '200':
          description: All of a user's DIDs with additional information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DIDsResponse'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /dids/import:
    post:
      tags:
        - dids
      summary: Import DIDs
      description: Import DIDs from JSON objects ([DIDResolutionResponse](https://www.w3.org/TR/did-resolution/) or [Universal Wallet](https://w3c-ccg.github.io/universal-wallet-interop-spec/) format). Supports both encrypted and plaintext wallet exports.
      requestBody:
        description: Import data containing DIDs to import
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  description: Import data - can be DIDResolutionResponse JSON-LD document, universal wallet export, or array of either
                  oneOf:
                    - type: string
                      description: JSON string containing import data
                    - type: object
                      description: Single DID import object
                    - type: array
                      description: Array of DID import objects
                password:
                  type: string
                  description: Password for encrypted wallet imports
                  minLength: 8
              example:
                data:
                  '@context': ['https://w3id.org/wallet/v1', 'https://w3id.org/did-resolution/v1']
                  id: 'did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH'
                  type: ['DIDResolutionResponse']
                  name: 'Imported DID'
                  description: 'A DID imported from JSON'
                  didDocument:
                    '@context': ['https://www.w3.org/ns/did/v1']
                    id: 'did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH'
                    verificationMethod: []
      responses:
        '200':
          description: DIDs imported successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  imported:
                    type: integer
                    description: Number of DIDs successfully imported
                  dids:
                    type: array
                    description: Array of imported DID information
                    items:
                      type: object
                      properties:
                        did:
                          $ref: '#/components/schemas/DID'
                        controller:
                          $ref: '#/components/schemas/DID'
                        keyCount:
                          type: integer
                          description: Number of keys imported for this DID
                        profile:
                          type: object
                          description: DID profile information if available
                          properties:
                            name:
                              type: string
                            description:
                              type: string
              example:
                imported: 1
                dids:
                  - did: 'did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH'
                    controller: 'did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH'
                    keyCount: 1
                    profile:
                      name: 'Imported DID'
                      description: 'A DID imported from JSON'
        '400':
          description: Invalid import data or missing required fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID not found or cannot be resolved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /dids/{did}/ecosystems:
    parameters:
      - name: did
        in: path
        required: true
        description: A DID
        schema:
          $ref: '#/components/schemas/DID'
    get:
      tags:
        - dids
      security: []
      summary: Returns ecosystems that this DID is a participant in
      description: Returns ecosystems that this DID is a participant in
      responses:
        '200':
          description: Ecosystems list that the DID participates in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryPublicList'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /dids/{did}/export:
    parameters:
      - name: did
        in: path
        required: true
        description: A DID
        schema:
          $ref: '#/components/schemas/DID'
    post:
      tags:
        - dids
      summary: Export DID document and keys
      description: Exports the DID document and keys as an encrypted Universal Wallet JSON-LD document
      requestBody:
        description: A password to encrypt the result with
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  maxLength: 128
                  minLength: 2
              example:
                password: 'astrongpassword'
      responses:
        '200':
          description: An encrypted Universal Wallet document containing the DID and its keypairs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EncryptedWallet'
        '400':
          description: Invalid params
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /dids/{did}/metadata:
    parameters:
      - name: did
        in: path
        required: true
        description: A DID
        schema:
          $ref: '#/components/schemas/DID'
    get:
      tags:
        - dids
      summary: Get DID metadata
      description: Returns the metadata for your DID

      responses:
        '200':
          description: The DIDDoc
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  jobId:
                    anyOf:
                      - $ref: "#/components/schemas/null_type"
                      - $ref: '#/components/schemas/JobId'
                example:
                  id: "did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651"
                  jobId: "0"
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /dids/{did}:
    parameters:
      - name: did
        in: path
        required: true
        description: A DID
        schema:
          $ref: '#/components/schemas/DID'
    get:
      tags:
        - dids
      summary: Get DID
      description: Returns the complete information about the provided "did" which is provided via parameters text box. More info about [Get DID](https://docs.truvera.io/developer-documentation/truvera-api/dids)

      responses:
        '200':
          description: The DIDDoc
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DIDDoc'
              example:
                '@context': "https://www.w3.org/ns/did/v1"
                id: "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59"
                authentication:
                  "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1"
                assertionMethod:
                  "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1"
                publicKey:
                  - id: "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1"
                    type: "Sr25519VerificationKey2020"
                    controller: "ddid:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59"
                    publicKeyBase58: "BFHGE7DyTM5HtAKz58pkJN4evS4yRtDMYaxqRYtzT5nj"
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - dids
      summary: Delete DID
      description: Deletes a provided DID from the blockchain, further attempts to resolve this DID will fail. More info about [Delete DID](https://docs.truvera.io/developer-documentation/truvera-api/dids)
      parameters:
        - name: fromBlockchain
          in: query
          required: false
          description: Whether to delete the DID from the blockchain (true) or just from the user's account (false). Defaults to true for backward compatibility.
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Will remove DID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStartedResult'
              example:
                id: "2430"
                data:
                  "status": "pending"
        '404':
          description: DID does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Something went wrong with deleting the DID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /credentials:
    get:
      tags:
        - credentials
      summary: List Credentials
      description: Get all credential metadata
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 100)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 100
        - name: filter
          in: query
          description: Filter by specific Credential ID, Subject Ref, Subject ID, Issuer, Type, Created Date or Issue Date
          required: false
          schema:
            type: string
        - name: subjectId
          in: query
          description: Filter credentials by an exact credential subject ID (holder DID). Useful for finding all credentials issued to a specific holder.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The request was successful and will return the credential metadata.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CredentialMetadata'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - credentials
      summary: Issue a Credential
      description: Creates and issues a verifiable credential with supplied data. More info about [Issue a Credential](https://docs.truvera.io/developer-documentation/truvera-api/credentials)
      requestBody:
        description: A credential issue request body for one credential
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CredentialIssueRequest'
      responses:
        '200':
          description: The request was successful and returns the created Verifiable Credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifiableCredential'
              example:
                '@context':
                  - https://www.w3.org/2018/credentials/v1
                  - https://www.w3.org/2018/credentials/examples/v1
                id: http://example.com/123
                type:
                  - VerifiableCredential
                  - UniversityDegreeCredential
                credentialSubject:
                  id: did:sample:subject2
                  degree:
                    type: BachelorDegree
                    name: Bachelor of Science and Arts
                issuanceDate: '2020-08-24T14:15:22Z'
                proof:
                  type: Sr25519Signature2020
                  created: '2022-01-14T19:45:12Z'
                  verificationMethod: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1
                  proofPurpose: assertionMethod
                  proofValue: z7zTs4pVjGyj68WwsnJ6bCoK2CnWFBW5xmSBin7LxcgoYfzET4YXAZcTF9qQBTVhfVC5hK4FUWp9XAedq8Tep8J6
                issuer: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
        '400':
          description: The request was unsuccessful, because of invalid/insufficient credential params.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The request was unsuccessful, either because the authorization token was missing/invalid or you don't own the DID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /credentials/request-claims:
    get:
      tags:
        - credentials
      summary: List Credentials
      description: Lists all created request claims that are open
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of OpenID issuers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDIssuers'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - credentials
      summary: Issue a Credential after requesting claims from the user
      description: Creates and issues a verifiable credential with supplied data + claims from the user.
      requestBody:
        description: A credential issue request body for one credential
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                singleUse:
                  type: boolean
                  default: true
                schema:
                  type: string
                  example: "https://docknetwork.github.io/vc-schemas/basic-credential.json"
                claims:
                  type: array
                  items:
                    type: string
                    example: 'name'
                credentialOptions:
                  $ref: '#/components/schemas/CredentialIssueRequest'
      responses:
        '200':
          description: OpenID issuer and claim request created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDIssuer'
        '400':
          description: The request was unsuccessful, because of invalid/insufficient credential parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /credentials/{id}/revoke:
    parameters:
      - name: id
        in: path
        required: true
        description: The ID of the credential (as a full URI).
        schema:
          $ref: '#/components/schemas/URI'
    post:
      tags:
        - credentials
      summary: Revoke a credential with a given ID
      description: Revoke a credential with a given ID
      responses:
        '200':
          description: Revocation was successful
          content:
            application/json:
              schema:
                type: object
              example:
                success: true
        '400':
          description: Invalid/insufficient credential params.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Registry or credential not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /credentials/{id}/unrevoke:
    parameters:
      - name: id
        in: path
        required: true
        description: The ID of the credential (as a full URI).
        schema:
          $ref: '#/components/schemas/URI'
    post:
      tags:
        - credentials
      summary: Unrevoke a credential with a given ID
      description: Unrevoke a credential with a given ID
      responses:
        '200':
          description: Revocation was successful
          content:
            application/json:
              schema:
                type: object
              example:
                success: true
        '400':
          description: Invalid/insufficient credential params.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Registry or credential not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /credentials/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: The ID of the credential (as a full URI).
        schema:
          $ref: '#/components/schemas/URI'
      - name: password
        in: query
        required: false
        description: The encryption password used when issuing/storing the credential
        schema:
          type: string
          maxLength: 64
          minLength: 4
    get:
      tags:
        - credentials
      summary: Get credential metadata and contents if persistent
      description: Get credential metadata and contents if persistent
      responses:
        '200':
          description: The request was successful and will return the credential metadata and its JSON contents (if password was supplied).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialMetadata'
        '404':
          description: Credential was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Error retrieving the credential
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - credentials
      summary: Delete a Credential
      description: Deletes all credential metadata and contents from the client. More info about [Delete Credentials](https://docs.truvera.io/developer-documentation/truvera-api/credentials)
      responses:
        '200':
          description: Credential has been deleted.
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Credential was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Error retrieving the credential
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /verify:
    post:
      tags:
        - verify
      summary: Verify a credential or presentation
      description: Verifies a VCDM credential or presentation as JSON or JWT string. More info about [Verify Credentials/Presentations](https://docs.truvera.io/developer-documentation/truvera-api/presentations)
      requestBody:
        description: JSON verifiable presentation
        required: true
        content:
          application/json:
            # TODO: restore this when the openapivalidator supports it
            # schema:
            #   oneOf:
            #     - type: object
            #       $ref: '#/components/schemas/VerifiablePresentation'
            #     - type: object
            #       $ref: '#/components/schemas/UnsignedVerifiablePresentation'
            schema:
              type: object
            example:
              $ref: '#/components/schemas/VerifiablePresentation'
      responses:
        '200':
          description: The verification result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationResponse'
              example:
                verified: true
                results:
                  - proof:
                      '@context':
                        - https://www.w3.org/2018/credentials/v1
                        - https://www.w3.org/2018/credentials/examples/v1
                      type: Sr25519Signature2020
                      created: '2022-01-14T19:45:12Z'
                      verificationMethod: did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651#keys-1
                      proofPurpose: assertionMethod
                      proofValue: z7zTs4pVjGyj68WwsnJ6bCoK2CnWFBW5xmSBin7LxcgoYfzET4YXAZcTF9qQBTVhfVC5hK4FUWp9XAedq8Tep8J6
                    verified: true
                    verificationMethod:
                      '@context': https://w3id.org/security/v2
                      id: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1
                      type: sec:Sr25519VerificationKey2020
                      controller:
                        id: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
                        assertionMethod:
                          - did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1
                        authentication:
                          - did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1
                        publicKey: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1
                      publicKeyBase58: HLc4pieaW9njdLk6zitziVYU7LgVpqKDxDrDRCJCB1er
        '400':
          description: Invalid/insufficient credential params.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
 
  /proof-templates:
    get:
      summary: List all proof templates
      tags:
        - presentations
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of proof templates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProofTemplates'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - presentations
      summary: Create a new proof template
      description: Create a proof template
      requestBody:
        description: Proof template object
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProofTemplatePayload'
      responses:
        '200':
          description: Proof request template created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProofTemplate'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /proof-templates/{id}/history:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof template UUID
        schema:
          type: string
          format: uuid
      - name: verified
        in: query
        description: Whether the presentation was verified or not
        required: false
        schema:
          type: boolean
      - name: offset
        in: query
        description: How many items to offset by for pagination
        required: false
        schema:
          type: integer
          format: int32
          default: 0
          minimum: 0
      - name: limit
        in: query
        description: How many items to return at one time (max 64)
        required: false
        schema:
          type: integer
          format: int32
          default: 64
          minimum: 1
          maximum: 64
    get:
      tags:
        - presentations
      summary: Gets the proof requests from this template
      responses:
        '200':
          description: Returns the information about the proof request history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProofRequestsHistory'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof template was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - presentations
      summary: Deletes all the history for this proof template
      description: Deletes all the history for this proof template
      responses:
        '200':
          description: Proof requests have been deleted
        '400':
          description: Something went wrong.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof template was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /proof-templates/{id}/request:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof template UUID
        schema:
          type: string
          format: uuid
    post:
      tags:
        - presentations
      summary: Creates proof request
      description: Creates a proof request from this template
      requestBody:
        description: Specify optional nonce and verifier DID
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                nonce:
                  type: string
                  description: A unique nonce value used in the proof request.
                  example: '123456'
                did:
                  description: The DID that will be used as the verifier DID in the proof request
                  $ref: '#/components/schemas/DID'
      responses:
        '200':
          description: Returns the information about the proof request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProofRequestResponse'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof template was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /proof-templates/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof template UUID
        schema:
          type: string
          format: uuid
    get:
      tags:
        - presentations
      summary: Get proof templates
      description: Get the details of an existing proof templates
      responses:
        '200':
          description: Returns the information about the proof templates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProofTemplate'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof templates was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a proof template
      tags:
        - presentations
      requestBody:
        description: Proof template object
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProofTemplatePayload'
      responses:
        '200':
          description: Profile has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProofTemplate'
        '400':
          description: Error creating profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof templates was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - presentations
      summary: Delete proof templates
      description: Deletes the proof templates and associated data
      responses:
        '200':
          description: Proof templates will be deleted
        '400':
          description: Something went wrong.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof templates was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /proof-requests:
    get:
      summary: List all proof requests
      tags:
        - presentations
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of proof requests
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProofRequestBaseResponse'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - presentations
      summary: Create a new proof request
      description: Create a proof request
      requestBody:
        description: Proof request object
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProofRequestPayload'
      responses:
        '200':
          description: Proof request created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProofRequestResponse'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /proof-requests/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof request UUID
        schema:
          type: string
          format: uuid
    get:
      security: [ {}, bearerAuth: [], accessToken: []]
      tags:
        - presentations
      summary: Get proof request
      description: Get the details of an existing proof request
      responses:
        '200':
          description: Returns the information about the proof request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProofRequestResponse'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof request was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - presentations
      summary: Delete proof request
      description: Deletes the proof request and associated data
      responses:
        '200':
          description: Proof request will be deleted
        '400':
          description: Something went wrong.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof request was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /proof-requests/{id}/send-presentation:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof request UUID
        schema:
          type: string
          format: uuid
    post:
      security: []
      tags:
        - presentations
      summary: Sends presentation to proof request
      description: Sends a presentation to the request
      requestBody:
        description: Specify action and credential ids
        required: true
        content:
          application/json:
            # TODO: restore this when the openapivalidator supports it
            # schema:
            #   oneOf:
            #     - type: object
            #       $ref: '#/components/schemas/VerifiablePresentation'
            #     - type: object
            #       $ref: '#/components/schemas/UnsignedVerifiablePresentation'
            schema:
              type: object
            example:
              $ref: '#/components/schemas/VerifiablePresentation'
      responses:
        '200':
          description: Proof request accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProofRequestResponse'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof request was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /proof-requests/{id}/pex:
    get:
      security: []
      tags:
        - presentations
      summary: Get the proof request PEX definition
      description: Get the proof request PEX definition
      parameters:
        - name: id
          in: path
          required: true
          description: OpenID issuer UUID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The proof request PEX definition
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /registries:
    post:
      tags:
        - registries
      summary: Create Registry
      description: Create a Revocation registry on the blockchain. More info about [Registry Creation](https://docs.truvera.io/developer-documentation/truvera-api/registries)
      requestBody:
        description: Specify action and credential ids
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Registry'
            example:
              addOnly: false
              policy:
                - 'did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59'
              type: StatusList2021Entry
      responses:
        '200':
          description: Registry will be created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStartedResult'
              example:
                id: '2539'
                data:
                  id: 4a94feb9c5b13756540148b94a984e04e308e3cbe2c8ef4174b676d9b3d08a84
                  policy:
                    type: OneOf
                    policy:
                      - did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
                    addOnly: false

        '400':
          description: Invalid params like policy not supported.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      tags:
        - registries
      summary: List Registries
      description: Get all registries created by user. More info about [List Registries](https://docs.truvera.io/developer-documentation/truvera-api/registries#list-registries)
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
        - name: did
          in: query
          description: DID exists in policy filter
          required: false
          schema:
            type: string
        - name: type
          in: query
          description: Registry type filter
          required: false
          schema:
            type: string
      responses:
        '200':
          description: All registries by user
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      $ref: '#/components/schemas/Hex32'
                    registry:
                      $ref: '#/components/schemas/Registry'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /registries/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Registry Id
        schema:
          $ref: '#/components/schemas/Hex32'
    get:
      tags:
        - registries
      summary: Get Registry
      description: Get the details of an existing registry, such as policy, add-only status, when it was last updated, and controller(s). More info about [Get Registry](https://docs.truvera.io/developer-documentation/truvera-api/registries#get-registry)
      responses:
        '200':
          description: Returns the information about provided registry ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
              example:
                id: 4a94feb9c5b13756540148b94a984e04e308e3cbe2c8ef4174b676d9b3d08a87
                policy_and_type:
                  type: OneOf
                  policy:
                    - did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
                  addOnly: false
                registry_type: StatusList2021Entry
                created_at: '2022-01-17T18:37:07.780Z'
                job_id: '2539'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

        '404':
          description: Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - registries
      summary: Delete Registry
      description: A registry can be deleted, leading to all the corresponding revocation ids being deleted as well. More info about [Registry Deletion](https://docs.truvera.io/developer-documentation/truvera-api/registries#delete-registry)
      responses:
        '200':
          description: Revocation Registry will be deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStartedResult'
              example:
                id: '938'
                data:
                  id: 6151e62d7e03bc4012fde0595cfdb0d140e463a2f0ad5a431ff47243374bc611
                  hexId: 6151e62d7e03bc4012fde0595cfdb0d140e463a2f0ad5a431ff47243374bc612
                  lastModified: 4226296

        '400':
          description: Something went wrong.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - registries
      summary: Revoke/Unrevoke Credential
      description: Credential revocation is managed with on-chain revocation registries. To revoke a credential, its id (or hash of its id) must be added to the credential. More info about [Revoke/Unrevoke Credentials](https://docs.truvera.io/developer-documentation/truvera-api/registries#revoke-unrevoke-credential)
      requestBody:
        description: Specify action and credential ids
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  default: revoke
                  type: string
                  enum:
                    - revoke
                    - unrevoke
                credentialIds:
                  type: array
                  minItems: 1
                  uniqueItems: true
                  items:
                    type: string
                    format: uri
            example:
              action: revoke
              credentialIds:
                - https://credentials.truvera.io/3e343b80ebaefb40d8f9d99ec27a885e

      responses:
        '200':
          description: Will try to revoke/unrevoke the credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStartedResult'
              example:
                id: '2541'
                data:
                  revokeIds:
                    - '0xaff1aa6770d43d684690c0ad679a8608d5b7576feb3fdc1d6712decf73ca44e'
        '400':
          description: Invalid params
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /revocationStatus/{regId}/{revId}:
    parameters:
      - name: regId
        in: path
        required: true
        description: Revocation registry id
        schema:
          $ref: '#/components/schemas/Hex32'
      - name: revId
        in: path
        required: true
        description: Credential revocation id
        schema:
          type: string
          maxLength: 2048
    get:
      tags:
        - revocationStatus
      summary: Get Revocation Status
      description: Get the revocation status of a credential. More info about [Revocation Status](https://docs.truvera.io/developer-documentation/truvera-api/revocation-status)
      responses:
        '200':
          description: Returns true if credential is revoked, otherwise false is returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: boolean
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /delegatable-revocations/{registryId}:
    parameters:
      - name: registryId
        in: path
        required: true
        description: Delegatable revocation registry id
        schema:
          $ref: '#/components/schemas/Hex32'
    post:
      tags:
        - delegatableRevocation
      summary: Create or update delegatable revocation status
      description: Marks the delegated credential id as revoked or unrevoked. A revoke call creates registry state implicitly.
      security:
        - sponsorKey: []
      requestBody:
        description: Delegatable revocation action payload
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DelegatableRevocationControlRequest'
            example:
              action: revoke
              credentialId: https://example.com/delegated/credential/1
      responses:
        '200':
          description: Delegatable revocation action applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegatableRevocationControlResponse'
        '400':
          description: Invalid params
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /delegatable-revocations/{registryId}/status-list-credential:
    parameters:
      - name: registryId
        in: path
        required: true
        description: Delegatable revocation registry id
        schema:
          $ref: '#/components/schemas/Hex32'
    get:
      tags:
        - delegatableRevocation
      summary: Get delegated StatusList2021Credential
      description: Returns a StatusList2021Credential-compatible document for delegated credential revocation checks.
      security: []
      responses:
        '200':
          description: Delegatable status list credential document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegatableStatusList2021Credential'
        '404':
          description: Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Invalid params
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /revocationStatus/{regId}/{revId}/witness:
    parameters:
      - name: regId
        in: path
        required: true
        description: Revocation registry id
        schema:
          $ref: '#/components/schemas/Hex32'
      - name: revId
        in: path
        required: true
        description: Credential revocation id
        schema:
          type: string
          maxLength: 2048
    get:
      tags:
        - revocationStatus
      summary: Get Revocation Status Witness
      description: Get the revocation status witness of a BBS+ credential. More info about [Revocation Status](https://docs.truvera.io/developer-documentation/truvera-api/revocation-status)
      responses:
        '200':
          description: Returns the membership witness of a BBS+ credential.
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Membership witness was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: This registry does not support membership witnesses.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /delegation-rules:
    post:
      tags:
        - delegationRules
      summary: Create Delegation Rule Set
      description: Creates a delegation rule set with a display name and stores its policy document as a timestamped version using policy createdAt.
      requestBody:
        description: Delegation rule set payload
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DelegationRulesRequest'
      responses:
        '200':
          description: Delegation rule set created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegationRuleSet'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict or duplicate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      tags:
        - delegationRules
      summary: List Delegation Rule Sets
      description: Returns delegation rule sets for the authenticated account, optionally filtered by schema id.
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
        - name: schemaId
          in: query
          description: Optional schema id to filter by
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Delegation rule sets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegationRulesList'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /delegation-rules/{policyId}:
    parameters:
      - name: policyId
        in: path
        required: true
        description: A delegation policy id
        schema:
          type: string
    get:
      tags:
        - delegationRules
      summary: Get Delegation Rule Set
      description: Returns the latest delegation policy version for a policy id, or a specific timestamped version when createdAt is supplied.
      parameters:
        - name: createdAt
          in: query
          required: false
          description: Version timestamp (YYYY-MM-DD)
          schema:
            type: string
            format: date
      responses:
        '200':
          description: Delegation rule set
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegationRuleSet'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Delegation rule was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - delegationRules
      summary: Delete Delegation Rule Set
      description: Deletes a delegation rule set and all of its versions.
      responses:
        '200':
          description: Delegation rule set deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '404':
          description: Delegation rule was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /schemas:
    post:
      tags:
        - schemas
      summary: Create Credential Schema
      description: Creates a JSON schema on the blockchain. More info about [Schema Creation](https://docs.truvera.io/developer-documentation/truvera-api/credential-schemas#create-schema)
      requestBody:
        description: JSON-schema
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifiableCredentialSchema'
      responses:
        '200':
          description: Schema will be created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStartedResult'
              example:
                id: '2549'
                data:
                  id: 1a678fe6973f34d2a5c016cbff347161b9a595f5cc44a3e15f1eca2a404f294a
                  schema:
                    $schema: http://json-schema.org/draft-07/schema#
                    description: Truvera Schema Example
                    type: object
                    properties:
                      id:
                        type: string
                      emailAddress:
                        type: string
                        format: email
                      alumniOf:
                        type: string
                    required:
                      - emailAddress
                      - alumniOf
                    additionalProperties: false
        '400':
          description: Invalid params like size not supported or not JSON.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      tags:
        - schemas
      summary: List Schemas
      description: Get all schemas created by user. More info about [List Schemas](https://docs.truvera.io/developer-documentation/truvera-api/credential-schemas#list-schemas)
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
        - name: includeEcosystems
          in: query
          description: Whether to include ecosystems or not
          required: false
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: All schemas by user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifiableCredentialSchemasResponse'
              example:
                [
                  {
                    "id": "db0c559035226419b4061d7c725a6d7d8aeebd3acf784fd0d69c9a033f29a8d1",
                    "schema": {
                      "$schema": "http://json-schema.org/draft-07/schema#",
                      "description": "Truvera Schema Example",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "emailAddress": {
                          "type": "string",
                          "format": "email"
                        },
                        "alumniOf": {
                          "type": "string"
                        },
                        "birthDate": {
                          "type": "string",
                          "format": "date"
                        }
                      },
                      "required": [
                          "emailAddress",
                          "alumniOf"
                      ],
                      "additionalProperties": false
                    },
                    "author": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
                    "uri": "https://schema.truvera.io/myschema.json"
                  },
                  {
                    "id": "f408d91da3ebab27f2d50150f7cf54ab14099b3ab5f53e2cbf208a90d6adbfd7",
                    "schema": {
                      "$schema": "http://json-schema.org/draft-07/schema#",
                      "description": "Truvera Schema Example",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "emailAddress": {
                          "type": "string",
                          "format": "email"
                        },
                        "alumniOf": {
                          "type": "string"
                        },
                        "birthDate": {
                          "type": "string",
                          "format": "date"
                        }
                      },
                      "required": [
                          "emailAddress",
                          "alumniOf"
                      ],
                      "additionalProperties": false
                    },
                    "author": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
                    "uri": "https://schema.truvera.io/myschema.json"
                  },
                  {
                    "id": "37ad6cf1c51a33ba25f50a8f106e2b06f9e1963296c5bfd914c0d71b7bad42e6",
                    "schema": {
                      "$schema": "http://json-schema.org/draft-07/schema#",
                      "description": "Truvera Schema Example",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "emailAddress": {
                          "type": "string",
                          "format": "email"
                        },
                        "alumniOf": {
                          "type": "string"
                        },
                        "birthDate": {
                          "type": "string",
                          "format": "date"
                        }
                      },
                      "required": [
                          "emailAddress",
                          "alumniOf"
                      ],
                      "additionalProperties": false
                    },
                    "author": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
                    "uri": "https://schema.truvera.io/myschema.json"
                  }
                ]
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /schemas/{schemaId}:
    parameters:
      - name: schemaId
        in: path
        required: true
        description: A schema id
        schema:
          type: string
          maxLength: 2048
    get:
      tags:
        - schemas
      summary: Get Schema
      description: Returns the JSON schema for a specific ID. More info about [Get Schema By ID](https://docs.truvera.io/developer-documentation/truvera-api/credential-schemas#get-schema)
      responses:
        '200':
          description: Schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifiableCredentialSchemaResponse'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Schema was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - schemas
      summary: Delete Schema
      description: Deletes a schema from the database
      responses:
        '200':
          description: Schema has been deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStartedResult'
              example:
                id: "2434"
                data:
                  "status": "pending"
        '404':
          description: Schema does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Something went wrong with deleting the schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something went wrong with deleting the schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /data/notifications:
    get:
      summary: List all notifications for your account
      tags:
        - data
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
        - name: read
          in: query
          description: Whether to return read/unread items, or all if not provided
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: A paged array of notifications
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Notifications'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /data/profile:
    get:
      summary: Gets your user profile
      tags:
        - data
      responses:
        '200':
          description: Your user profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserProfile'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Updates your user profile metadata
      tags:
        - data
      requestBody:
        description: User profile metadata
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserProfile'
      responses:
        '200':
          description: User profile has been updated
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /data/notifications/mark-read:
    post:
      summary: Marks all pending notifications as read
      tags:
        - data
      responses:
        '200':
          description: Latest notifications have been marked as read
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /data/onboarding:
    post:
      security: [ nextAuth: []]
      summary: Certs internal route, not for typical usage. Submits onboarding information for new accounts.
      tags:
        - data
      requestBody:
        description: User profile metadata
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /data/limits:
    get:
      tags:
        - data
      description: Gets the plan limits for your account
      responses:
        '200':
          description: Account paid plan limits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Error getting account limits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /data/history:
    get:
      tags:
        - data
      description: Gets the call history for your account
      responses:
        '200':
          description: Account paid calls history by date
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayResponse'
        '400':
          description: Error getting account history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /data/transactions:
    get:
      tags:
        - data
      description: Gets the transactions for your account
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: Account transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedListResponse'
        '400':
          description: Error getting account transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /data/stats:
    get:
      tags:
        - data
      description: Gets some statistics for your account
      responses:
        '200':
          description: Account statistics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Error getting account statistics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /data/delete:
    post:
      tags:
        - data
      description: Deletes all data stored on our servers (credentials, dids, profiles, etc - not authentication/account data).
      requestBody:
        description: Enter the account email as validation for deletion
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                validation:
                  type: string
      responses:
        '200':
          description: Data has been deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Data could not be deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /data/accountdelete:
    post:
      tags:
        - data
      description: WARNING - Deletes your entire account! this is a two step process that requires getting a token then re-submitting that token as validation
      requestBody:
        description: Enter the token as validation for deletion
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                validation:
                  type: string
      responses:
        '200':
          description: Account has been deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Account could not be deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  # /graphql:
  #   get:
  #     tags:
  #       - data
  #     description: GraphQL query endpoint
  #     parameters:
  #       - name: query
  #         in: query
  #         description: GraphQL query
  #         required: false
  #         schema:
  #           type: string
  #     responses:
  #       '200':
  #         description: Query successful
  #         content:
  #           application/json:
  #             schema:
  #               $ref: '#/components/schemas/Response'

  #   post:
  #     tags:
  #       - data
  #     description: GraphQL query endpoint
  #     requestBody:
  #       description: Enter the token as validation for deletion
  #       required: false
  #       content:
  #         application/json:
  #           schema:
  #             type: object
  #     responses:
  #       '200':
  #         description: Query successful
  #         content:
  #           application/json:
  #             schema:
  #               $ref: '#/components/schemas/Response'
  #       '400':
  #         description: Query failed
  #         content:
  #           application/json:
  #             schema:
  #               $ref: '#/components/schemas/Error'
  /keys:
    get:
      summary: List all keys
      tags:
        - keys
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeys'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Create a key
      tags:
        - keys
      requestBody:
        description: Key metadata
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ips:
                  type: array
                  items:
                    type: string
                alias:
                  type: string
                  description: A human-readable name for the key
                  example: My Key
                  nullable: true
                  maxLength: 256
      responses:
        '200':
          description: Key has been created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiKey'
                  - type: object
                    required:
                      - jwt
                    properties:
                      jwt:
                        type: string
        '400':
          description: Something went wrong.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /keys/{publicKey}:
    delete:
      summary: Delete a key
      tags:
        - keys
      parameters:
        - name: publicKey
          in: path
          required: true
          description: A public key
          schema:
            type: string
      responses:
        '200':
          description: Key has been deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  revoked:
                    type: boolean
        '400':
          description: Something went wrong.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Key was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a key
      tags:
        - keys
      parameters:
        - name: publicKey
          in: path
          required: true
          description: A public key
          schema:
            type: string
      requestBody:
        description: Key metadata
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ips:
                  type: array
                  items:
                    type: string
                alias:
                  type: string
                  description: A human-readable name for the key
                  example: My Key
                  nullable: true
                  maxLength: 256
      responses:
        '200':
          description: Key has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '400':
          description: Something went wrong.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Key was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /keys/temporary-key:
    post:
      security: [ nextAuth: []]
      summary: Certs internal route, not for typical usage. Generates a temporary key
      tags:
        - keys
      requestBody:
        description: Selected team id
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                subaccount:
                  type: integer
                selectedTeamId:
                  type: integer
                isTestmode:
                  type: boolean
      responses:
        '200':
          description: Temporary key has been created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporaryKey'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /messaging/encrypt:
    post:
      tags:
        - messaging
      description: Messaging encrypt
      requestBody:
        description: The recipients, sender and message
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - payload
                - senderDid
                - recipientDids
              properties:
                type:
                  type: string
                payload:
                  type: object
                senderDid:
                  type: string
                algorithm:
                  type: string
                  default: ECDH-1PU+A256KW
                  enum: [ECDH-1PU+A256KW, ECDH-ES+A256KW]
                recipientDids:
                  type: array
                  items:
                    oneOf:
                      - type: string
      responses:
        '200':
          description: Message has been encrypted, returning an encrypted DIDComm Message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Message failed to encrypt
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /messaging/decrypt:
    post:
      tags:
        - messaging
      description: Decrypts a JSON Web Message
      requestBody:
        description: The JWM
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jwe
              properties:
                jwe:
                  type: object
      responses:
        '200':
          description: Message has been decrypted, returning a DIDComm message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Message failed to decrypt
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /messaging/sign:
    post:
      tags:
        - messaging
      description: Signs a DIDComm message as a base64 encoded JWT
      requestBody:
        description: The message payload
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - payload
                - senderDid
              properties:
                payload:
                  type: object
                senderDid:
                  type: string
                type:
                  type: string
      responses:
        '200':
          description: Message has been sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Message failed to send
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /messaging/verify:
    post:
      tags:
        - messaging
      description: Verifies a JWS in its compacted form
      requestBody:
        description: The message payload
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jws
              properties:
                jws:
                  type: string
      responses:
        '200':
          description: Message is verified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Message failed to verify
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /messaging/send:
    post:
      tags:
        - messaging
      description: Sends a DIDComm message using our relay service and DID service endpoints, it also returns a URL for QR code scanning. Supports encrypted, plaintext and signed DIDComm messages. You can generate an encrypted DIDComm message by calling the /messaging/encrypt route
      requestBody:
        description: The message payload
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - to
                - message
              properties:
                to:
                  type: string
                message:
                  type: object
      responses:
        '200':
          description: Message has been sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Message failed to send
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /messaging/{did}/receive:
    post:
      tags:
        - messaging
      security: []
      summary: Receive DIDComm messages for a specific DID
      description: |
        Public endpoint to accept DIDComm messages for a specific DID. This endpoint is unauthenticated and allows external parties to send messages to a DID without requiring authentication.
        
        This endpoint accepts DIDComm v2 compliant messages:
        - For encrypted messages: POST the JWE (JSON Web Encryption) object directly with Content-Type: application/didcomm-encrypted+json
        - For signed messages: POST the JWS (JSON Web Signature) object directly with Content-Type: application/didcomm-signed+json
        - For plaintext messages: POST the plaintext DIDComm message object with Content-Type: application/json
      parameters:
        - name: did
          in: path
          required: true
          description: The DID to receive messages for
          schema:
            $ref: '#/components/schemas/DID'
        - name: Accept
          in: header
          required: false
          description: Expected response format. For DIDComm v2 compatibility, use application/didcomm-encrypted+json, application/didcomm-signed+json, or application/json
          schema:
            type: string
            enum:
              - application/didcomm-encrypted+json
              - application/didcomm-signed+json
              - application/json
            default: application/json
      requestBody:
        description: The DIDComm message to receive (JWE for encrypted, JWS for signed, plaintext object for unencrypted)
        required: true
        content:
          application/didcomm-encrypted+json:
            schema:
              type: object
              description: JWE (JSON Web Encryption) object for encrypted DIDComm messages
              additionalProperties: true
          application/didcomm-signed+json:
            schema:
              type: object
              description: JWS (JSON Web Signature) object for signed DIDComm messages
              additionalProperties: true
          application/json:
            schema:
              type: object
              description: Plaintext DIDComm message object
              additionalProperties: true
      responses:
        '200':
          description: Message received successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: "received"
                  messageId:
                    type: string
                    description: Unique identifier for the received message
                    example: "msg_123456789"
                  timestamp:
                    type: string
                    format: date-time
                    description: Timestamp when the message was received
                    example: "2024-01-15T10:30:01Z"
            application/didcomm-encrypted+json:
              schema:
                type: object
                description: Response for encrypted message reception
                properties:
                  status:
                    type: string
                    example: "received"
                  messageId:
                    type: string
                    description: Unique identifier for the received message
                    example: "msg_123456789"
                  timestamp:
                    type: string
                    format: date-time
                    description: Timestamp when the message was received
                    example: "2024-01-15T10:30:01Z"
            application/didcomm-signed+json:
              schema:
                type: object
                description: Response for signed message reception
                properties:
                  status:
                    type: string
                    example: "received"
                  messageId:
                    type: string
                    description: Unique identifier for the received message
                    example: "msg_123456789"
                  timestamp:
                    type: string
                    format: date-time
                    description: Timestamp when the message was received
                    example: "2024-01-15T10:30:01Z"
        '400':
          description: Invalid message format or content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/didcomm-encrypted+json:
              schema:
                $ref: '#/components/schemas/Error'
            application/didcomm-signed+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DID not found or not configured for message reception
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/didcomm-encrypted+json:
              schema:
                $ref: '#/components/schemas/Error'
            application/didcomm-signed+json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Message validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/didcomm-encrypted+json:
              schema:
                $ref: '#/components/schemas/Error'
            application/didcomm-signed+json:
              schema:
                $ref: '#/components/schemas/Error'

  /messaging/messages:
    get:
      summary: List DIDComm messages
      tags:
        - messaging
      description: |
        Retrieve a list of DIDComm messages for the authenticated user. 
        Messages are returned in reverse chronological order (newest first).
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
        - name: to
          in: query
          description: Filter messages by specific DID
          required: false
          schema:
            $ref: '#/components/schemas/DID'
        - name: messageType
          in: query
          description: Filter messages by type (e.g., 'https://didcomm.org/basicmessage/2.0/basic-message')
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A paged array of DIDComm messages
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      $ref: '#/components/schemas/DIDCommMessage'
                  total:
                    type: integer
                    description: Total number of messages available
                    example: 150
                  offset:
                    type: integer
                    description: Current offset for pagination
                    example: 0
                  limit:
                    type: integer
                    description: Current limit for pagination
                    example: 64
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /messaging/messages/{messageId}:
    get:
      summary: Get a specific DIDComm message
      tags:
        - messaging
      description: |
        Retrieve a specific DIDComm message by its ID. 
        Only messages owned by the authenticated user can be retrieved.
      parameters:
        - name: messageId
          in: path
          required: true
          description: The unique identifier of the message
          schema:
            type: string
            pattern: '^[a-f0-9]{64}$'
            example: "msg_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
      responses:
        '200':
          description: The requested DIDComm message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DIDCommMessage'
        '400':
          description: Invalid message ID format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Message not found or not owned by user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Delete a DIDComm message
      tags:
        - messaging
      description: |
        Delete a specific DIDComm message by its ID. 
        Only messages owned by the authenticated user can be deleted.
        This action is irreversible.
      parameters:
        - name: messageId
          in: path
          required: true
          description: The unique identifier of the message to delete
          schema:
            type: string
            pattern: '^[a-f0-9]{64}$'
            example: "msg_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
      responses:
        '200':
          description: Message successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: "deleted"
                  messageId:
                    type: string
                    description: The ID of the deleted message
                    example: "msg_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
        '400':
          description: Invalid message ID format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Message not found or not owned by user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/credential-offers:
    post:
      tags:
        - openid
      description: Generates and returns a credential offer URI for OpenID4VCI. This endpoint is used to initiate the credential issuance process.
      requestBody:
        description: The OpenID issuer UUID
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: The OpenID issuer UUID
                  format: uuid
                requestParameters:
                  type: object
                  description: Optional extra request parameters passed to the federated OpenID provider, such as login hint
      responses:
        '200':
          description: OpenID credential offer URI
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDCredentialOfferResponse'
        '400':
          description: Invalid or expired OpenID issuer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Issuer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/credential-offers/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: OpenID issuer UUID
        schema:
          type: string
          format: uuid
    get:
      tags:
        - openid
      security: []
      summary: Get OpenID credential offer object
      description: Returns the credential offer object for use by an OpenID client
      responses:
        '200':
          description: Returns the information about the OpenID credential offer
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: OpenID issuer was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/issuers:
    get:
      summary: List all OpenID issuers
      description: Returns a paginated list of all OpenID issuers available in the system. This can be used to view the existing issuers and their configurations.
      tags:
        - openid
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of OpenID issuers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDIssuers'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - openid
      summary: Create a new OpenID issuer
      description: Creates a new OpenID issuer configuration in the system. This endpoint is used to add an issuer that can later be used for credential issuance and authentication.
      requestBody:
        description: OpenID issuer object
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenIDIssuerCreateRequest'
      responses:
        '200':
          description: OpenID issuer created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDIssuer'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/issuers/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: OpenID issuer UUID
        schema:
          type: string
          format: uuid
    get:
      tags:
        - openid
      summary: Get OpenID issuer
      description: Returns the configuration details of an existing OpenID issuer, identified by its UUID. This can be used to view the issuer's settings and supported features.
      responses:
        '200':
          description: Returns the information about the OpenID issuer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDIssuer'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: OpenID issuer was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - openid
      summary: Delete OpenID issuer
      description: Deletes the specified OpenID issuer and all associated data from the system. Use this endpoint to clean up issuers that are no longer needed.
      responses:
        '200':
          description: OpenID issuer will be deleted
        '400':
          description: Something went wrong.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: OpenID issuer was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/issuers/{id}/authorize:
    parameters:
      - name: id
        in: path
        required: true
        description: OpenID issuer UUID
        schema:
          type: string
          format: uuid
    get:
      security: []
      tags:
        - openid-holder
      summary: OpenID authorize endpoint
      description: Redirects the client to the authorization URL for a specific OpenID issuer. This endpoint begins the authorization flow, allowing users to authenticate with the issuer.
      responses:
        '302':
          description: Redirect to the authorization URL.
          headers:
            Location:
              description: The URL to which the client is being redirected.
              schema:
                type: string
                format: uri
                example: 'https://example.com/authorize?client_id=xyz&response_type=code&nonce=randomNonce&state=randomState&scope=openid&redirect_uri=https://client.example.com/callback'
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: OpenID issuer was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/issuers/{id}/callback:
    parameters:
      - name: id
        in: path
        required: true
        description: OpenID issuer UUID
        schema:
          type: string
          format: uuid
    get:
      security: []
      tags:
        - openid-holder
      summary: OpenID callback endpoint
      description: Processes the callback from the OpenID issuer after user authentication. This endpoint finalizes the authorization flow and returns control to the client application.
      responses:
        '302':
          description: Redirect to the authorization URL.
          headers:
            Location:
              description: The URL to which the client is being redirected.
              schema:
                type: string
                format: uri
                example: 'https://example.com/redirect?url=truvera.wallet%3A%2F%2Fcredentials%2Fcallback&code=nWPj...5MTc&state=SLSx...KveQ'
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: OpenID issuer was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/issuers/{id}/token:
    parameters:
      - name: id
        in: path
        required: true
        description: OpenID issuer UUID
        schema:
          type: string
          format: uuid
    post:
      security: []
      tags:
        - openid-holder
      summary: OpenID token endpoint
      description: Handles the exchange of an authorization code for an access token, ID token, and optionally a refresh token. This endpoint is a key part of the OpenID Connect flow.
      responses:
        '200':
          description: OpenID token endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDIssuersTokenResponse'
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: OpenID issuer was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/credential:
    post:
      security: []
      tags:
        - openid-holder
      summary: OpenID credential retrieve endpoint
      description: Retrieves a verifiable credential issued by an OpenID issuer. This endpoint is used to obtain the credential in a specified format after the issuance process.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                types:
                  type: array
                  description: The types of the Verifiable Credential.
                  items:
                    type: string
                  example:
                    - 'ldp_vc:MyCredential'
                format:
                  type: string
                  description: The format of the Verifiable Credential.
                  example: 'jwt_vc_json'
                proof:
                  type: object
                  description: The proof object containing cryptographic proof information.
                  properties:
                    proof_type:
                      type: string
                      description: The type of proof used.
                      example: 'jwt'
                    jwt:
                      type: string
                      description: The JWT containing the proof.
                      example: 'eyJhbG...-xzuDg'
      responses:
        '200':
          description: OpenID credential retrieve endpoint
          content:
            application/json:
              schema:
                type: object
                properties:
                  credential:
                    oneOf:
                      - type: string
                      - type: object
                        $ref: '#/components/schemas/VerifiableCredential'
                  format:
                    type: string
                    description: The format of the credential
                    example: 'ldp_vc'
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: OpenID issuer was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/issuers/{id}/.well-known/openid-credential-issuer:
    get:
      security: []
      tags:
        - openid-holder
      summary: Public OpenID issuer configuration route
      description: Retrieves the OpenID configuration document for a specified issuer UUID. This document contains the public configuration details necessary for client applications to interact with the issuer.
      parameters:
        - name: id
          in: path
          required: true
          description: OpenID issuer UUID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The well known config
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDCredentialIssuerConfig'
        '400':
          description: Invalid or expired OpenID issuer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/issuers/{uuid}/.well-known/did-configuration:
    get:
      security: []
      tags:
        - openid-holder
      summary: Public issuer DID configuration route
      description: Retrieves the Decentralized Identifier (DID) configuration document for a specified issuer UUID. This configuration is used to establish trust and interoperability with the issuer.
      parameters:
        - name: uuid
          in: path
          description: Issuer UUID
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The well known config
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDIssuerDIDConfig'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Issuer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/issuers/{id}/.well-known/openid-configuration:
    parameters:
      - name: id
        in: path
        required: true
        description: OpenID issuer UUID
        schema:
          type: string
          format: uuid
    get:
      security: []
      tags:
        - openid-holder
      summary: OpenID config endpoint
      description: Retrieves the OpenID Connect discovery document for the specified issuer UUID. This document includes important details like supported scopes, endpoints, and token signing methods.
      responses:
        '200':
          description: OpenID config endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDIssuerOpenIDConfig'
        '400':
          description: Invalid or expired OpenID issuer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: OpenID issuer was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/vp/{id}/.well-known/openid-configuration:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof request UUID
        schema:
          type: string
          format: uuid
    get:
      security: []
      tags:
        - openid-holder
      summary: OID4VP config endpoint
      description: Retrieves the configuration document for a specific proof request UUID. This document is used in OID4VP flows to verify the structure and requirements of the proof request.
      responses:
        '200':
          description: OID4VP config endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OID4VPConfig'
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: OpenID issuer was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /.well-known/oauth-authorization-server/openid/issuers/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: OpenID issuer UUID
        schema:
          type: string
          format: uuid
    get:
      security: []
      tags:
        - openid-holder
      summary: OpenID config endpoint
      description: Retrieves the OpenID auth server discovery document for the specified issuer UUID
      responses:
        '200':
          description: OpenID config endpoint
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid or expired OpenID issuer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: OpenID issuer was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/vp/{id}/jwks:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof request UUID
        schema:
          type: string
          format: uuid
    get:
      security: [ {}, bearerAuth: [], accessToken: []]
      tags:
        - openid-holder
      summary: Retrieve JWK set for an OID4VP proof request.
      description: Returns the JSON Web Key Set (JWKS) associated with a specific OID4VP proof request. This is used to verify signatures within the request object.
      responses:
        '200':
          description: Retrieve JWK set for an OID4VP proof request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OID4VPJWKsResponse'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof request was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/vp/{id}/authorize:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof request UUID
        schema:
          type: string
          format: uuid
    get:
      security: [ {}, bearerAuth: [], accessToken: []]
      tags:
        - openid-holder
      summary: Redirect to authorize a proof request in OID4VP format.
      description: Redirects the client to the authorization URL for a specific OID4VP proof request. This endpoint is used to initiate the proof request authorization flow.
      responses:
        '302':
          description: Redirect to the authorization URL.
          headers:
            Location:
              description: The URL to which the client is being redirected.
              schema:
                type: string
                format: uri
                example: 'https://example.com/authorize?state=randomState&code=randomCode&scope=openid&request=randomRequest&redirect_uri=https://client.example.com/callback&client_id=xyz&response_type=code&response_mode=form_post'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof request was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/vp/{id}/request:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof request UUID
        schema:
          type: string
          format: uuid
    get:
      security: [ {}, bearerAuth: [], accessToken: []]
      tags:
        - openid
      summary: Returns the information about the OID4VP request
      description: Returns the proof request object in OID4VP format, which can be used with a request URI for processing verifiable presentations.
      responses:
        '200':
          description: Returns the information about the OID4VP request
          content:
            text/plain:
              schema:
                type: string
                example: 'eyJhbG...zKQIDw'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof request was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/vp/{id}/request-url:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof request UUID
        schema:
          type: string
          format: uuid
    post:
      tags:
        - openid
      summary: Get proof request in OID4VP deep link or QR code format
      description: Creates and returns a deep link or QR code for an OID4VP proof request, allowing for easy scanning or clicking by users to initiate the proof process.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OID4VPRequestCreate'
      responses:
        '200':
          description: Returns the information about the OID4VP request
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: The generated OpenID request URL
                    example: 'openid://?client_id=https%3A%2F%2Fexample.com%2Fopenid%2Fvp%2F6600...e165&request_uri=https%3A%2F%2Fexample.com%2Fopenid%2Fvp%2F6600...e165%2Frequest'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof request was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /openid/vp/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Proof request UUID
        schema:
          type: string
          format: uuid
    post:
      security: []
      tags:
        - openid-holder
      summary: OID4VP callback submit
      description: Handles the submission of a callback for an OID4VP proof request. This endpoint processes the proof and returns the result to the client.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
          text/plain:
            schema:
              type: string
          application/json:
            schema:
              type: object
      responses:
        '302':
          description: Redirect to the authorization URL.
          headers:
            Location:
              description: The URL to which the client is being redirected.
              schema:
                type: string
                format: uri
                example: 'openid://?state=RrD3...hapo&nonce=1234567890&code=jB9b...o030'
        '200':
          description: Callback successful (SIOPV2)
          content:
            application/json:
              schema:
                type: object
                properties:
                  state:
                    type: string
                    description: The state parameter from the request
                    example: 'RrD3...hapo'
                  code:
                    type: string
                    description: The code parameter from the request
                    example: 'jB9b...o030'
                  verified:
                    type: boolean
                    description: Whether the request was verified
                    example: true
                  nonce:
                    type: string
                    description: The nonce parameter from the request
                    example: '1234567890'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Proof request was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /trust-registries:
    post:
      tags:
        - trustRegistries
      summary: Create Trust Registry
      description: Creates a new trust registry. You must be on a Custom plan to do this.
      requestBody:
        description: A trust registry create body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustRegistryCreateRequest'
      responses:
        '200':
          description: Trust registry has been created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistry'
        '400':
          description: Invalid parameters or error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      tags:
        - trustRegistries
      summary: List Trust Registries
      description: Get all trust registries owned by the user
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: All trust registries
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistries'

  /trust-registries/query:
    post:
      tags:
        - trustRegistries
      security: []
      summary: Query all trust registries
      description: Query all trust registries
      requestBody:
        description: A trust registry query body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustRegistryQueryRequest'
      responses:
        '200':
          description: Trust registries
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistries'
        '400':
          description: Invalid parameters or error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /trust-registries/schema-prices:
    get:
      tags:
        - trustRegistries
      summary: List prices for schema IDs
      description: Get all prices for schema IDs
      parameters:
        - name: ids
          in: query
          description: Comma separated list of schema IDs
          required: true
          schema:
            type: string
      responses:
        '200':
          description: All schema prices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryGenericSchemaPrices'
  /trust-registries/schema-dids:
    get:
      tags:
        - trustRegistries
      summary: List all the DIDs belonging to the user that are linked to the requested schemas.
      description: Get all dids owned by user for schema IDs
      parameters:
        - name: ids
          in: query
          description: Comma separated list of schema IDs
          required: true
          schema:
            type: string
      responses:
        '200':
          description: All schema dids owned by user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryGenericSchemaDids'
  /trust-registries/{registryId}/verifiers:
    get:
      summary: Gets all verifiers in a trust registry by schema ID
      tags:
        - trustRegistries
      security: []
      parameters:
        - name: registryId
          in: path
          required: true
          description: A trust registry id
          schema:
            type: string
        - name: schemaId
          in: query
          required: true
          description: A schema ID
          schema:
            type: string
      responses:
        '200':
          description: Public info of trust registry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOfDIDs'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Invalid invite token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /trust-registries/{registryId}/public:
    get:
      summary: Get public information about a trust registry
      tags:
        - trustRegistries
      security: []
      parameters:
        - name: registryId
          in: path
          required: true
          description: A trust registry id
          schema:
            type: string
      responses:
        '200':
          description: Public info of trust registry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistry'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Invalid invite token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /trust-registries/invitations/accept:
    post:
      summary: Accepts an invite to an ecosystem
      tags:
        - trustRegistries
      requestBody:
        description: Trust Registry participant invite code
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustRegistryInviteAcceptRequest'
      responses:
        '200':
          description: Invite was accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryParticipant'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Error accepting invite
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /trust-registries/invitations/decline:
    post:
      summary: Decline the invitation of joining a trust registry
      tags:
        - trustRegistries
      requestBody:
        description: Trust Registry participant invite token
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - token
              properties:
                token:
                  type: string
                  description: Trust Registry participant invite token
                  example: eyJhbG...2VVqUw
                maxAge:
                  type: integer
                  description: Token max age in seconds
                  example: 604800
      responses:
        '200':
          description: Invitation has been declined
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Invalid invite token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /trust-registries/invitations/snooze:
    post:
      summary: Snooze the invitation of joining a trust registry
      tags:
        - trustRegistries
      requestBody:
        description: Trust Registry participant invite code
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - token
              properties:
                token:
                  type: string
                  description: Trust Registry participant invite token
                  example: eyJhbG...2VVqUw
                maxAge:
                  type: integer
                  description: Token max age in seconds
                  example: 604800
      responses:
        '200':
          description: Invitation has been declined
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Invalid invite token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /trust-registries/{registryId}:
    parameters:
      - name: registryId
        in: path
        required: true
        description: A trust registry id
        schema:
          type: string
    get:
      tags:
        - trustRegistries
      summary: Get Trust Registry
      description: Returns the Trust Registry for a specific ID.
      responses:
        '200':
          description: Trust Registry information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistry'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - trustRegistries
      summary: Delete Trust Registry
      description: Deletes a Trust Registry
      responses:
        '200':
          description: Trust Registry has been deleted
        '404':
          description: Trust Registry does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Something went wrong with deleting the Trust Registry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something went wrong with deleting the Trust Registry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a Trust Registry
      tags:
        - trustRegistries
      parameters:
        - name: registryId
          in: path
          required: true
          description: A Trust Registry ID
          schema:
            type: string
      requestBody:
        description: Trust Registry metadata to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustRegistryUpdateRequest'
      responses:
        '200':
          description: Trust Registry has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistry'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Error updating team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /trust-registries/{registryId}/schemas:
    parameters:
      - name: registryId
        in: path
        required: true
        description: A trust registry id
        schema:
          type: string
    get:
      tags:
        - trustRegistries
      summary: Get Trust Registry schemas
      description: Returns the Trust Registry schemas
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
        - name: participants
          in: query
          description: How many participants to return per schema
          required: false
          schema:
            type: integer
            format: int32
            default: 5
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: List of schemas in the trust registry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistrySchemas'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /trust-registries/{registryId}/reports:
    parameters:
      - name: registryId
        in: path
        required: true
        description: A trust registry id
        schema:
          type: string
    get:
      tags:
        - trustRegistries
      summary: Get Trust Registry VPI reports
      description: Returns the Trust Registry VPI reports
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 9999)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 9999
        - name: schema
          in: query
          description: Filter by specific schema ID
          required: false
          schema:
            type: string
        - name: did
          in: query
          description: Filter by specific verifier or issuer DIDs
          required: false
          schema:
            type: string
        - name: start
          in: query
          description: Start date for the report
          required: false
          schema:
            type: string
            format: date-time
        - name: end
          in: query
          description: End date for the report
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: List of schemas in the trust registry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryReports'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /trust-registries/{registryId}/schemas/{schemaId}:
    parameters:
      - name: registryId
        in: path
        required: true
        description: A trust registry id
        schema:
          type: string
      - name: schemaId
        in: path
        required: true
        description: A schema id
        schema:
          type: string
    delete:
      summary: Remove Trust Registry schema
      description: Unassigns a schema from all participants in the trust registry
      tags:
        - trustRegistries
      responses:
        '200':
          description: Trust Registry schema has been deleted
        '404':
          description: Trust Registry does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Something went wrong with deleting the schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /trust-registries/{registryId}/schemas/{schemaId}/price:
    parameters:
      - name: registryId
        in: path
        required: true
        description: A trust registry id
        schema:
          type: string
      - name: schemaId
        in: path
        required: true
        description: A schema id
        schema:
          type: string
    post:
      summary: Creates or updates a price for a schema ID with given currency and digits on a per issuer basis
      tags:
        - trustRegistries
      requestBody:
        description: Schema price metadata
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustRegistrySchemaPrice'
      responses:
        '200':
          description: Trust Registry schema price has been updated
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Error updating or adding price
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /trust-registries/{registryId}/proof-templates:
    parameters:
      - name: registryId
        in: path
        required: true
        description: A trust registry id
        schema:
          type: string
    get:
      tags:
        - trustRegistries
      summary: Get Trust Registry proof templates
      description: Returns the Trust Registry proof templates
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: List of proof templates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryProofTemplates'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Assigns a proof template to a trust registry
      tags:
        - trustRegistries
      parameters:
        - name: registryId
          in: path
          required: true
          description: A Trust Registry ID
          schema:
            type: string
      requestBody:
        description: Proof template ID
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustRegistryProofTemplateAssignRequest'
      responses:
        '200':
          description: Trust Registry has been assigned the proof template
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Error inviting Trust Registry participant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /trust-registries/{registryId}/proof-templates/{templateId}:
    parameters:
      - name: registryId
        in: path
        required: true
        description: A trust registry id
        schema:
          type: string
      - name: templateId
        in: path
        required: true
        description: A proof template id
        schema:
          type: string
    delete:
      tags:
        - trustRegistries
      summary: Remove Trust Registry proof template
      description: Removes a Trust Registry proof template
      responses:
        '200':
          description: Trust Registry proof template has been deleted
        '404':
          description: Trust Registry does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Something went wrong with deleting the Trust Registry proof template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /trust-registries/{registryId}/participants:
    parameters:
      - name: registryId
        in: path
        required: true
        description: A trust registry id
        schema:
          type: string
    get:
      tags:
        - trustRegistries
      summary: Get Trust Registry participants
      description: Returns the Trust Registry participants
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
        - name: schemaId
          in: query
          required: false
          description: A schema id
          schema:
            type: string
        - name: did
          in: query
          required: false
          description: Filter participants by DID
          schema:
            type: string
      responses:
        '200':
          description: List of participants
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryParticipants'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Invites a Trust Registry participant
      tags:
        - trustRegistries
      parameters:
        - name: registryId
          in: path
          required: true
          description: A Trust Registry ID
          schema:
            type: string
      requestBody:
        description: Trust Registry participant metadata
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustRegistryInviteRequest'
      responses:
        '200':
          description: Trust Registry participant has been invited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryInviteResponse'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Error inviting Trust Registry participant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /trust-registries/{registryId}/participants/{participantId}:
    parameters:
      - name: registryId
        in: path
        required: true
        description: A trust registry id
        schema:
          type: string
      - name: participantId
        in: path
        required: true
        description: A participant id
        schema:
          type: string
    get:
      tags:
        - trustRegistries
      summary: Get Trust Registry participant
      description: Returns the Trust Registry participant
      responses:
        '200':
          description: Participant information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryParticipant'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - trustRegistries
      summary: Remove Trust Registry participant
      description: Removes a Trust Registry participant
      responses:
        '200':
          description: Trust Registry participant has been deleted
        '404':
          description: Trust Registry participant does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Something went wrong with deleting the Trust Registry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something went wrong with deleting the Trust Registry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a Trust Registry participant
      tags:
        - trustRegistries
      parameters:
        - name: registryId
          in: path
          required: true
          description: A Trust Registry ID
          schema:
            type: string
      requestBody:
        description: Trust Registry participant metadata to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustRegistryParticipantPatch'
      responses:
        '200':
          description: Trust Registry participant has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryParticipant'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Error updating Trust Registry participant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trust Registry was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /trust-registries/{registryId}/participants/{participantId}/info:
    parameters:
      - name: registryId
        in: path
        required: true
        description: A trust registry id
        schema:
          type: string
      - name: participantId
        in: path
        required: true
        description: A participant id
        schema:
          type: string
    patch:
      deprecated: true
      summary: Update own Trust Registry participant info
      tags:
        - trustRegistries
      requestBody:
        description: Trust Registry participant metadata to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustRegistryParticipantInfoPatch'
      responses:
        '200':
          description: Trust Registry participant has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustRegistryParticipant'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Error updating Trust Registry participant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

  /webhooks:
    post:
      summary: Create a Webhook
      tags:
        - webhooks
      requestBody:
        description: Webhook JSON object
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
      responses:
        '200':
          description: Webhook has been created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiWebhook'
        '400':
          description: Error creating a webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: User does not own this webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      summary: List all webhooks
      tags:
        - webhooks
      parameters:
        - name: offset
          in: query
          description: How many items to offset by for pagination
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: How many items to return at one time (max 64)
          required: false
          schema:
            type: integer
            format: int32
            default: 64
            minimum: 1
            maximum: 64
      responses:
        '200':
          description: A paged array of webhooks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiWebhooks'
        '400':
          description: Application error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /webhooks/{id}:
    get:
      summary: Info for a specific webhook
      tags:
        - webhooks
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook ID
          schema:
            $ref: '#/components/schemas/NumericID'
      responses:
        '200':
          description: A stored webhook JSON object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiWebhook'
        '400':
          description: Error getting webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Webhook was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a Webhook
      tags:
        - webhooks
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook ID
          schema:
            $ref: '#/components/schemas/NumericID'
      requestBody:
        description: Webhook JSON object
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
      responses:
        '200':
          description: Webhook has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiWebhook'
        '400':
          description: Error creating webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Transaction limit reached or upgrade required to proceed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Deletes a single webhook
      tags:
        - webhooks
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook ID
          schema:
            $ref: '#/components/schemas/NumericID'
      responses:
        '200':
          description: Webhook Deleted
        '400':
          description: Error deleting webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Webhook was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
