{
  "components": {
    "schemas": {
      "AcceptMergeResolutionsRequestDto": {
        "additionalProperties": false,
        "properties": {
          "resolutions": {
            "items": {
              "$ref": "#/components/schemas/MergeResolutionChoiceDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "AcceptWardOwnershipRequestDto": {
        "additionalProperties": false,
        "properties": {
          "keyCustodyReference": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccessReconstructionDto": {
        "additionalProperties": false,
        "properties": {
          "actorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "endedAt": {
            "format": "date-time",
            "type": "string"
          },
          "eventCount": {
            "format": "int32",
            "type": "integer"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/AccessReconstructionEventDto"
            },
            "nullable": true,
            "type": "array"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccessReconstructionEventDto": {
        "additionalProperties": false,
        "properties": {
          "accessType": {
            "nullable": true,
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "resourceId": {
            "format": "uuid",
            "type": "string"
          },
          "resourceType": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ActivateTemplateCommandResult": {
        "additionalProperties": false,
        "properties": {
          "isActive": {
            "type": "boolean"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "templateId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AddDocumentCommand": {
        "additionalProperties": false,
        "properties": {
          "algorithmVersion": {
            "format": "int32",
            "type": "integer"
          },
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "categoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "contentFormat": {
            "nullable": true,
            "type": "string"
          },
          "contentHash": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "encryptedContent": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "fhir": {
            "$ref": "#/components/schemas/FhirMetadataDto"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/FieldEnvelopeInput"
            },
            "nullable": true,
            "type": "array"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "issuanceEvidence": {
            "$ref": "#/components/schemas/DocumentIssuanceEvidenceDto"
          },
          "keyDerivationFunction": {
            "nullable": true,
            "type": "string"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "ownerId": {
            "format": "uuid",
            "type": "string"
          },
          "salt": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "schemaVersion": {
            "nullable": true,
            "type": "string"
          },
          "sensitivityLabel": {
            "nullable": true,
            "type": "string"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AddDocumentTagsRequestDto": {
        "additionalProperties": false,
        "properties": {
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "AddOrganizationKeyHolderRequest": {
        "additionalProperties": false,
        "properties": {
          "newHolderUserId": {
            "format": "uuid",
            "type": "string"
          },
          "wrappedMasterKey": {
            "nullable": true,
            "type": "string"
          },
          "wrappedPrivateKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdministrativeVaultAccessEffectDto": {
        "additionalProperties": false,
        "properties": {
          "effectiveAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "operationClass": {
            "nullable": true,
            "type": "string"
          },
          "outcome": {
            "nullable": true,
            "type": "string"
          },
          "stateChanged": {
            "type": "boolean"
          },
          "subjectUserId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdministrativeVaultAccessEffectRequestDto": {
        "additionalProperties": false,
        "properties": {
          "operationClass": {
            "nullable": true,
            "type": "string"
          },
          "operationReference": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AnonymousDataRequestDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "privacyTermsJson": {
            "nullable": true,
            "type": "string"
          },
          "requestId": {
            "format": "uuid",
            "type": "string"
          },
          "requestedFieldsJson": {
            "nullable": true,
            "type": "string"
          },
          "requesterLegalName": {
            "nullable": true,
            "type": "string"
          },
          "requesterRegistryScheme": {
            "nullable": true,
            "type": "string"
          },
          "requesterRegistryValue": {
            "nullable": true,
            "type": "string"
          },
          "requesterType": {
            "nullable": true,
            "type": "string"
          },
          "requesterUnverifiedReason": {
            "nullable": true,
            "type": "string"
          },
          "requesterVerified": {
            "type": "boolean"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ApproveDataRequestCommand": {
        "additionalProperties": false,
        "properties": {
          "approvedFieldsJson": {
            "nullable": true,
            "type": "string"
          },
          "dataRequestId": {
            "format": "uuid",
            "type": "string"
          },
          "keepCurrent": {
            "type": "boolean"
          },
          "keepCurrentUntil": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "targetUserId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AttachNewbornSeedRecordRequestDto": {
        "additionalProperties": false,
        "properties": {
          "documentId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AttorneyFirstAccessLandingDto": {
        "additionalProperties": false,
        "properties": {
          "auditNotice": {
            "nullable": true,
            "type": "string"
          },
          "authorityRecordId": {
            "format": "uuid",
            "type": "string"
          },
          "donorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "permittedActions": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "scopeGrantId": {
            "format": "uuid",
            "type": "string"
          },
          "scopedCategories": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "scopedDocumentIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "scopedFieldIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AttorneyReadAuditEntryDto": {
        "additionalProperties": false,
        "properties": {
          "attorneyUserId": {
            "format": "uuid",
            "type": "string"
          },
          "decision": {
            "nullable": true,
            "type": "string"
          },
          "donorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "resourceId": {
            "format": "uuid",
            "type": "string"
          },
          "resourceType": {
            "nullable": true,
            "type": "string"
          },
          "scopeGrantId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AttorneyScopeGrantSummaryDto": {
        "additionalProperties": false,
        "properties": {
          "authorityRecordId": {
            "format": "uuid",
            "type": "string"
          },
          "donorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "scopeGrantId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AttorneyScopedDocumentDto": {
        "additionalProperties": false,
        "properties": {
          "authorityRecordId": {
            "format": "uuid",
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "inScopeFieldIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "permittedActions": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "scopeGrantId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AttorneyVaultScopeGrantDto": {
        "additionalProperties": false,
        "properties": {
          "attorneyUserId": {
            "format": "uuid",
            "type": "string"
          },
          "authorityRecordId": {
            "format": "uuid",
            "type": "string"
          },
          "donorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "grantedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "revokedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "scopedCategories": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "scopedDocumentIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "scopedFieldIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AuthorizeEstateReleaseRequestDto": {
        "additionalProperties": false,
        "properties": {
          "probateGranted": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BatchFieldShareResultDto": {
        "additionalProperties": false,
        "properties": {
          "failedCount": {
            "format": "int32",
            "type": "integer"
          },
          "requestedCount": {
            "format": "int32",
            "type": "integer"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/FieldShareResultItemDto"
            },
            "nullable": true,
            "type": "array"
          },
          "succeededCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "BequeathedDocumentDto": {
        "additionalProperties": false,
        "properties": {
          "available": {
            "type": "boolean"
          },
          "documentId": {
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "lockedReason": {
            "nullable": true,
            "type": "string"
          },
          "tier": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BequestDeclaredResponseDto": {
        "additionalProperties": false,
        "properties": {
          "estateId": {
            "format": "uuid",
            "type": "string"
          },
          "itemId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CancelUploadCommand": {
        "additionalProperties": false,
        "properties": {
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "requestingUserId": {
            "format": "uuid",
            "type": "string"
          },
          "uploadSessionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CandidateDocumentDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "dataClassificationLevel": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/CandidateFieldDto"
            },
            "nullable": true,
            "type": "array"
          },
          "schemaName": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CandidateDocumentsDto": {
        "additionalProperties": false,
        "properties": {
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/CandidateDocumentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "checkId": {
            "nullable": true,
            "type": "string"
          },
          "requestId": {
            "format": "uuid",
            "type": "string"
          },
          "requestedSchemas": {
            "items": {
              "$ref": "#/components/schemas/CandidateSchemaDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "CandidateFieldDto": {
        "additionalProperties": false,
        "properties": {
          "dataClassificationLevel": {
            "nullable": true,
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "mandatory": {
            "type": "boolean"
          },
          "purpose": {
            "nullable": true,
            "type": "string"
          },
          "requiredForCheck": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CandidateSchemaDto": {
        "additionalProperties": false,
        "properties": {
          "candidateCount": {
            "format": "int32",
            "type": "integer"
          },
          "requestedSchemaRef": {
            "nullable": true,
            "type": "string"
          },
          "schemaName": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "unresolved": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CascadeStatusDto": {
        "additionalProperties": false,
        "properties": {
          "changeId": {
            "format": "uuid",
            "type": "string"
          },
          "coverage": {
            "$ref": "#/components/schemas/RelyingPartyCoverageDto"
          },
          "credentials": {
            "items": {
              "$ref": "#/components/schemas/CredentialReissueDto"
            },
            "nullable": true,
            "type": "array"
          },
          "names": {
            "$ref": "#/components/schemas/NamePairDto"
          },
          "reattestation": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CategoryDto": {
        "additionalProperties": false,
        "properties": {
          "childCategories": {
            "items": {
              "$ref": "#/components/schemas/CategoryDto"
            },
            "nullable": true,
            "type": "array"
          },
          "colorCode": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "displayOrder": {
            "format": "int32",
            "type": "integer"
          },
          "documentCount": {
            "format": "int32",
            "type": "integer"
          },
          "icon": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isDeleted": {
            "type": "boolean"
          },
          "modifiedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "parentCategoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CategoryDtoPagedResultDto": {
        "additionalProperties": false,
        "properties": {
          "hasNextPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "hasPreviousPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/CategoryDto"
            },
            "nullable": true,
            "type": "array"
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalPages": {
            "format": "int32",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CategoryStatisticsDto": {
        "additionalProperties": false,
        "properties": {
          "averageDocumentsPerCategory": {
            "format": "double",
            "type": "number"
          },
          "maximumDepth": {
            "format": "int32",
            "type": "integer"
          },
          "rootCategories": {
            "format": "int32",
            "type": "integer"
          },
          "totalCategories": {
            "format": "int32",
            "type": "integer"
          },
          "totalDocuments": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CategorySuggestion": {
        "additionalProperties": false,
        "properties": {
          "categoryId": {
            "format": "uuid",
            "type": "string"
          },
          "categoryName": {
            "nullable": true,
            "type": "string"
          },
          "confidence": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "ChildCustodianMembershipDto": {
        "additionalProperties": false,
        "properties": {
          "capabilities": {
            "nullable": true,
            "type": "string"
          },
          "custodianUserId": {
            "format": "uuid",
            "type": "string"
          },
          "linkedAt": {
            "format": "date-time",
            "type": "string"
          },
          "role": {
            "nullable": true,
            "type": "string"
          },
          "sourceLinkRef": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChildSharedRecordsSpaceDto": {
        "additionalProperties": false,
        "properties": {
          "childId": {
            "format": "uuid",
            "type": "string"
          },
          "custodians": {
            "items": {
              "$ref": "#/components/schemas/ChildCustodianMembershipDto"
            },
            "nullable": true,
            "type": "array"
          },
          "provisionedAt": {
            "format": "date-time",
            "type": "string"
          },
          "spaceId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ClaimOrganizationKeyHolderByRecoveryKitRequest": {
        "additionalProperties": false,
        "properties": {
          "verifier": {
            "nullable": true,
            "type": "string"
          },
          "wrappedMasterKey": {
            "nullable": true,
            "type": "string"
          },
          "wrappedPrivateKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompareDocumentVersionsQueryResult": {
        "additionalProperties": false,
        "properties": {
          "areIdentical": {
            "type": "boolean"
          },
          "differences": {
            "items": {
              "$ref": "#/components/schemas/VersionDifference"
            },
            "nullable": true,
            "type": "array"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "versionNumber1": {
            "format": "int32",
            "type": "integer"
          },
          "versionNumber2": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CompleteUploadCommand": {
        "additionalProperties": false,
        "properties": {
          "algorithmVersion": {
            "format": "int32",
            "type": "integer"
          },
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "categoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/FieldEnvelopeInput"
            },
            "nullable": true,
            "type": "array"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "keyDerivationFunction": {
            "nullable": true,
            "type": "string"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "requestingUserId": {
            "format": "uuid",
            "type": "string"
          },
          "salt": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "schemaVersion": {
            "nullable": true,
            "type": "string"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "uploadSessionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompleteUploadCommandResult": {
        "additionalProperties": false,
        "properties": {
          "blobStoragePath": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "message": {
            "nullable": true,
            "type": "string"
          },
          "quarantined": {
            "type": "boolean"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "success": {
            "type": "boolean"
          },
          "threatName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompletenessAttestationDto": {
        "additionalProperties": false,
        "properties": {
          "anchorReference": {
            "nullable": true,
            "type": "string"
          },
          "attestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "blockHeight": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "completenessHash": {
            "nullable": true,
            "type": "string"
          },
          "verdictLevel": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ConfirmCustodyDestructionRequestDto": {
        "additionalProperties": false,
        "properties": {
          "evidenceDigest": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ConfirmReconciliationRequestDto": {
        "additionalProperties": false,
        "properties": {
          "bootstrapDecisionId": {
            "format": "uuid",
            "type": "string"
          },
          "homeVaultId": {
            "format": "uuid",
            "type": "string"
          },
          "sameMeConsent": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ConsentTeardownPreviewDto": {
        "additionalProperties": false,
        "properties": {
          "cachedCopyCount": {
            "format": "int32",
            "type": "integer"
          },
          "consentId": {
            "format": "uuid",
            "type": "string"
          },
          "derivedShareCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ContactErasureAttestationDto": {
        "additionalProperties": false,
        "properties": {
          "auditAnchorRef": {
            "nullable": true,
            "type": "string"
          },
          "contactLinkId": {
            "format": "uuid",
            "type": "string"
          },
          "contentDigest": {
            "nullable": true,
            "type": "string"
          },
          "erasedAt": {
            "format": "date-time",
            "type": "string"
          },
          "handoverRecordId": {
            "format": "uuid",
            "type": "string"
          },
          "ownerUserId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ContactHandoverRecordDto": {
        "additionalProperties": false,
        "properties": {
          "closureContext": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "contactLinkId": {
            "format": "uuid",
            "type": "string"
          },
          "disposition": {
            "nullable": true,
            "type": "string"
          },
          "handedOverAt": {
            "format": "date-time",
            "type": "string"
          },
          "handoverRecordId": {
            "format": "uuid",
            "type": "string"
          },
          "ownerUserId": {
            "format": "uuid",
            "type": "string"
          },
          "recoveryWindowExpiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CounterpartyConsentLedgerRow": {
        "additionalProperties": false,
        "properties": {
          "counterpartyId": {
            "format": "uuid",
            "type": "string"
          },
          "fieldsHeld": {
            "format": "int32",
            "type": "integer"
          },
          "liveConsents": {
            "format": "int32",
            "type": "integer"
          },
          "nextFieldExpiry": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CounterpartyOrganizationConsentLedgerRow": {
        "additionalProperties": false,
        "properties": {
          "counterpartyOrganizationId": {
            "format": "uuid",
            "type": "string"
          },
          "fieldsHeld": {
            "format": "int32",
            "type": "integer"
          },
          "liveConsents": {
            "format": "int32",
            "type": "integer"
          },
          "nextFieldExpiry": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CourtAuthorityScopedDocumentDto": {
        "additionalProperties": false,
        "properties": {
          "authorityId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "orderReference": {
            "nullable": true,
            "type": "string"
          },
          "permittedActions": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "scopeCategory": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          },
          "wardId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateCategoryCommand": {
        "additionalProperties": false,
        "properties": {
          "colorCode": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "displayOrder": {
            "format": "int32",
            "type": "integer"
          },
          "icon": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "parentCategoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateDataRequestCommand": {
        "additionalProperties": false,
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "privacyTermsJson": {
            "nullable": true,
            "type": "string"
          },
          "requestedFieldsJson": {
            "nullable": true,
            "type": "string"
          },
          "requesterId": {
            "format": "uuid",
            "type": "string"
          },
          "requesterType": {
            "nullable": true,
            "type": "string"
          },
          "targetUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateDocumentShareCommand": {
        "additionalProperties": false,
        "properties": {
          "accessLevel": {
            "nullable": true,
            "type": "string"
          },
          "createdByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sharedWithUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "versionNumber": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CreateDocumentVersionCommand": {
        "additionalProperties": false,
        "properties": {
          "changeDescription": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateFieldShareCommand": {
        "additionalProperties": false,
        "properties": {
          "createdByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/CreateFieldShareItem"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "CreateFieldShareItem": {
        "additionalProperties": false,
        "properties": {
          "accessLevel": {
            "nullable": true,
            "type": "string"
          },
          "consentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "fieldLabel": {
            "nullable": true,
            "type": "string"
          },
          "recipientDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "recipientKeyUnavailable": {
            "type": "boolean"
          },
          "recipientOrgId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "recipientType": {
            "nullable": true,
            "type": "string"
          },
          "recipientUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "sharerDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "sharerNote": {
            "nullable": true,
            "type": "string"
          },
          "sharerType": {
            "nullable": true,
            "type": "string"
          },
          "wrappedFieldKeyBase64": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateFieldSubscriptionCommand": {
        "additionalProperties": false,
        "properties": {
          "consentId": {
            "format": "uuid",
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "maxSyncs": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "subscriberId": {
            "format": "uuid",
            "type": "string"
          },
          "subscriberType": {
            "nullable": true,
            "type": "string"
          },
          "syncType": {
            "nullable": true,
            "type": "string"
          },
          "validFrom": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "validTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateSelfExclusionRequest": {
        "additionalProperties": false,
        "description": "Request body for `POST /api/v1/self-exclusion`. Matches the essence-web\r\n`CreateExclusionRequest` client contract.",
        "properties": {
          "confirmedSelfExclude": {
            "description": "The explicit hard-commitment confirmation — the server rejects a false.",
            "type": "boolean"
          },
          "durationDays": {
            "description": "Committed term in days. Ignored by the server when Essence.Core.Vault.Api.Controllers.CreateSelfExclusionRequest.Permanent is true.",
            "format": "int32",
            "type": "integer"
          },
          "jurisdiction": {
            "description": "Regulator jurisdiction code (e.g. \"GB\").",
            "nullable": true,
            "type": "string"
          },
          "permanent": {
            "description": "When true, requests a permanent (no-reinstatement) exclusion the server treats as\r\nnever-liftable. Matches the essence-web `CreateExclusionRequest.permanent` flag.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CreateTemplateCommand": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "fieldMappings": {
            "items": {
              "$ref": "#/components/schemas/TemplateFieldMappingDto"
            },
            "nullable": true,
            "type": "array"
          },
          "icon": {
            "nullable": true,
            "type": "string"
          },
          "localizedDescriptions": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "localizedNames": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "previewImage": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateTemplateCommandResult": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "templateId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateVaultCommand": {
        "additionalProperties": false,
        "properties": {
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "autoDeleteDays": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "autoDeleteEnabled": {
            "type": "boolean"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "homeRegion": {
            "nullable": true,
            "type": "string"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "maxDocuments": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "maxStorageSizeBytes": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "ownerId": {
            "format": "uuid",
            "type": "string"
          },
          "salt": {
            "nullable": true,
            "type": "string"
          },
          "vaultType": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CredentialFanoutOutcome": {
        "additionalProperties": false,
        "properties": {
          "credentialId": {
            "format": "uuid",
            "type": "string"
          },
          "held": {
            "type": "boolean"
          },
          "kind": {
            "nullable": true,
            "type": "string"
          },
          "markedCompromised": {
            "type": "boolean"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "reissueRequested": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CredentialReissueDto": {
        "additionalProperties": false,
        "properties": {
          "auditAnchor": {
            "nullable": true,
            "type": "string"
          },
          "credentialClass": {
            "nullable": true,
            "type": "string"
          },
          "credentialId": {
            "format": "uuid",
            "type": "string"
          },
          "detail": {
            "nullable": true,
            "type": "string"
          },
          "evidenceDeedPollDocumentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "kycResult": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "oldStillValid": {
            "type": "boolean"
          },
          "reissuedAtIso": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrossVaultSearchFacetBucketDto": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "value": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrossVaultSearchFacets": {
        "additionalProperties": false,
        "properties": {
          "access": {
            "items": {
              "$ref": "#/components/schemas/CrossVaultSearchFacetBucketDto"
            },
            "nullable": true,
            "type": "array"
          },
          "category": {
            "items": {
              "$ref": "#/components/schemas/CrossVaultSearchFacetBucketDto"
            },
            "nullable": true,
            "type": "array"
          },
          "dateRange": {
            "items": {
              "$ref": "#/components/schemas/CrossVaultSearchFacetBucketDto"
            },
            "nullable": true,
            "type": "array"
          },
          "schema": {
            "items": {
              "$ref": "#/components/schemas/CrossVaultSearchFacetBucketDto"
            },
            "nullable": true,
            "type": "array"
          },
          "tags": {
            "items": {
              "$ref": "#/components/schemas/CrossVaultSearchFacetBucketDto"
            },
            "nullable": true,
            "type": "array"
          },
          "vault": {
            "items": {
              "$ref": "#/components/schemas/CrossVaultSearchFacetBucketDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "CrossVaultSearchHitDto": {
        "additionalProperties": false,
        "properties": {
          "access": {
            "nullable": true,
            "type": "string"
          },
          "category": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "score": {
            "format": "double",
            "type": "number"
          },
          "statusOnly": {
            "type": "boolean"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrossVaultSearchRequest": {
        "additionalProperties": false,
        "properties": {
          "access": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "categories": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "dateRange": {
            "nullable": true,
            "type": "string"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "query": {
            "nullable": true,
            "type": "string"
          },
          "schemas": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "vaultIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "CrossVaultSearchResponse": {
        "additionalProperties": false,
        "properties": {
          "engine": {
            "nullable": true,
            "type": "string"
          },
          "facets": {
            "$ref": "#/components/schemas/CrossVaultSearchFacets"
          },
          "facetsWithheld": {
            "nullable": true,
            "type": "string"
          },
          "instancesSearched": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "query": {
            "nullable": true,
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/CrossVaultSearchHitDto"
            },
            "nullable": true,
            "type": "array"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CustodialKeyDepositDto": {
        "additionalProperties": false,
        "properties": {
          "custodyKeyId": {
            "nullable": true,
            "type": "string"
          },
          "depositedAt": {
            "format": "date-time",
            "type": "string"
          },
          "sealedToKeyId": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustodialKeyDto": {
        "additionalProperties": false,
        "properties": {
          "custodialKeyId": {
            "nullable": true,
            "type": "string"
          },
          "programmeMemberId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustodialRecordImportResultDto": {
        "additionalProperties": false,
        "properties": {
          "created": {
            "type": "boolean"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustodianGrantDto": {
        "additionalProperties": false,
        "properties": {
          "accessGrantedAt": {
            "format": "date-time",
            "type": "string"
          },
          "guardianUserId": {
            "format": "uuid",
            "type": "string"
          },
          "role": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustodyHandOverStatusDto": {
        "additionalProperties": false,
        "properties": {
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "memberOrganizationId": {
            "format": "uuid",
            "type": "string"
          },
          "message": {
            "nullable": true,
            "type": "string"
          },
          "recordsSecured": {
            "format": "int32",
            "type": "integer"
          },
          "recordsTotal": {
            "format": "int32",
            "type": "integer"
          },
          "stage": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustodyHandedOverDto": {
        "additionalProperties": false,
        "properties": {
          "evidenceDigest": {
            "nullable": true,
            "type": "string"
          },
          "handedOverAt": {
            "format": "date-time",
            "type": "string"
          },
          "programmeMemberId": {
            "format": "uuid",
            "type": "string"
          },
          "securedDocumentCount": {
            "format": "int32",
            "type": "integer"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustodyTransferCertificateDto": {
        "additionalProperties": false,
        "properties": {
          "documentType": {
            "nullable": true,
            "type": "string"
          },
          "documentVersion": {
            "nullable": true,
            "type": "string"
          },
          "issuedAt": {
            "format": "date-time",
            "type": "string"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "supervisionStatus": {
            "nullable": true,
            "type": "string"
          },
          "transfer": {
            "$ref": "#/components/schemas/CustodyTransferDto"
          }
        },
        "type": "object"
      },
      "CustodyTransferDto": {
        "additionalProperties": false,
        "properties": {
          "authorisedByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "custodyTransferId": {
            "format": "uuid",
            "type": "string"
          },
          "minorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "newCustodians": {
            "items": {
              "$ref": "#/components/schemas/CustodianGrantDto"
            },
            "nullable": true,
            "type": "array"
          },
          "orderReference": {
            "nullable": true,
            "type": "string"
          },
          "priorGuardians": {
            "items": {
              "$ref": "#/components/schemas/PriorGuardianSeveranceDto"
            },
            "nullable": true,
            "type": "array"
          },
          "provisioningId": {
            "format": "uuid",
            "type": "string"
          },
          "revokedGuardianCount": {
            "format": "int32",
            "type": "integer"
          },
          "transferredAt": {
            "format": "date-time",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DataRequestDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "grantKind": {
            "nullable": true,
            "type": "string"
          },
          "grantValidTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "injectedDocumentAccessStatement": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "injectedDocumentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "injectedDocumentReadability": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "privacyTermsJson": {
            "nullable": true,
            "type": "string"
          },
          "requestId": {
            "format": "uuid",
            "type": "string"
          },
          "requestedFieldsJson": {
            "nullable": true,
            "type": "string"
          },
          "requesterId": {
            "format": "uuid",
            "type": "string"
          },
          "requesterType": {
            "nullable": true,
            "type": "string"
          },
          "shareToken": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "targetUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DataRequestSummaryDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "grantKind": {
            "nullable": true,
            "type": "string"
          },
          "grantValidTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "injectedDocumentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "privacyTermsJson": {
            "nullable": true,
            "type": "string"
          },
          "requestId": {
            "format": "uuid",
            "type": "string"
          },
          "requestedFieldsJson": {
            "nullable": true,
            "type": "string"
          },
          "requesterDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "requesterId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "requesterRegistryRef": {
            "nullable": true,
            "type": "string"
          },
          "requesterType": {
            "nullable": true,
            "type": "string"
          },
          "requesterUnverifiedReason": {
            "nullable": true,
            "type": "string"
          },
          "requesterVerified": {
            "type": "boolean"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "targetUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DataRequestSummaryDtoPagedResultDto": {
        "additionalProperties": false,
        "properties": {
          "hasNextPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "hasPreviousPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/DataRequestSummaryDto"
            },
            "nullable": true,
            "type": "array"
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalPages": {
            "format": "int32",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DeactivateTemplateCommandResult": {
        "additionalProperties": false,
        "properties": {
          "isActive": {
            "type": "boolean"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "templateId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DeclareBequestRequestDto": {
        "additionalProperties": false,
        "properties": {
          "delayHours": {
            "format": "int32",
            "type": "integer"
          },
          "documentRef": {
            "nullable": true,
            "type": "string"
          },
          "executorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "tier": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DefaultVaultProvisioningStatusDto": {
        "additionalProperties": false,
        "properties": {
          "attempts": {
            "format": "int32",
            "type": "integer"
          },
          "pendingSince": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DelegatedWriteAttributionDto": {
        "additionalProperties": false,
        "properties": {
          "delegateKind": {
            "nullable": true,
            "type": "string"
          },
          "delegateSubjectId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "delegateUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "delegationGrantId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "justification": {
            "nullable": true,
            "type": "string"
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "operation": {
            "nullable": true,
            "type": "string"
          },
          "principalUserId": {
            "format": "uuid",
            "type": "string"
          },
          "resourceId": {
            "format": "uuid",
            "type": "string"
          },
          "resourceType": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DepositCustodialKeyRequestDto": {
        "additionalProperties": false,
        "properties": {
          "custodyKeyId": {
            "nullable": true,
            "type": "string"
          },
          "sealedKey": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "sealedToKeyId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DerivedShareReconciliationDto": {
        "additionalProperties": false,
        "properties": {
          "batchId": {
            "format": "uuid",
            "type": "string"
          },
          "cachedCopies": {
            "$ref": "#/components/schemas/TeardownCohortDto"
          },
          "complete": {
            "readOnly": true,
            "type": "boolean"
          },
          "consentCount": {
            "format": "int32",
            "type": "integer"
          },
          "derivedShares": {
            "$ref": "#/components/schemas/TeardownCohortDto"
          }
        },
        "type": "object"
      },
      "DerivedShareRevocationBatchDto": {
        "additionalProperties": false,
        "properties": {
          "batchId": {
            "format": "uuid",
            "type": "string"
          },
          "consentCount": {
            "format": "int32",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "expectedShareCount": {
            "format": "int32",
            "type": "integer"
          },
          "expectedSubscriptionCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DerivedSharesPreviewDto": {
        "additionalProperties": false,
        "properties": {
          "cachedCopyCount": {
            "format": "int32",
            "type": "integer"
          },
          "derivedShareCount": {
            "format": "int32",
            "type": "integer"
          },
          "perConsent": {
            "items": {
              "$ref": "#/components/schemas/ConsentTeardownPreviewDto"
            },
            "nullable": true,
            "type": "array"
          },
          "totalTeardownCount": {
            "format": "int32",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DisposeReconciliationDisputeRequestDto": {
        "additionalProperties": false,
        "properties": {
          "disposition": {
            "nullable": true,
            "type": "string"
          },
          "disputeId": {
            "format": "uuid",
            "type": "string"
          },
          "note": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocumentActivityDto": {
        "additionalProperties": false,
        "properties": {
          "activityType": {
            "nullable": true,
            "type": "string"
          },
          "actorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocumentActivityPageDto": {
        "additionalProperties": false,
        "properties": {
          "activities": {
            "items": {
              "$ref": "#/components/schemas/DocumentActivityDto"
            },
            "nullable": true,
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DocumentArchiveScope": {
        "enum": [
          0,
          1,
          2
        ],
        "format": "int32",
        "type": "integer"
      },
      "DocumentContentDto": {
        "additionalProperties": false,
        "properties": {
          "ciphertext": {
            "nullable": true,
            "type": "string"
          },
          "envelope": {
            "$ref": "#/components/schemas/DocumentEnvelopeDto"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocumentDeletionResultDto": {
        "additionalProperties": false,
        "properties": {
          "cancelledFieldSubscriptions": {
            "format": "int32",
            "type": "integer"
          },
          "notifiedRecipients": {
            "format": "int32",
            "type": "integer"
          },
          "revokedAnything": {
            "readOnly": true,
            "type": "boolean"
          },
          "revokedDocumentShares": {
            "format": "int32",
            "type": "integer"
          },
          "revokedFieldShares": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DocumentDto": {
        "additionalProperties": false,
        "properties": {
          "archivedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "categoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "contentFormat": {
            "nullable": true,
            "type": "string"
          },
          "contentHash": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "encryptionAlgorithm": {
            "nullable": true,
            "type": "string"
          },
          "fhir": {
            "$ref": "#/components/schemas/FhirMetadataDto"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/DocumentFieldSummaryDto"
            },
            "nullable": true,
            "type": "array"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isArchived": {
            "type": "boolean"
          },
          "isDeleted": {
            "type": "boolean"
          },
          "isSuperseded": {
            "type": "boolean"
          },
          "issuanceEvidence": {
            "$ref": "#/components/schemas/DocumentIssuanceEvidenceDto"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "modifiedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "rowVersion": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "schemaVersion": {
            "nullable": true,
            "type": "string"
          },
          "sensitivityLabel": {
            "nullable": true,
            "type": "string"
          },
          "sensitivityLabelConfirmed": {
            "type": "boolean"
          },
          "sensitivityLabelDowngradeRequested": {
            "nullable": true,
            "type": "string"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "statusOnly": {
            "type": "boolean"
          },
          "supersededAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "supersededByDocumentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          },
          "version": {
            "format": "int32",
            "type": "integer"
          },
          "withdrawalReasonCode": {
            "nullable": true,
            "type": "string"
          },
          "withdrawnAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocumentDtoPagedResultDto": {
        "additionalProperties": false,
        "properties": {
          "hasNextPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "hasPreviousPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/DocumentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalPages": {
            "format": "int32",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DocumentEnvelopeDto": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "nullable": true,
            "type": "string"
          },
          "algorithmVersion": {
            "format": "int32",
            "type": "integer"
          },
          "authTag": {
            "nullable": true,
            "type": "string"
          },
          "keyDerivation": {
            "$ref": "#/components/schemas/DocumentKeyDerivationDto"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "metadata": {
            "nullable": true,
            "type": "string"
          },
          "nonce": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocumentFieldSummaryDto": {
        "additionalProperties": false,
        "properties": {
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "ordinal": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DocumentIssuanceEvidenceDto": {
        "additionalProperties": false,
        "properties": {
          "hasSourceImage": {
            "type": "boolean"
          },
          "isUserAttested": {
            "type": "boolean"
          },
          "issuedAt": {
            "format": "date-time",
            "type": "string"
          },
          "issuerKeyFingerprint": {
            "nullable": true,
            "type": "string"
          },
          "issuerOrganizationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "signature": {
            "nullable": true,
            "type": "string"
          },
          "signatureAlgorithm": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocumentKeyDerivationDto": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "nullable": true,
            "type": "string"
          },
          "hash": {
            "nullable": true,
            "type": "string"
          },
          "info": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocumentLocationDto": {
        "additionalProperties": false,
        "properties": {
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "sealedFieldCount": {
            "format": "int32",
            "type": "integer"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocumentOwnershipDto": {
        "additionalProperties": false,
        "description": "Response body for `GET /api/v{version}/documents/{id}/ownership`\r\n(debt-2026-08-02, EPIC 30 Golden-Rule fix).",
        "properties": {
          "owned": {
            "description": "Whether the queried userId owns the document.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "DocumentPresenceDto": {
        "additionalProperties": false,
        "properties": {
          "counts": {
            "additionalProperties": {
              "format": "int32",
              "type": "integer"
            },
            "nullable": true,
            "type": "object"
          }
        },
        "type": "object"
      },
      "DocumentSearchDto": {
        "additionalProperties": false,
        "properties": {
          "categoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "categoryName": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "fileExtension": {
            "nullable": true,
            "type": "string"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "relevanceScore": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "sensitivityLabel": {
            "nullable": true,
            "type": "string"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "statusOnly": {
            "type": "boolean"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          },
          "version": {
            "format": "int32",
            "type": "integer"
          },
          "versionCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DocumentSearchDtoSearchResult": {
        "additionalProperties": false,
        "properties": {
          "facets": {
            "items": {
              "$ref": "#/components/schemas/SearchFacet"
            },
            "nullable": true,
            "type": "array"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/DocumentSearchDto"
            },
            "nullable": true,
            "type": "array"
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalPages": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DocumentSearchRequest": {
        "additionalProperties": false,
        "description": "Request model for advanced document search.",
        "properties": {
          "filters": {
            "$ref": "#/components/schemas/SearchFilters"
          },
          "options": {
            "$ref": "#/components/schemas/SearchOptions"
          },
          "query": {
            "description": "Optional search query for full-text search across filenames, descriptions, and tags.",
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "description": "The vault ID to search within.",
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocumentShareDto": {
        "additionalProperties": false,
        "properties": {
          "accessCount": {
            "format": "int32",
            "type": "integer"
          },
          "accessLevel": {
            "nullable": true,
            "type": "string"
          },
          "ageInDays": {
            "format": "int32",
            "type": "integer"
          },
          "canEdit": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isExpired": {
            "type": "boolean"
          },
          "isPublic": {
            "type": "boolean"
          },
          "isRevoked": {
            "type": "boolean"
          },
          "isValid": {
            "type": "boolean"
          },
          "isVersionSpecific": {
            "type": "boolean"
          },
          "lastAccessedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "remainingTime": {
            "format": "date-span",
            "nullable": true,
            "type": "string"
          },
          "revokedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "shareToken": {
            "nullable": true,
            "type": "string"
          },
          "shareUrl": {
            "nullable": true,
            "type": "string"
          },
          "sharedWithUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "versionNumber": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DocumentStatisticsDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "lastAccessedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "lastAccessedByUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "modifiedAt": {
            "format": "date-time",
            "type": "string"
          },
          "totalDownloads": {
            "format": "int32",
            "type": "integer"
          },
          "totalShares": {
            "format": "int32",
            "type": "integer"
          },
          "totalVersions": {
            "format": "int32",
            "type": "integer"
          },
          "totalViews": {
            "format": "int32",
            "type": "integer"
          },
          "uniqueDownloaders": {
            "format": "int32",
            "type": "integer"
          },
          "uniqueViewers": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DocumentSupersessionResponse": {
        "additionalProperties": false,
        "properties": {
          "dependents": {
            "items": {
              "$ref": "#/components/schemas/SupersessionDependentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "hasDependents": {
            "type": "boolean"
          },
          "replacementDocumentId": {
            "format": "uuid",
            "type": "string"
          },
          "supersededAt": {
            "format": "date-time",
            "type": "string"
          },
          "supersededDocumentId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocumentVersionDto": {
        "additionalProperties": false,
        "properties": {
          "ageInDays": {
            "format": "int32",
            "type": "integer"
          },
          "changeDescription": {
            "nullable": true,
            "type": "string"
          },
          "contentHash": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "encryptionAlgorithm": {
            "nullable": true,
            "type": "string"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "versionNumber": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ElectProxyExclusionRequestDto": {
        "additionalProperties": false,
        "properties": {
          "guardianActorId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "EnrolOrganizationMasterKeyRequest": {
        "additionalProperties": false,
        "properties": {
          "holderEnvelopes": {
            "items": {
              "$ref": "#/components/schemas/MasterKeyHolderEnvelopeDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "EnrolOrganizationRecoveryKitRequest": {
        "additionalProperties": false,
        "properties": {
          "scheme": {
            "nullable": true,
            "type": "string"
          },
          "verifier": {
            "nullable": true,
            "type": "string"
          },
          "wrappedMasterKey": {
            "nullable": true,
            "type": "string"
          },
          "wrappedPrivateKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "EstateReleaseAuthorizationResultDto": {
        "additionalProperties": false,
        "properties": {
          "changed": {
            "type": "boolean"
          },
          "estateId": {
            "format": "uuid",
            "type": "string"
          },
          "probateGranted": {
            "type": "boolean"
          },
          "releaseAuthorizedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "EvidenceChainDto": {
        "additionalProperties": false,
        "properties": {
          "bound": {
            "type": "boolean"
          },
          "changeId": {
            "format": "uuid",
            "type": "string"
          },
          "deedPollDocumentId": {
            "format": "uuid",
            "type": "string"
          },
          "links": {
            "items": {
              "$ref": "#/components/schemas/EvidenceLinkDto"
            },
            "nullable": true,
            "type": "array"
          },
          "names": {
            "$ref": "#/components/schemas/NamePairDto"
          }
        },
        "type": "object"
      },
      "EvidenceLinkDto": {
        "additionalProperties": false,
        "properties": {
          "auditAnchor": {
            "nullable": true,
            "type": "string"
          },
          "citesDeedPollDocumentId": {
            "format": "uuid",
            "type": "string"
          },
          "eventId": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "occurredAtIso": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExtendShareExpirationCommand": {
        "additionalProperties": false,
        "properties": {
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "newExpiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "requestingUserId": {
            "format": "uuid",
            "type": "string"
          },
          "shareId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FacetValueDto": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "format": "int64",
            "type": "integer"
          },
          "metadata": {
            "nullable": true,
            "type": "string"
          },
          "value": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FamilyMemberVaultProvisionedDto": {
        "additionalProperties": false,
        "properties": {
          "familyPlanReference": {
            "nullable": true,
            "type": "string"
          },
          "memberUserId": {
            "format": "uuid",
            "type": "string"
          },
          "provisionedAt": {
            "format": "date-time",
            "type": "string"
          },
          "provisioningId": {
            "format": "uuid",
            "type": "string"
          },
          "sponsorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "vault": {
            "$ref": "#/components/schemas/VaultDto"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirCodingDto": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "nullable": true,
            "type": "string"
          },
          "display": {
            "nullable": true,
            "type": "string"
          },
          "system": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirMetadataDto": {
        "additionalProperties": false,
        "properties": {
          "codings": {
            "items": {
              "$ref": "#/components/schemas/FhirCodingDto"
            },
            "nullable": true,
            "type": "array"
          },
          "date": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "profileUrl": {
            "nullable": true,
            "type": "string"
          },
          "resourceType": {
            "nullable": true,
            "type": "string"
          },
          "version": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FieldContentDto": {
        "additionalProperties": false,
        "properties": {
          "algorithmVersion": {
            "format": "int32",
            "type": "integer"
          },
          "authTag": {
            "nullable": true,
            "type": "string"
          },
          "ciphertext": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "iv": {
            "nullable": true,
            "type": "string"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "wrappedKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FieldEnvelopeInput": {
        "additionalProperties": false,
        "properties": {
          "algorithmVersion": {
            "format": "int32",
            "type": "integer"
          },
          "authTag": {
            "nullable": true,
            "type": "string"
          },
          "ciphertext": {
            "nullable": true,
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "iv": {
            "nullable": true,
            "type": "string"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "ordinal": {
            "format": "int32",
            "type": "integer"
          },
          "searchableValue": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FieldShareDto": {
        "additionalProperties": false,
        "properties": {
          "accessLevel": {
            "nullable": true,
            "type": "string"
          },
          "consentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "createdByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "crossing": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "grantedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "pendingResolutionDeadline": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "recipientDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "recipientHomeRegion": {
            "nullable": true,
            "type": "string"
          },
          "recipientOrgId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "recipientType": {
            "nullable": true,
            "type": "string"
          },
          "recipientUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "revokedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "suspensionGraceWindowEndsAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "vaultHomeRegion": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FieldShareDtoPagedResultDto": {
        "additionalProperties": false,
        "properties": {
          "hasNextPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "hasPreviousPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/FieldShareDto"
            },
            "nullable": true,
            "type": "array"
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalPages": {
            "format": "int32",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "FieldShareResultItemDto": {
        "additionalProperties": false,
        "properties": {
          "errorCode": {
            "nullable": true,
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "share": {
            "$ref": "#/components/schemas/FieldShareDto"
          },
          "succeeded": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "FieldSubscriptionDto": {
        "additionalProperties": false,
        "properties": {
          "consentId": {
            "format": "uuid",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "maxSyncs": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "remainingSyncs": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "subscriberId": {
            "format": "uuid",
            "type": "string"
          },
          "subscriberType": {
            "nullable": true,
            "type": "string"
          },
          "subscriptionId": {
            "format": "uuid",
            "type": "string"
          },
          "syncType": {
            "nullable": true,
            "type": "string"
          },
          "syncsUsed": {
            "format": "int32",
            "type": "integer"
          },
          "validFrom": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "validTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetDocumentVersionHistoryQueryResult": {
        "additionalProperties": false,
        "properties": {
          "currentVersionNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "totalVersions": {
            "format": "int32",
            "type": "integer"
          },
          "versions": {
            "items": {
              "$ref": "#/components/schemas/DocumentVersionDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "GetTemplatesByCategoryQueryResult": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "templates": {
            "items": {
              "$ref": "#/components/schemas/TemplateDto"
            },
            "nullable": true,
            "type": "array"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "GetTemplatesBySchemaQueryResult": {
        "additionalProperties": false,
        "properties": {
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "templates": {
            "items": {
              "$ref": "#/components/schemas/TemplateDto"
            },
            "nullable": true,
            "type": "array"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "GoverningLawCitationDto": {
        "additionalProperties": false,
        "properties": {
          "ageOfMajority": {
            "format": "int32",
            "type": "integer"
          },
          "citation": {
            "nullable": true,
            "type": "string"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "GrantAccessRequest": {
        "additionalProperties": false,
        "description": "Request model for granting vault access.",
        "properties": {
          "expiresAt": {
            "description": "Optional expiration date for temporary access",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/VaultRole"
          },
          "userId": {
            "description": "ID of the user to grant access to",
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GuardianProxyViewDto": {
        "additionalProperties": false,
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/ProjectedCategoryCountDto"
            },
            "nullable": true,
            "type": "array"
          },
          "guardianActorId": {
            "nullable": true,
            "type": "string"
          },
          "itemCount": {
            "format": "int32",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProjectedProxyItemDto"
            },
            "nullable": true,
            "type": "array"
          },
          "notifications": {
            "items": {
              "$ref": "#/components/schemas/ProjectedNotificationDto"
            },
            "nullable": true,
            "type": "array"
          },
          "subjectRef": {
            "nullable": true,
            "type": "string"
          },
          "timeline": {
            "items": {
              "$ref": "#/components/schemas/ProjectedTimelineBucketDto"
            },
            "nullable": true,
            "type": "array"
          },
          "usage": {
            "items": {
              "$ref": "#/components/schemas/ProjectedUsageLineDto"
            },
            "nullable": true,
            "type": "array"
          },
          "usageTotal": {
            "$ref": "#/components/schemas/ProjectedUsageTotalDto"
          }
        },
        "type": "object"
      },
      "GuardianProxyViewInputDto": {
        "additionalProperties": false,
        "properties": {
          "guardianActorId": {
            "nullable": true,
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProxyViewItemDto"
            },
            "nullable": true,
            "type": "array"
          },
          "notifications": {
            "items": {
              "$ref": "#/components/schemas/ProxyNotificationDto"
            },
            "nullable": true,
            "type": "array"
          },
          "subjectRef": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "items": {
              "$ref": "#/components/schemas/ProxyUsageLineDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "GuardianRevocationDto": {
        "additionalProperties": false,
        "properties": {
          "guardianUserId": {
            "format": "uuid",
            "type": "string"
          },
          "previouslyVisibleSummary": {
            "nullable": true,
            "type": "string"
          },
          "priorRole": {
            "nullable": true,
            "type": "string"
          },
          "retainsResidualView": {
            "type": "boolean"
          },
          "revokedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GuardianRoleAssignmentDto": {
        "additionalProperties": false,
        "properties": {
          "guardianUserId": {
            "format": "uuid",
            "type": "string"
          },
          "role": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "HandOverContactRequestDto": {
        "additionalProperties": false,
        "properties": {
          "closureContext": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "contactLinkId": {
            "format": "uuid",
            "type": "string"
          },
          "contentDigest": {
            "nullable": true,
            "type": "string"
          },
          "disposition": {
            "nullable": true,
            "type": "string"
          },
          "recoveryWindowDays": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "HandoverAuditAnchorDto": {
        "additionalProperties": false,
        "properties": {
          "anchorRequestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "certificateId": {
            "format": "uuid",
            "type": "string"
          },
          "verifyPath": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "HandoverCertificateDto": {
        "additionalProperties": false,
        "properties": {
          "adultUserId": {
            "format": "uuid",
            "type": "string"
          },
          "auditAnchor": {
            "$ref": "#/components/schemas/HandoverAuditAnchorDto"
          },
          "childUserId": {
            "format": "uuid",
            "type": "string"
          },
          "governingLaw": {
            "$ref": "#/components/schemas/GoverningLawCitationDto"
          },
          "guardianAccessRevokedAt": {
            "format": "date-time",
            "type": "string"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "majorityDate": {
            "format": "date",
            "type": "string"
          },
          "recordsByClass": {
            "items": {
              "$ref": "#/components/schemas/HandoverRecordClassCountDto"
            },
            "nullable": true,
            "type": "array"
          },
          "recordsTransferred": {
            "format": "int32",
            "type": "integer"
          },
          "soleKeyCustodyConfirmed": {
            "type": "boolean"
          },
          "transitionId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          },
          "verificationCode": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "HandoverConfirmationDto": {
        "additionalProperties": false,
        "properties": {
          "adultUserId": {
            "format": "uuid",
            "type": "string"
          },
          "childUserId": {
            "format": "uuid",
            "type": "string"
          },
          "formerGuardians": {
            "items": {
              "$ref": "#/components/schemas/GuardianRevocationDto"
            },
            "nullable": true,
            "type": "array"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "remainingGuardianCount": {
            "format": "int32",
            "type": "integer"
          },
          "revokedAt": {
            "format": "date-time",
            "type": "string"
          },
          "transitionId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "HandoverReceiptDto": {
        "additionalProperties": false,
        "properties": {
          "attestation": {
            "$ref": "#/components/schemas/CompletenessAttestationDto"
          },
          "forwardResponsibilityFrom": {
            "format": "date",
            "type": "string"
          },
          "liabilityEndsOn": {
            "format": "date",
            "type": "string"
          },
          "newKeeperName": {
            "nullable": true,
            "type": "string"
          },
          "priorKeeperName": {
            "nullable": true,
            "type": "string"
          },
          "registryNextStep": {
            "$ref": "#/components/schemas/RegistryNextStepDto"
          },
          "scope": {
            "$ref": "#/components/schemas/HandoverScopeDto"
          },
          "subjectName": {
            "nullable": true,
            "type": "string"
          },
          "transferredOn": {
            "format": "date",
            "type": "string"
          },
          "verdict": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "HandoverRecordClassCountDto": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "recordClass": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "HandoverScopeDto": {
        "additionalProperties": false,
        "properties": {
          "complete": {
            "type": "boolean"
          },
          "notIncluded": {
            "items": {
              "$ref": "#/components/schemas/RecordSetDto"
            },
            "nullable": true,
            "type": "array"
          },
          "transferred": {
            "items": {
              "$ref": "#/components/schemas/RecordSetDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "HeldSubjectDto": {
        "additionalProperties": false,
        "properties": {
          "acquiredByKeeperChangeId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "heldSince": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "species": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "HouseholdContactVaultContainerDto": {
        "additionalProperties": false,
        "properties": {
          "activeContactCount": {
            "format": "int32",
            "type": "integer"
          },
          "containerId": {
            "format": "uuid",
            "type": "string"
          },
          "createdByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "householdId": {
            "format": "uuid",
            "type": "string"
          },
          "provisionedAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "HouseholdContactVaultEntryDto": {
        "additionalProperties": false,
        "properties": {
          "addedAt": {
            "format": "date-time",
            "type": "string"
          },
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "ciphertext": {
            "nullable": true,
            "type": "string"
          },
          "contactRef": {
            "nullable": true,
            "type": "string"
          },
          "containerId": {
            "format": "uuid",
            "type": "string"
          },
          "contributorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "entryId": {
            "format": "uuid",
            "type": "string"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "poolMode": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ImportCustodialRecordRequestDto": {
        "additionalProperties": false,
        "properties": {
          "encryptedContent": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "sensitivityLabel": {
            "nullable": true,
            "type": "string"
          },
          "sourceItemId": {
            "nullable": true,
            "type": "string"
          },
          "supersedesSourceItemIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "InitiateKeeperChangeRecordSet": {
        "additionalProperties": false,
        "description": "Full descriptor for a handed-over record set on the initiate request.",
        "properties": {
          "itemCount": {
            "description": "Number of items in the set (0 when unknown at handover time).",
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "kind": {
            "description": "Coarse kind (kebab-case): microchip-registration, vaccination-clinical, full-clinical.",
            "nullable": true,
            "type": "string"
          },
          "label": {
            "description": "Human label, e.g. \"Vaccination & clinical history\".",
            "nullable": true,
            "type": "string"
          },
          "setId": {
            "description": "Stable identifier of the record set.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "InitiateKeeperChangeRequest": {
        "additionalProperties": false,
        "description": "Request body for `POST /api/v1/keeper-changes`. Matches the essence-web\r\n`InitiateKeeperChangeRequest` client contract, enriched with the optional\r\nfull record-set descriptors so the server can render the keep-vs-pass honestly.",
        "properties": {
          "newKeeperHandle": {
            "description": "Handle/email of the new keeper who must accept.",
            "nullable": true,
            "type": "string"
          },
          "newKeeperName": {
            "description": "Display name of the new keeper (optional; defaults to the handle).",
            "nullable": true,
            "type": "string"
          },
          "passingRecordSetIds": {
            "description": "Ids of the record sets that pass to the new keeper (minimal client contract).",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "recipientKind": {
            "description": "Whether the new keeper already holds an Essence account (`essence-user`, default)\r\nor must be invited by email (`email-invite`) — debt-2026-08-10-086. The\r\nessence-web client has always sent this; it is now persisted, and an\r\n`email-invite` handover issues the single-use invite token the emailed link\r\ncarries.",
            "nullable": true,
            "type": "string"
          },
          "recordSets": {
            "description": "Full record-set descriptors (preferred; enables an honest keep-vs-pass DTO).",
            "items": {
              "$ref": "#/components/schemas/InitiateKeeperChangeRecordSet"
            },
            "nullable": true,
            "type": "array"
          },
          "retention": {
            "description": "Retention statement to bind onto the handover consent.",
            "nullable": true,
            "type": "string"
          },
          "subjectId": {
            "description": "The dependent, non-human subject being rehomed.",
            "format": "uuid",
            "type": "string"
          },
          "subjectName": {
            "description": "Display name of the subject.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "InitiateUploadCommand": {
        "additionalProperties": false,
        "properties": {
          "chunkSize": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "contentType": {
            "nullable": true,
            "type": "string"
          },
          "fileHash": {
            "nullable": true,
            "type": "string"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "fileSize": {
            "format": "int64",
            "type": "integer"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "InitiateUploadCommandResult": {
        "additionalProperties": false,
        "properties": {
          "chunkSize": {
            "format": "int32",
            "type": "integer"
          },
          "duplicateDetected": {
            "type": "boolean"
          },
          "existingDocumentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "sessionId": {
            "format": "uuid",
            "type": "string"
          },
          "totalChunks": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "InjectTargetedDocumentCommand": {
        "additionalProperties": false,
        "properties": {
          "consentReference": {
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "injectedDocumentId": {
            "format": "uuid",
            "type": "string"
          },
          "privacyTermsJson": {
            "nullable": true,
            "type": "string"
          },
          "requesterId": {
            "format": "uuid",
            "type": "string"
          },
          "requesterType": {
            "nullable": true,
            "type": "string"
          },
          "targetUserId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "InjectUnmatchedDocumentCommand": {
        "additionalProperties": false,
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "injectedDocumentId": {
            "format": "uuid",
            "type": "string"
          },
          "matchHintHash": {
            "nullable": true,
            "type": "string"
          },
          "privacyTermsJson": {
            "nullable": true,
            "type": "string"
          },
          "requesterId": {
            "format": "uuid",
            "type": "string"
          },
          "requesterType": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "IssuedCredentialDepositRequestDto": {
        "additionalProperties": false,
        "properties": {
          "credentialId": {
            "format": "uuid",
            "type": "string"
          },
          "encryptedContent": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "issuerId": {
            "format": "uuid",
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "IssuedCredentialDepositResultDto": {
        "additionalProperties": false,
        "properties": {
          "created": {
            "type": "boolean"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "KeeperChangeDto": {
        "additionalProperties": false,
        "properties": {
          "consent": {
            "$ref": "#/components/schemas/RecordsHandoverConsentDto"
          },
          "facilitator": {
            "$ref": "#/components/schemas/KeeperChangeFacilitatorDto"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "inviteVerified": {
            "type": "boolean"
          },
          "newKeeperName": {
            "nullable": true,
            "type": "string"
          },
          "passing": {
            "$ref": "#/components/schemas/KeeperChangePassingDto"
          },
          "priorKeeperName": {
            "nullable": true,
            "type": "string"
          },
          "receipt": {
            "$ref": "#/components/schemas/HandoverReceiptDto"
          },
          "recipientKind": {
            "nullable": true,
            "type": "string"
          },
          "retained": {
            "$ref": "#/components/schemas/KeeperChangeRetainedDto"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "subjectId": {
            "format": "uuid",
            "type": "string"
          },
          "subjectName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "KeeperChangeFacilitatorDto": {
        "additionalProperties": false,
        "properties": {
          "organisationId": {
            "format": "uuid",
            "type": "string"
          },
          "organisationName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "KeeperChangeInviteRequest": {
        "additionalProperties": false,
        "description": "Request body for the anonymous invite endpoints\r\n(`POST /api/v1/keeper-changes/{id}/invite/{verify|accept|decline}`).\r\nMatches the essence-web `VerifyHandoverInviteRequest` client type.",
        "properties": {
          "email": {
            "description": "The address the invitee says the invite was sent to.",
            "nullable": true,
            "type": "string"
          },
          "inviteToken": {
            "description": "Single-use invite token from the emailed link.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "KeeperChangePassingDto": {
        "additionalProperties": false,
        "properties": {
          "forwardResponsibility": {
            "type": "boolean"
          },
          "recordSets": {
            "items": {
              "$ref": "#/components/schemas/RecordSetDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "KeeperChangePolicyDto": {
        "additionalProperties": false,
        "properties": {
          "recommendedSetIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "recordSets": {
            "items": {
              "$ref": "#/components/schemas/RecordSetDto"
            },
            "nullable": true,
            "type": "array"
          },
          "retention": {
            "nullable": true,
            "type": "string"
          },
          "retentionReviewMonths": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "KeeperChangeRetainedDto": {
        "additionalProperties": false,
        "properties": {
          "handoverReceipt": {
            "type": "boolean"
          },
          "historicalRecordSets": {
            "items": {
              "$ref": "#/components/schemas/RecordSetDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "KeeperChangeStandingDto": {
        "additionalProperties": false,
        "properties": {
          "awaitingMyDecision": {
            "items": {
              "$ref": "#/components/schemas/KeeperChangeDto"
            },
            "nullable": true,
            "type": "array"
          },
          "sent": {
            "items": {
              "$ref": "#/components/schemas/KeeperChangeDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListDeletedDocumentsQueryResult": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TrashedDocumentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "recoveryWindowDays": {
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ListTemplatesQueryResult": {
        "additionalProperties": false,
        "properties": {
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "templates": {
            "items": {
              "$ref": "#/components/schemas/TemplateDto"
            },
            "nullable": true,
            "type": "array"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalPages": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MasterKeyHolderEnvelopeDto": {
        "additionalProperties": false,
        "properties": {
          "holderUserId": {
            "format": "uuid",
            "type": "string"
          },
          "wrappedMasterKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MeasureModuleRecordExportRequestDto": {
        "additionalProperties": false,
        "properties": {
          "moduleId": {
            "format": "uuid",
            "type": "string"
          },
          "schemaRefs": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "switchId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MediatedCredentialBodyDto": {
        "additionalProperties": false,
        "description": "The opened body: the client-sealed ciphertext, base64-encoded.",
        "properties": {
          "credentialRef": {
            "nullable": true,
            "type": "string"
          },
          "payloadBase64": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MediatedCredentialDescriptorDto": {
        "additionalProperties": false,
        "description": "Descriptor projection — refs, type and claim NAMES only (FR-PMD.003).",
        "properties": {
          "claimNames": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "credentialFormat": {
            "nullable": true,
            "type": "string"
          },
          "credentialRef": {
            "nullable": true,
            "type": "string"
          },
          "credentialType": {
            "nullable": true,
            "type": "string"
          },
          "issuerRef": {
            "nullable": true,
            "type": "string"
          },
          "statusRef": {
            "nullable": true,
            "type": "string"
          },
          "supportsCryptographicSelectiveDisclosure": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "MediatedDescriptorsRequestDto": {
        "additionalProperties": false,
        "description": "Request body for `POST api/v1/vault/mediated-access/descriptors`.",
        "properties": {
          "decisionId": {
            "format": "uuid",
            "type": "string"
          },
          "proofBase64": {
            "nullable": true,
            "type": "string"
          },
          "subjectRef": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MediatedSigningDispatchDto": {
        "additionalProperties": false,
        "description": "Signing dispatch outcome — for the vault store, always an honest refusal.",
        "properties": {
          "dispatched": {
            "type": "boolean"
          },
          "failureReason": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MediatedSigningRequestDto": {
        "additionalProperties": false,
        "description": "Request body for `POST api/v1/vault/mediated-access/signing`.",
        "properties": {
          "decisionId": {
            "format": "uuid",
            "type": "string"
          },
          "keyRef": {
            "nullable": true,
            "type": "string"
          },
          "payloadBase64": {
            "nullable": true,
            "type": "string"
          },
          "proofBase64": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MemberCustodyKeyDto": {
        "additionalProperties": false,
        "properties": {
          "custodyKeyId": {
            "nullable": true,
            "type": "string"
          },
          "depositedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sealedKey": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "sealedToKeyId": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MemberCustodyKeysDto": {
        "additionalProperties": false,
        "properties": {
          "keys": {
            "items": {
              "$ref": "#/components/schemas/MemberCustodyKeyDto"
            },
            "nullable": true,
            "type": "array"
          },
          "memberOrganizationId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MergeConflictItemDto": {
        "additionalProperties": false,
        "properties": {
          "categoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "categoryName": {
            "nullable": true,
            "type": "string"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "isCritical": {
            "type": "boolean"
          },
          "resolutionDecision": {
            "nullable": true,
            "type": "string"
          },
          "sourceDocumentId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MergeConflictQueueDto": {
        "additionalProperties": false,
        "properties": {
          "autoResolvedCount": {
            "format": "int32",
            "type": "integer"
          },
          "conflicts": {
            "items": {
              "$ref": "#/components/schemas/MergeConflictQueueItemDto"
            },
            "nullable": true,
            "type": "array"
          },
          "mergeId": {
            "format": "uuid",
            "type": "string"
          },
          "unreadableCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MergeConflictQueueItemDto": {
        "additionalProperties": false,
        "properties": {
          "accountA": {
            "nullable": true,
            "type": "string"
          },
          "accountB": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "nullable": true,
            "type": "string"
          },
          "kind": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "severity": {
            "nullable": true,
            "type": "string"
          },
          "similarKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MergeConflictsDto": {
        "additionalProperties": false,
        "properties": {
          "autoResolved": {
            "items": {
              "$ref": "#/components/schemas/MergeConflictItemDto"
            },
            "nullable": true,
            "type": "array"
          },
          "critical": {
            "items": {
              "$ref": "#/components/schemas/MergeConflictItemDto"
            },
            "nullable": true,
            "type": "array"
          },
          "domain": {
            "nullable": true,
            "type": "string"
          },
          "mergeId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MergeConsentOutcomeRowDto": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "outcome": {
            "nullable": true,
            "type": "string"
          },
          "party": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MergeConsentSummaryDto": {
        "additionalProperties": false,
        "properties": {
          "affected": {
            "format": "int32",
            "type": "integer"
          },
          "carried": {
            "format": "int32",
            "type": "integer"
          },
          "dropped": {
            "format": "int32",
            "type": "integer"
          },
          "reconfirm": {
            "format": "int32",
            "type": "integer"
          },
          "suspended": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MergeContactDedupRowDto": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "nullable": true,
            "type": "string"
          },
          "kind": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MergeContactSummaryDto": {
        "additionalProperties": false,
        "properties": {
          "affected": {
            "format": "int32",
            "type": "integer"
          },
          "duplicatesMerged": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MergeDocumentSummaryDto": {
        "additionalProperties": false,
        "properties": {
          "affected": {
            "format": "int32",
            "type": "integer"
          },
          "conflicts": {
            "format": "int32",
            "type": "integer"
          },
          "duplicates": {
            "format": "int32",
            "type": "integer"
          },
          "unreadable": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MergeItemOutcomeDto": {
        "additionalProperties": false,
        "properties": {
          "classification": {
            "nullable": true,
            "type": "string"
          },
          "outcome": {
            "nullable": true,
            "type": "string"
          },
          "sourceDocumentId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MergeResolutionChoiceDto": {
        "additionalProperties": false,
        "properties": {
          "choice": {
            "nullable": true,
            "type": "string"
          },
          "conflictId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MergeSummaryDto": {
        "additionalProperties": false,
        "properties": {
          "consents": {
            "items": {
              "$ref": "#/components/schemas/MergeConsentOutcomeRowDto"
            },
            "nullable": true,
            "type": "array"
          },
          "contacts": {
            "items": {
              "$ref": "#/components/schemas/MergeContactDedupRowDto"
            },
            "nullable": true,
            "type": "array"
          },
          "mergeId": {
            "format": "uuid",
            "type": "string"
          },
          "summary": {
            "$ref": "#/components/schemas/MergeSummaryFiguresDto"
          }
        },
        "type": "object"
      },
      "MergeSummaryFiguresDto": {
        "additionalProperties": false,
        "properties": {
          "consents": {
            "$ref": "#/components/schemas/MergeConsentSummaryDto"
          },
          "contacts": {
            "$ref": "#/components/schemas/MergeContactSummaryDto"
          },
          "documents": {
            "$ref": "#/components/schemas/MergeDocumentSummaryDto"
          }
        },
        "type": "object"
      },
      "MigrationDocumentLoadRequestDto": {
        "additionalProperties": false,
        "properties": {
          "encryptedContent": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "jobId": {
            "format": "uuid",
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "recordKey": {
            "nullable": true,
            "type": "string"
          },
          "sensitivityLabel": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MigrationDocumentLoadResultDto": {
        "additionalProperties": false,
        "properties": {
          "created": {
            "type": "boolean"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ModuleRecordExportDto": {
        "additionalProperties": false,
        "properties": {
          "documentSetDigest": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "listedCount": {
            "format": "int32",
            "type": "integer"
          },
          "measuredAt": {
            "format": "date-time",
            "type": "string"
          },
          "moduleId": {
            "format": "uuid",
            "type": "string"
          },
          "organizationId": {
            "format": "uuid",
            "type": "string"
          },
          "recordCount": {
            "format": "int32",
            "type": "integer"
          },
          "requestedBy": {
            "format": "uuid",
            "type": "string"
          },
          "schemaRefs": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "switchId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "unreachableCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ModuleRecordExportItemDto": {
        "additionalProperties": false,
        "properties": {
          "contentHash": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "documentVersion": {
            "format": "int32",
            "type": "integer"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "schemaVersion": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ModuleRecordExportItemDtoCursorResult": {
        "additionalProperties": false,
        "properties": {
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ModuleRecordExportItemDto"
            },
            "nullable": true,
            "type": "array"
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "previousCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MoveCategoryCommand": {
        "additionalProperties": false,
        "properties": {
          "categoryId": {
            "format": "uuid",
            "type": "string"
          },
          "newParentCategoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "requestingUserId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "NamePairDto": {
        "additionalProperties": false,
        "properties": {
          "newName": {
            "nullable": true,
            "type": "string"
          },
          "newNameMasked": {
            "nullable": true,
            "type": "string"
          },
          "previousName": {
            "nullable": true,
            "type": "string"
          },
          "previousNameMasked": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "NewbornSeedRecordDto": {
        "additionalProperties": false,
        "properties": {
          "attachedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "attachedDocumentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "sourceRecordId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "NewbornVaultProvisioningDto": {
        "additionalProperties": false,
        "properties": {
          "episodeId": {
            "format": "uuid",
            "type": "string"
          },
          "graduationDate": {
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "inheritedShareCount": {
            "format": "int32",
            "type": "integer"
          },
          "inheritedSharesVerifiedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "motherUserId": {
            "format": "uuid",
            "type": "string"
          },
          "newbornUserId": {
            "format": "uuid",
            "type": "string"
          },
          "provisionedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "provisioningAuditReference": {
            "nullable": true,
            "type": "string"
          },
          "seedRecords": {
            "items": {
              "$ref": "#/components/schemas/NewbornSeedRecordDto"
            },
            "nullable": true,
            "type": "array"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "supervisedProvisioningId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OpenMediatedCredentialRequestDto": {
        "additionalProperties": false,
        "description": "Request body for `POST api/v1/vault/mediated-access/open`.",
        "properties": {
          "credentialRef": {
            "nullable": true,
            "type": "string"
          },
          "decisionId": {
            "format": "uuid",
            "type": "string"
          },
          "proofBase64": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationConsentLedger": {
        "additionalProperties": false,
        "properties": {
          "counterparties": {
            "items": {
              "$ref": "#/components/schemas/CounterpartyConsentLedgerRow"
            },
            "nullable": true,
            "type": "array"
          },
          "counterpartyOrganizations": {
            "items": {
              "$ref": "#/components/schemas/CounterpartyOrganizationConsentLedgerRow"
            },
            "nullable": true,
            "type": "array"
          },
          "summary": {
            "$ref": "#/components/schemas/OrganizationConsentLedgerSummary"
          }
        },
        "type": "object"
      },
      "OrganizationConsentLedgerSummary": {
        "additionalProperties": false,
        "properties": {
          "expiringWithin30Days": {
            "format": "int32",
            "type": "integer"
          },
          "fieldsHeld": {
            "format": "int32",
            "type": "integer"
          },
          "liveConsents": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "OrganizationKeyHolderEnvelopeDto": {
        "additionalProperties": false,
        "properties": {
          "holderUserId": {
            "format": "uuid",
            "type": "string"
          },
          "organizationId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "wrappedByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "wrappedMasterKey": {
            "nullable": true,
            "type": "string"
          },
          "wrappedPrivateKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationKeyHoldersDto": {
        "additionalProperties": false,
        "properties": {
          "holderUserIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "organizationId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationKeyPairSummaryDto": {
        "additionalProperties": false,
        "properties": {
          "activeKeyHolderCount": {
            "format": "int32",
            "type": "integer"
          },
          "algorithm": {
            "nullable": true,
            "type": "string"
          },
          "hasMasterKey": {
            "readOnly": true,
            "type": "boolean"
          },
          "masterKeyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "organizationId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationPublicKeyDto": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "format": "uuid",
            "type": "string"
          },
          "publicKey": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationRecoveryKitEnvelopeDto": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "nullable": true,
            "type": "string"
          },
          "masterKeyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "organizationId": {
            "format": "uuid",
            "type": "string"
          },
          "publicKey": {
            "nullable": true,
            "type": "string"
          },
          "scheme": {
            "nullable": true,
            "type": "string"
          },
          "wrappedMasterKey": {
            "nullable": true,
            "type": "string"
          },
          "wrappedPrivateKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationRecoveryKitStatusDto": {
        "additionalProperties": false,
        "properties": {
          "callerIsKeyHolder": {
            "type": "boolean"
          },
          "enroledAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "enroledByUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "enrolled": {
            "type": "boolean"
          },
          "lastClaimedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "lastClaimedByUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "masterKeyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "organizationId": {
            "format": "uuid",
            "type": "string"
          },
          "scheme": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationSealedDocumentContentDto": {
        "additionalProperties": false,
        "properties": {
          "ciphertext": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationSealedDocumentDto": {
        "additionalProperties": false,
        "properties": {
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "sensitivityLabel": {
            "nullable": true,
            "type": "string"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "statusOnly": {
            "type": "boolean"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationSealedDocumentDtoCursorResult": {
        "additionalProperties": false,
        "properties": {
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrganizationSealedDocumentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "previousCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationVaultCountDto": {
        "additionalProperties": false,
        "properties": {
          "organizationId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PendingSponsoredEntitlementDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currentPlan": {
            "nullable": true,
            "type": "string"
          },
          "decidedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isActionable": {
            "type": "boolean"
          },
          "offeredPlan": {
            "nullable": true,
            "type": "string"
          },
          "sponsorDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "sponsorId": {
            "format": "uuid",
            "type": "string"
          },
          "sponsorReference": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PoolHouseholdContactRequestDto": {
        "additionalProperties": false,
        "properties": {
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "ciphertext": {
            "nullable": true,
            "type": "string"
          },
          "contactRef": {
            "nullable": true,
            "type": "string"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "poolMode": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PrepareReconciliationRequestDto": {
        "additionalProperties": false,
        "properties": {
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/ReconciliationCandidateDto"
            },
            "nullable": true,
            "type": "array"
          },
          "matchDecision": {
            "nullable": true,
            "type": "string"
          },
          "originJurisdiction": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PreviewVaultMergeRequestDto": {
        "additionalProperties": false,
        "properties": {
          "sourceVaultId": {
            "format": "uuid",
            "type": "string"
          },
          "targetVaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PriorGuardianSeveranceDto": {
        "additionalProperties": false,
        "properties": {
          "accessEndedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "guardianUserId": {
            "format": "uuid",
            "type": "string"
          },
          "retainedUnderNewOrder": {
            "type": "boolean"
          },
          "role": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProblemDetails": {
        "additionalProperties": {},
        "properties": {
          "detail": {
            "nullable": true,
            "type": "string"
          },
          "instance": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProgrammeRecordsHandOverDto": {
        "additionalProperties": false,
        "properties": {
          "message": {
            "nullable": true,
            "type": "string"
          },
          "recordsSecured": {
            "format": "int32",
            "type": "integer"
          },
          "recordsTotal": {
            "format": "int32",
            "type": "integer"
          },
          "stage": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProjectedCategoryCountDto": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "count": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ProjectedNotificationDto": {
        "additionalProperties": false,
        "properties": {
          "notificationRef": {
            "nullable": true,
            "type": "string"
          },
          "occurredAt": {
            "nullable": true,
            "type": "string"
          },
          "summary": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProjectedProxyItemDto": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "itemRef": {
            "nullable": true,
            "type": "string"
          },
          "occurredAt": {
            "nullable": true,
            "type": "string"
          },
          "position": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ProjectedTimelineBucketDto": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "periodKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProjectedUsageLineDto": {
        "additionalProperties": false,
        "properties": {
          "amountMinorUnits": {
            "format": "int64",
            "type": "integer"
          },
          "lineRef": {
            "nullable": true,
            "type": "string"
          },
          "sku": {
            "nullable": true,
            "type": "string"
          },
          "units": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ProjectedUsageTotalDto": {
        "additionalProperties": false,
        "properties": {
          "amountMinorUnits": {
            "format": "int64",
            "type": "integer"
          },
          "units": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ProvisionAttorneyScopeRequestDto": {
        "additionalProperties": false,
        "properties": {
          "attorneyUserId": {
            "format": "uuid",
            "type": "string"
          },
          "authorityRecordId": {
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "scopedCategories": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "scopedDocumentIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "scopedFieldIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProvisionFamilyMemberVaultRequestDto": {
        "additionalProperties": false,
        "properties": {
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "familyPlanReference": {
            "nullable": true,
            "type": "string"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "maxStorageSizeBytes": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "memberUserId": {
            "format": "uuid",
            "type": "string"
          },
          "salt": {
            "nullable": true,
            "type": "string"
          },
          "vaultName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProvisionHouseholdContainerRequestDto": {
        "additionalProperties": false,
        "properties": {
          "householdId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProvisionMinorVaultRequestDto": {
        "additionalProperties": false,
        "properties": {
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "custodyOrderReference": {
            "nullable": true,
            "type": "string"
          },
          "graduationDate": {
            "format": "date",
            "type": "string"
          },
          "guardians": {
            "items": {
              "$ref": "#/components/schemas/GuardianRoleAssignmentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "minorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "salt": {
            "nullable": true,
            "type": "string"
          },
          "vaultName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProvisionNewbornVaultRequestDto": {
        "additionalProperties": false,
        "properties": {
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "graduationDate": {
            "format": "date",
            "type": "string"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "salt": {
            "nullable": true,
            "type": "string"
          },
          "vaultName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProvisionOrganizationKeyPairRequest": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "nullable": true,
            "type": "string"
          },
          "founderWrappedMasterKey": {
            "nullable": true,
            "type": "string"
          },
          "founderWrappedPrivateKey": {
            "nullable": true,
            "type": "string"
          },
          "publicKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProxyExclusionDto": {
        "additionalProperties": false,
        "properties": {
          "electedAt": {
            "format": "date-time",
            "type": "string"
          },
          "exclusionId": {
            "format": "uuid",
            "type": "string"
          },
          "guardianActorId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "itemRef": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProxyNotificationDto": {
        "additionalProperties": false,
        "properties": {
          "itemRef": {
            "nullable": true,
            "type": "string"
          },
          "notificationRef": {
            "nullable": true,
            "type": "string"
          },
          "occurredAt": {
            "nullable": true,
            "type": "string"
          },
          "summary": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProxyUsageLineDto": {
        "additionalProperties": false,
        "properties": {
          "amountMinorUnits": {
            "format": "int64",
            "type": "integer"
          },
          "itemRef": {
            "nullable": true,
            "type": "string"
          },
          "lineRef": {
            "nullable": true,
            "type": "string"
          },
          "sku": {
            "nullable": true,
            "type": "string"
          },
          "units": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ProxyViewItemDto": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "excluded": {
            "type": "boolean"
          },
          "itemRef": {
            "nullable": true,
            "type": "string"
          },
          "occurredAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PublicDocumentShareDto": {
        "additionalProperties": false,
        "properties": {
          "accessLevel": {
            "nullable": true,
            "type": "string"
          },
          "canEdit": {
            "type": "boolean"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "isExpired": {
            "type": "boolean"
          },
          "isPublic": {
            "type": "boolean"
          },
          "isRevoked": {
            "type": "boolean"
          },
          "isValid": {
            "type": "boolean"
          },
          "isVersionSpecific": {
            "type": "boolean"
          },
          "remainingTime": {
            "format": "date-span",
            "nullable": true,
            "type": "string"
          },
          "versionNumber": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PublishMemberAccountKeyRequestDto": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "nullable": true,
            "type": "string"
          },
          "publicKey": {
            "nullable": true,
            "type": "string"
          },
          "wrappedMasterKey": {
            "nullable": true,
            "type": "string"
          },
          "wrappedPrivateKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RaiseReconciliationDisputeRequestDto": {
        "additionalProperties": false,
        "properties": {
          "detail": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "stage": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RebindSplitContainersRequestDto": {
        "additionalProperties": false,
        "properties": {
          "containerIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "RebindSplitContainersResultDto": {
        "additionalProperties": false,
        "properties": {
          "outcomes": {
            "items": {
              "$ref": "#/components/schemas/SplitContainerRebindOutcomeDto"
            },
            "nullable": true,
            "type": "array"
          },
          "rebind": {
            "$ref": "#/components/schemas/VaultSplitRebindDto"
          }
        },
        "type": "object"
      },
      "ReconciliationCandidateDto": {
        "additionalProperties": false,
        "properties": {
          "alreadyPresentByContentHash": {
            "type": "boolean"
          },
          "classification": {
            "nullable": true,
            "type": "string"
          },
          "contentHash": {
            "nullable": true,
            "type": "string"
          },
          "residencyLockedToOrigin": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ReconciliationDisputeDto": {
        "additionalProperties": false,
        "properties": {
          "caseRef": {
            "nullable": true,
            "type": "string"
          },
          "chainedToSignatureValue": {
            "nullable": true,
            "type": "string"
          },
          "disposedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "dispositionNote": {
            "nullable": true,
            "type": "string"
          },
          "intakeId": {
            "format": "uuid",
            "type": "string"
          },
          "nextStep": {
            "nullable": true,
            "type": "string"
          },
          "raisedAt": {
            "format": "date-time",
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "reconciliationStatus": {
            "nullable": true,
            "type": "string"
          },
          "stage": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ReconciliationDisputeQueueItemDto": {
        "additionalProperties": false,
        "properties": {
          "carryOverCount": {
            "format": "int32",
            "type": "integer"
          },
          "confirmedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "deduplicatedCount": {
            "format": "int32",
            "type": "integer"
          },
          "detail": {
            "nullable": true,
            "type": "string"
          },
          "disputeId": {
            "format": "uuid",
            "type": "string"
          },
          "disputeWindowClosesAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "intakeId": {
            "format": "uuid",
            "type": "string"
          },
          "leftBehindCount": {
            "format": "int32",
            "type": "integer"
          },
          "originJurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "raisedAt": {
            "format": "date-time",
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "reconciliationId": {
            "format": "uuid",
            "type": "string"
          },
          "reconciliationStatus": {
            "nullable": true,
            "type": "string"
          },
          "returningUserId": {
            "format": "uuid",
            "type": "string"
          },
          "stage": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ReconciliationItemDto": {
        "additionalProperties": false,
        "properties": {
          "alreadyPresentByContentHash": {
            "type": "boolean"
          },
          "classification": {
            "nullable": true,
            "type": "string"
          },
          "compensatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "compensatingDisposition": {
            "nullable": true,
            "type": "string"
          },
          "contentHash": {
            "nullable": true,
            "type": "string"
          },
          "disposition": {
            "nullable": true,
            "type": "string"
          },
          "finalDisposition": {
            "nullable": true,
            "type": "string"
          },
          "itemId": {
            "format": "uuid",
            "type": "string"
          },
          "originJurisdictionDisposition": {
            "nullable": true,
            "type": "string"
          },
          "residencyLockedToOrigin": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ReconciliationSignatureDto": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "nullable": true,
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "signedAt": {
            "format": "date-time",
            "type": "string"
          },
          "value": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RecordDelegatedWriteRequestDto": {
        "additionalProperties": false,
        "properties": {
          "delegationGrantId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "justification": {
            "nullable": true,
            "type": "string"
          },
          "operation": {
            "nullable": true,
            "type": "string"
          },
          "principalUserId": {
            "format": "uuid",
            "type": "string"
          },
          "resourceId": {
            "format": "uuid",
            "type": "string"
          },
          "resourceType": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RecordImportSealRequestDto": {
        "additionalProperties": false,
        "properties": {
          "algorithmLabel": {
            "nullable": true,
            "type": "string"
          },
          "encryptedRecordCount": {
            "format": "int32",
            "type": "integer"
          },
          "sealReceiptHash": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RecordSetDto": {
        "additionalProperties": false,
        "properties": {
          "itemCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "kind": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "setId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RecordsHandoverConsentDto": {
        "additionalProperties": false,
        "properties": {
          "disclosureRecordId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "lawfulBasis": {
            "nullable": true,
            "type": "string"
          },
          "purpose": {
            "nullable": true,
            "type": "string"
          },
          "retention": {
            "nullable": true,
            "type": "string"
          },
          "retentionReviewMonths": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "vetContinuedAccess": {
            "$ref": "#/components/schemas/VetContinuedAccessDto"
          }
        },
        "type": "object"
      },
      "RectificationNoticeDto": {
        "additionalProperties": false,
        "properties": {
          "committedAt": {
            "format": "date-time",
            "type": "string"
          },
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "receivedAt": {
            "format": "date-time",
            "type": "string"
          },
          "recipientCompleteness": {
            "nullable": true,
            "type": "string"
          },
          "recipientCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "recordHeldHere": {
            "nullable": true,
            "type": "boolean"
          },
          "recordId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "rectificationId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RedeemGrantCertificateRequest": {
        "additionalProperties": false,
        "properties": {
          "certificate": {
            "description": "The compact RS256 certificate Essence issued to the claimant when they completed their claim.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RedeemGrantCertificateResponse": {
        "additionalProperties": false,
        "properties": {
          "organizationId": {
            "description": "The organisation this instance may now mint keys for.",
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RegisterCustodialKeyRequestDto": {
        "additionalProperties": false,
        "properties": {
          "publicKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RegisterDerivedShareRevocationBatchCommand": {
        "additionalProperties": false,
        "properties": {
          "batchId": {
            "format": "uuid",
            "type": "string"
          },
          "consentIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "ownerUserId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RegisterHeldSubjectRequest": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "species": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RegisterPendingSponsoredEntitlementCommand": {
        "additionalProperties": false,
        "properties": {
          "currentPlan": {
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "offeredPlan": {
            "nullable": true,
            "type": "string"
          },
          "ownerUserId": {
            "format": "uuid",
            "type": "string"
          },
          "sponsorDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "sponsorId": {
            "format": "uuid",
            "type": "string"
          },
          "sponsorReference": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RegisterSensitiveRoleKeyRequestDto": {
        "additionalProperties": false,
        "properties": {
          "publicKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RegistryNextStepDto": {
        "additionalProperties": false,
        "properties": {
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "registryName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RelyingPartyCoverageDto": {
        "additionalProperties": false,
        "properties": {
          "inGraceWindow": {
            "format": "int32",
            "type": "integer"
          },
          "onNewName": {
            "format": "int32",
            "type": "integer"
          },
          "onOldName": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RenewalDocumentEnvelopesDto": {
        "additionalProperties": false,
        "properties": {
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/RenewalFieldEnvelopeDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "RenewalFieldEnvelopeDto": {
        "additionalProperties": false,
        "properties": {
          "algorithmVersion": {
            "format": "int32",
            "type": "integer"
          },
          "authTag": {
            "nullable": true,
            "type": "string"
          },
          "ciphertext": {
            "nullable": true,
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "iv": {
            "nullable": true,
            "type": "string"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "ordinal": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RenewalFieldEnvelopesDto": {
        "additionalProperties": false,
        "properties": {
          "addedFieldIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "comparableFieldIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "previous": {
            "$ref": "#/components/schemas/RenewalDocumentEnvelopesDto"
          },
          "removedFieldIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "replacement": {
            "$ref": "#/components/schemas/RenewalDocumentEnvelopesDto"
          }
        },
        "type": "object"
      },
      "ReplaceDocumentContentRequestDto": {
        "additionalProperties": false,
        "properties": {
          "algorithmVersion": {
            "format": "int32",
            "type": "integer"
          },
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "changeDescription": {
            "nullable": true,
            "type": "string"
          },
          "contentHash": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "encryptedContent": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "expectedRowVersion": {
            "nullable": true,
            "type": "string"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/ReplaceDocumentFieldEnvelopeDto"
            },
            "nullable": true,
            "type": "array"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "keyDerivationFunction": {
            "nullable": true,
            "type": "string"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "salt": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "schemaVersion": {
            "nullable": true,
            "type": "string"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "ReplaceDocumentFieldEnvelopeDto": {
        "additionalProperties": false,
        "properties": {
          "algorithmVersion": {
            "format": "int32",
            "type": "integer"
          },
          "authTag": {
            "nullable": true,
            "type": "string"
          },
          "ciphertext": {
            "nullable": true,
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "iv": {
            "nullable": true,
            "type": "string"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "ordinal": {
            "format": "int32",
            "type": "integer"
          },
          "searchableValue": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResealSensitiveRecordRequestDto": {
        "additionalProperties": false,
        "properties": {
          "encryptedContent": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "sourceItemId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResidualVisibilityCategoryDto": {
        "additionalProperties": false,
        "properties": {
          "appliesFrom": {
            "format": "date",
            "type": "string"
          },
          "categoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "categoryName": {
            "nullable": true,
            "type": "string"
          },
          "documentCount": {
            "format": "int32",
            "type": "integer"
          },
          "formerGuardianUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "lawfulBasis": {
            "nullable": true,
            "type": "string"
          },
          "retainsView": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ResidualVisibilityDto": {
        "additionalProperties": false,
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/ResidualVisibilityCategoryDto"
            },
            "nullable": true,
            "type": "array"
          },
          "childUserId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResolvePendingFieldShareCommand": {
        "additionalProperties": false,
        "properties": {
          "fieldShareId": {
            "format": "uuid",
            "type": "string"
          },
          "requestingUserId": {
            "format": "uuid",
            "type": "string"
          },
          "wrappedFieldKeyBase64": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ReturningNationalReconciliationDto": {
        "additionalProperties": false,
        "properties": {
          "bootstrapDecisionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "carryOverCount": {
            "format": "int32",
            "type": "integer"
          },
          "confirmedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "deduplicatedCount": {
            "format": "int32",
            "type": "integer"
          },
          "disputeWindowClosesAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "disputeWindowHours": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "disputes": {
            "items": {
              "$ref": "#/components/schemas/ReconciliationDisputeDto"
            },
            "nullable": true,
            "type": "array"
          },
          "homeVaultId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "intakeId": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReconciliationItemDto"
            },
            "nullable": true,
            "type": "array"
          },
          "leftBehindCount": {
            "format": "int32",
            "type": "integer"
          },
          "matchDecision": {
            "nullable": true,
            "type": "string"
          },
          "originJurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "preparedAt": {
            "format": "date-time",
            "type": "string"
          },
          "reconciliationId": {
            "format": "uuid",
            "type": "string"
          },
          "returningUserId": {
            "format": "uuid",
            "type": "string"
          },
          "signature": {
            "$ref": "#/components/schemas/ReconciliationSignatureDto"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RevocationProofDto": {
        "additionalProperties": false,
        "properties": {
          "adultUserId": {
            "format": "uuid",
            "type": "string"
          },
          "childUserId": {
            "format": "uuid",
            "type": "string"
          },
          "guardianAccessRevokedAt": {
            "format": "date-time",
            "type": "string"
          },
          "ownershipReboundAt": {
            "format": "date-time",
            "type": "string"
          },
          "revokedGuardians": {
            "items": {
              "$ref": "#/components/schemas/GuardianRevocationDto"
            },
            "nullable": true,
            "type": "array"
          },
          "transitionId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          },
          "verificationCode": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RevokeAttorneyScopeRequestDto": {
        "additionalProperties": false,
        "properties": {
          "scopeGrantId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RewrapOrganizationSealedDocumentRequestDto": {
        "additionalProperties": false,
        "properties": {
          "encryptedContent": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RollbackDocumentVersionCommand": {
        "additionalProperties": false,
        "properties": {
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "expectedRowVersion": {
            "nullable": true,
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          },
          "versionNumber": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RotateOrganizationKeyPairRequest": {
        "additionalProperties": false,
        "properties": {
          "holderEnvelopes": {
            "items": {
              "$ref": "#/components/schemas/RotatedHolderEnvelopeDto"
            },
            "nullable": true,
            "type": "array"
          },
          "newPublicKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RotateSensitiveRoleKeyRequestDto": {
        "additionalProperties": false,
        "properties": {
          "publicKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RotatedHolderEnvelopeDto": {
        "additionalProperties": false,
        "properties": {
          "holderUserId": {
            "format": "uuid",
            "type": "string"
          },
          "wrappedMasterKey": {
            "nullable": true,
            "type": "string"
          },
          "wrappedPrivateKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SearchFacet": {
        "additionalProperties": false,
        "properties": {
          "field": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "values": {
            "items": {
              "$ref": "#/components/schemas/SearchFacetValue"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "SearchFacetDto": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "fieldName": {
            "nullable": true,
            "type": "string"
          },
          "hasValues": {
            "type": "boolean"
          },
          "valueCount": {
            "format": "int32",
            "type": "integer"
          },
          "values": {
            "items": {
              "$ref": "#/components/schemas/FacetValueDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "SearchFacetValue": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "value": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SearchFilters": {
        "additionalProperties": false,
        "properties": {
          "categoryIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "dateFrom": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "dateTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "fileTypes": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "maxSize": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "minSize": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "schemaRefs": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "SearchOptions": {
        "additionalProperties": false,
        "properties": {
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "sortBy": {
            "nullable": true,
            "type": "string"
          },
          "sortOrder": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SearchResultDto": {
        "additionalProperties": false,
        "properties": {
          "degradedReason": {
            "nullable": true,
            "type": "string"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/DocumentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "facets": {
            "items": {
              "$ref": "#/components/schemas/SearchFacetDto"
            },
            "nullable": true,
            "type": "array"
          },
          "firstItemIndex": {
            "format": "int32",
            "type": "integer"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "isDegraded": {
            "type": "boolean"
          },
          "isEmpty": {
            "type": "boolean"
          },
          "lastItemIndex": {
            "format": "int32",
            "type": "integer"
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "format": "int64",
            "type": "integer"
          },
          "totalPages": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SearchSuggestion": {
        "additionalProperties": false,
        "properties": {
          "context": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "nullable": true,
            "type": "string"
          },
          "value": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SeedSupervisedVaultRequestDto": {
        "additionalProperties": false,
        "properties": {
          "custodyOrderReference": {
            "nullable": true,
            "type": "string"
          },
          "graduationDate": {
            "format": "date",
            "type": "string"
          },
          "guardians": {
            "items": {
              "$ref": "#/components/schemas/GuardianRoleAssignmentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "minorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SelfExclusionDto": {
        "additionalProperties": false,
        "properties": {
          "blockedActivities": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "permanent": {
            "type": "boolean"
          },
          "scheme": {
            "nullable": true,
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "validUntil": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SensitiveRecordResealedDto": {
        "additionalProperties": false,
        "properties": {
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "recordsSealedToRetiringKey": {
            "format": "int32",
            "type": "integer"
          },
          "resealed": {
            "type": "boolean"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SensitiveRoleKeyDto": {
        "additionalProperties": false,
        "properties": {
          "programmeMemberId": {
            "format": "uuid",
            "type": "string"
          },
          "sensitiveRoleKeyId": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SensitiveRoleKeyRetirementDto": {
        "additionalProperties": false,
        "properties": {
          "recordsSealedToReplacement": {
            "format": "int32",
            "type": "integer"
          },
          "replacedByKeyId": {
            "nullable": true,
            "type": "string"
          },
          "retiredAt": {
            "format": "date-time",
            "type": "string"
          },
          "retiredKeyId": {
            "nullable": true,
            "type": "string"
          },
          "rotatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SensitiveRoleKeyRotationDto": {
        "additionalProperties": false,
        "properties": {
          "programmeMemberId": {
            "format": "uuid",
            "type": "string"
          },
          "recordsSealedToRetiringKey": {
            "format": "int32",
            "type": "integer"
          },
          "remainingSourceItemIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "retirements": {
            "items": {
              "$ref": "#/components/schemas/SensitiveRoleKeyRetirementDto"
            },
            "nullable": true,
            "type": "array"
          },
          "retiringKeyId": {
            "nullable": true,
            "type": "string"
          },
          "rotatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sensitiveRoleKeyId": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SensitivityLabelDowngradeDecisionDto": {
        "additionalProperties": false,
        "properties": {
          "decidedAt": {
            "format": "date-time",
            "type": "string"
          },
          "decidedBy": {
            "format": "uuid",
            "type": "string"
          },
          "decision": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "fromLabel": {
            "nullable": true,
            "type": "string"
          },
          "requestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "requestedBy": {
            "format": "uuid",
            "type": "string"
          },
          "requestedLabel": {
            "nullable": true,
            "type": "string"
          },
          "sensitivityLabel": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SensitivityLabelDowngradeQueueDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SensitivityLabelDowngradeRequestDto"
            },
            "nullable": true,
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SensitivityLabelDowngradeRequestDto": {
        "additionalProperties": false,
        "properties": {
          "currentLabel": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "requestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "requestedBy": {
            "format": "uuid",
            "type": "string"
          },
          "requestedLabel": {
            "nullable": true,
            "type": "string"
          },
          "sourceItemId": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SetGuardianRolesRequestDto": {
        "additionalProperties": false,
        "properties": {
          "custodyOrderReference": {
            "nullable": true,
            "type": "string"
          },
          "guardians": {
            "items": {
              "$ref": "#/components/schemas/GuardianRoleAssignmentDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "ShareCrossing": {
        "enum": [
          0,
          1,
          2
        ],
        "format": "int32",
        "type": "integer"
      },
      "ShareFieldCommand": {
        "additionalProperties": false,
        "properties": {
          "accessLevel": {
            "nullable": true,
            "type": "string"
          },
          "consentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "createdByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "fieldLabel": {
            "nullable": true,
            "type": "string"
          },
          "mintConsentOnWiden": {
            "type": "boolean"
          },
          "recipientDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "recipientKeyUnavailable": {
            "type": "boolean"
          },
          "recipientOrgId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "recipientType": {
            "nullable": true,
            "type": "string"
          },
          "recipientUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "sharedBlobReference": {
            "nullable": true,
            "type": "string"
          },
          "sharerDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "sharerNote": {
            "nullable": true,
            "type": "string"
          },
          "sharerType": {
            "nullable": true,
            "type": "string"
          },
          "sharingKeyAuthTagBase64": {
            "nullable": true,
            "type": "string"
          },
          "sharingKeyNonceBase64": {
            "nullable": true,
            "type": "string"
          },
          "wrappedFieldKeyBase64": {
            "nullable": true,
            "type": "string"
          },
          "wrappedSharingKeyBase64": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SharedBlobCreatedDto": {
        "additionalProperties": false,
        "properties": {
          "blobId": {
            "format": "uuid",
            "type": "string"
          },
          "uri": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SharedWithMeFieldShareDto": {
        "additionalProperties": false,
        "properties": {
          "accessLevel": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "documentName": {
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "fieldLabel": {
            "nullable": true,
            "type": "string"
          },
          "grantedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "pendingResolutionDeadline": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "recipientOrgId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "recipientType": {
            "nullable": true,
            "type": "string"
          },
          "recipientUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "revokedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sharedByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "sharerDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "sharerNote": {
            "nullable": true,
            "type": "string"
          },
          "sharerType": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "wrappedKey": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SharedWithMeFieldShareDtoPagedResultDto": {
        "additionalProperties": false,
        "properties": {
          "hasNextPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "hasPreviousPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/SharedWithMeFieldShareDto"
            },
            "nullable": true,
            "type": "array"
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalPages": {
            "format": "int32",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SplitContainerRebindOutcomeDto": {
        "additionalProperties": false,
        "properties": {
          "accessRevoked": {
            "type": "boolean"
          },
          "containerId": {
            "format": "uuid",
            "type": "string"
          },
          "outcome": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SponsorRecordWithdrawalResultDto": {
        "additionalProperties": false,
        "properties": {
          "documentId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          },
          "withdrawn": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SponsorSealingKeyDto": {
        "additionalProperties": false,
        "properties": {
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "publicKey": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SponsoredPlanStatusDto": {
        "additionalProperties": false,
        "properties": {
          "currentPlan": {
            "nullable": true,
            "type": "string"
          },
          "hasPendingOffer": {
            "type": "boolean"
          },
          "pendingOfferCount": {
            "format": "int32",
            "type": "integer"
          },
          "pendingOfferId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "proposedPlan": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "StageMergeConflictsRequestDto": {
        "additionalProperties": false,
        "properties": {
          "resolutions": {
            "items": {
              "$ref": "#/components/schemas/StageMergeResolutionDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "StageMergeResolutionDto": {
        "additionalProperties": false,
        "properties": {
          "decision": {
            "nullable": true,
            "type": "string"
          },
          "sourceDocumentId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SubjectExportCategoryScopeDto": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "estimatedBytes": {
            "format": "int64",
            "type": "integer"
          },
          "recordCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SubjectExportEntryDto": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "data": {
            "additionalProperties": {},
            "nullable": true,
            "type": "object"
          },
          "reference": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SubjectExportPageDto": {
        "additionalProperties": false,
        "properties": {
          "capturedAt": {
            "format": "date-time",
            "type": "string"
          },
          "category": {
            "nullable": true,
            "type": "string"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/SubjectExportEntryDto"
            },
            "nullable": true,
            "type": "array"
          },
          "hasMore": {
            "type": "boolean"
          },
          "skip": {
            "format": "int32",
            "type": "integer"
          },
          "subjectId": {
            "format": "uuid",
            "type": "string"
          },
          "take": {
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          },
          "zeroKnowledgeNotice": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SubjectExportScopeDto": {
        "additionalProperties": false,
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/SubjectExportCategoryScopeDto"
            },
            "nullable": true,
            "type": "array"
          },
          "measuredAt": {
            "format": "date-time",
            "type": "string"
          },
          "storedContentBytes": {
            "format": "int64",
            "type": "integer"
          },
          "subjectId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SubscriberFieldEnvelopeDto": {
        "additionalProperties": false,
        "properties": {
          "subscriberId": {
            "format": "uuid",
            "type": "string"
          },
          "wrappedFieldKeyBase64": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SubscriptionSyncResult": {
        "additionalProperties": false,
        "properties": {
          "deliveredCount": {
            "format": "int32",
            "type": "integer"
          },
          "deliveredSubscriptionIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "exhaustedCount": {
            "format": "int32",
            "type": "integer"
          },
          "heldCount": {
            "format": "int32",
            "type": "integer"
          },
          "suppressedCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SuggestCategoryQueryResult": {
        "additionalProperties": false,
        "properties": {
          "suggestions": {
            "items": {
              "$ref": "#/components/schemas/CategorySuggestion"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "SupersessionDependentDto": {
        "additionalProperties": false,
        "properties": {
          "consentIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "fieldIds": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "recipientDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "recipientOrgId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "recipientType": {
            "nullable": true,
            "type": "string"
          },
          "recipientUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SupervisedVaultDto": {
        "additionalProperties": false,
        "properties": {
          "custodyOrderReference": {
            "nullable": true,
            "type": "string"
          },
          "graduationDate": {
            "format": "date",
            "type": "string"
          },
          "guardians": {
            "items": {
              "$ref": "#/components/schemas/GuardianRoleAssignmentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "minorUserId": {
            "format": "uuid",
            "type": "string"
          },
          "provisionedByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "provisioningId": {
            "format": "uuid",
            "type": "string"
          },
          "reboundAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "reboundToAdultUserId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "reboundTransitionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SupplierPortalDocumentUploadRequestDto": {
        "additionalProperties": false,
        "properties": {
          "algorithmVersion": {
            "format": "int32",
            "type": "integer"
          },
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "encryptedContent": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SupplierPortalUploadTargetDto": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "format": "uuid",
            "type": "string"
          },
          "publicKey": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SuspendFieldShareRequestDto": {
        "additionalProperties": false,
        "properties": {
          "graceWindowDays": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SyncSubscribedFieldRequestDto": {
        "additionalProperties": false,
        "properties": {
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "fieldId": {
            "nullable": true,
            "type": "string"
          },
          "newValueHash": {
            "nullable": true,
            "type": "string"
          },
          "subscriberEnvelopes": {
            "items": {
              "$ref": "#/components/schemas/SubscriberFieldEnvelopeDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "TeardownCohortDto": {
        "additionalProperties": false,
        "properties": {
          "confirmed": {
            "format": "int32",
            "type": "integer"
          },
          "pending": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int32",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "TemplateDto": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "fieldMappings": {
            "items": {
              "$ref": "#/components/schemas/TemplateFieldMappingDto"
            },
            "nullable": true,
            "type": "array"
          },
          "icon": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "localizedDescriptions": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "localizedNames": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "previewImage": {
            "nullable": true,
            "type": "string"
          },
          "schemaRef": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TemplateFieldMappingDto": {
        "additionalProperties": false,
        "properties": {
          "fieldName": {
            "nullable": true,
            "type": "string"
          },
          "isRequired": {
            "type": "boolean"
          },
          "localizedHelpTexts": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "localizedLabels": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "localizedPlaceholders": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "validationRules": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TransferCustodyRequestDto": {
        "additionalProperties": false,
        "properties": {
          "newCustodians": {
            "items": {
              "$ref": "#/components/schemas/GuardianRoleAssignmentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "orderReference": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TransitionPrepDto": {
        "additionalProperties": false,
        "properties": {
          "childUserId": {
            "format": "uuid",
            "type": "string"
          },
          "contentGroups": {
            "items": {
              "$ref": "#/components/schemas/VaultContentGroupDto"
            },
            "nullable": true,
            "type": "array"
          },
          "handoverCompleted": {
            "type": "boolean"
          },
          "totalDocuments": {
            "format": "int32",
            "type": "integer"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TrashedContactDto": {
        "additionalProperties": false,
        "properties": {
          "closureContext": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "contactLinkId": {
            "format": "uuid",
            "type": "string"
          },
          "handoverRecordId": {
            "format": "uuid",
            "type": "string"
          },
          "recoveryWindowExpiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "trashedAt": {
            "format": "date-time",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TrashedDocumentDto": {
        "additionalProperties": false,
        "properties": {
          "categoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "daysRemaining": {
            "format": "int32",
            "type": "integer"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "purgeEligibleAt": {
            "format": "date-time",
            "type": "string"
          },
          "recoveryWindowDays": {
            "format": "int32",
            "type": "integer"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UnlockOrganizationRecoveryKitRequest": {
        "additionalProperties": false,
        "properties": {
          "verifier": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateCategoryCommand": {
        "additionalProperties": false,
        "properties": {
          "categoryId": {
            "format": "uuid",
            "type": "string"
          },
          "colorCode": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "displayOrder": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "icon": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "requestingUserId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateEncryptionMetadataRequestDto": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "nullable": true,
            "type": "string"
          },
          "algorithmVersion": {
            "format": "int32",
            "type": "integer"
          },
          "authenticationTag": {
            "nullable": true,
            "type": "string"
          },
          "expectedRowVersion": {
            "nullable": true,
            "type": "string"
          },
          "initializationVector": {
            "nullable": true,
            "type": "string"
          },
          "iterations": {
            "format": "int32",
            "type": "integer"
          },
          "keyDerivationFunction": {
            "nullable": true,
            "type": "string"
          },
          "keyGeneration": {
            "format": "int32",
            "type": "integer"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "salt": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateRoleRequest": {
        "additionalProperties": false,
        "description": "Request model for updating a user's role.",
        "properties": {
          "newRole": {
            "$ref": "#/components/schemas/VaultRole"
          }
        },
        "type": "object"
      },
      "UpdateSharePermissionCommand": {
        "additionalProperties": false,
        "properties": {
          "accessLevel": {
            "nullable": true,
            "type": "string"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "requestingUserId": {
            "format": "uuid",
            "type": "string"
          },
          "shareId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateTemplateCommand": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "fieldMappings": {
            "items": {
              "$ref": "#/components/schemas/TemplateFieldMappingDto"
            },
            "nullable": true,
            "type": "array"
          },
          "icon": {
            "nullable": true,
            "type": "string"
          },
          "localizedDescriptions": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "localizedNames": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "previewImage": {
            "nullable": true,
            "type": "string"
          },
          "templateId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateTemplateCommandResult": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "nullable": true,
            "type": "string"
          },
          "templateId": {
            "format": "uuid",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateVaultCommand": {
        "additionalProperties": false,
        "properties": {
          "autoDeleteDays": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "autoDeleteEnabled": {
            "type": "boolean"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "maxDocuments": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "maxStorageSizeBytes": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "ownerId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UploadChunkCommand": {
        "additionalProperties": false,
        "properties": {
          "chunkData": {
            "format": "byte",
            "nullable": true,
            "type": "string"
          },
          "chunkHash": {
            "nullable": true,
            "type": "string"
          },
          "chunkIndex": {
            "format": "int32",
            "type": "integer"
          },
          "requestingUserId": {
            "format": "uuid",
            "type": "string"
          },
          "uploadSessionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UploadChunkCommandResult": {
        "additionalProperties": false,
        "properties": {
          "progress": {
            "format": "double",
            "type": "number"
          },
          "remainingChunks": {
            "format": "int32",
            "type": "integer"
          },
          "success": {
            "type": "boolean"
          },
          "uploadedChunks": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "UploadSessionDto": {
        "additionalProperties": false,
        "properties": {
          "blobStoragePath": {
            "nullable": true,
            "type": "string"
          },
          "chunkSize": {
            "format": "int32",
            "type": "integer"
          },
          "contentType": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "fileHash": {
            "nullable": true,
            "type": "string"
          },
          "fileName": {
            "nullable": true,
            "type": "string"
          },
          "fileSize": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isComplete": {
            "readOnly": true,
            "type": "boolean"
          },
          "progress": {
            "format": "double",
            "readOnly": true,
            "type": "number"
          },
          "remainingSeconds": {
            "format": "double",
            "readOnly": true,
            "type": "number"
          },
          "status": {
            "$ref": "#/components/schemas/UploadStatus"
          },
          "totalChunks": {
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "uploadedChunks": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "nullable": true,
            "type": "array"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UploadStatus": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "format": "int32",
        "type": "integer"
      },
      "VaultAccessDto": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "grantedByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "role": {
            "$ref": "#/components/schemas/VaultRole"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VaultAttentionDto": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VaultAttentionItemDto"
            },
            "nullable": true,
            "type": "array"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "VaultAttentionItemDto": {
        "additionalProperties": false,
        "properties": {
          "dueAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "VaultContentGroupDto": {
        "additionalProperties": false,
        "properties": {
          "categoryId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "categoryName": {
            "nullable": true,
            "type": "string"
          },
          "documentCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "VaultCrossingRow": {
        "additionalProperties": false,
        "properties": {
          "crossing": {
            "$ref": "#/components/schemas/ShareCrossing"
          },
          "documentId": {
            "format": "uuid",
            "type": "string"
          },
          "documentName": {
            "nullable": true,
            "type": "string"
          },
          "fieldCount": {
            "format": "int32",
            "type": "integer"
          },
          "grantedAt": {
            "format": "date-time",
            "type": "string"
          },
          "recipientDisplayName": {
            "nullable": true,
            "type": "string"
          },
          "recipientHomeRegion": {
            "nullable": true,
            "type": "string"
          },
          "vaultHomeRegion": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "VaultCrossings": {
        "additionalProperties": false,
        "properties": {
          "crossBorder": {
            "format": "int32",
            "type": "integer"
          },
          "domestic": {
            "format": "int32",
            "type": "integer"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/VaultCrossingRow"
            },
            "nullable": true,
            "type": "array"
          },
          "unknown": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "VaultDto": {
        "additionalProperties": false,
        "properties": {
          "autoDeleteDays": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "autoDeleteEnabled": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "documentCount": {
            "format": "int32",
            "type": "integer"
          },
          "encryptionAlgorithm": {
            "nullable": true,
            "type": "string"
          },
          "fieldCount": {
            "format": "int32",
            "type": "integer"
          },
          "homeRegion": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "keyId": {
            "nullable": true,
            "type": "string"
          },
          "maxDocuments": {
            "format": "int32",
            "type": "integer"
          },
          "maxStorageSizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "modifiedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "ownerId": {
            "format": "uuid",
            "type": "string"
          },
          "schemaBoundNotSealedCount": {
            "format": "int32",
            "type": "integer"
          },
          "sharedFieldCount": {
            "format": "int32",
            "type": "integer"
          },
          "storageUsedBytes": {
            "format": "int64",
            "type": "integer"
          },
          "vaultType": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "VaultDtoPagedResultDto": {
        "additionalProperties": false,
        "properties": {
          "hasNextPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "hasPreviousPage": {
            "readOnly": true,
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/VaultDto"
            },
            "nullable": true,
            "type": "array"
          },
          "pageNumber": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalPages": {
            "format": "int32",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "VaultImportSealReceiptDto": {
        "additionalProperties": false,
        "properties": {
          "algorithmLabel": {
            "nullable": true,
            "type": "string"
          },
          "encryptedRecordCount": {
            "format": "int32",
            "type": "integer"
          },
          "importBatchId": {
            "format": "uuid",
            "type": "string"
          },
          "importedByUserId": {
            "format": "uuid",
            "type": "string"
          },
          "sealReceiptHash": {
            "nullable": true,
            "type": "string"
          },
          "sealedAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VaultMergePreviewDto": {
        "additionalProperties": false,
        "properties": {
          "conflictCount": {
            "format": "int32",
            "type": "integer"
          },
          "criticalConflictCount": {
            "format": "int32",
            "type": "integer"
          },
          "duplicateRetainedCount": {
            "format": "int32",
            "type": "integer"
          },
          "keptCount": {
            "format": "int32",
            "type": "integer"
          },
          "mergeId": {
            "format": "uuid",
            "type": "string"
          },
          "previewedAt": {
            "format": "date-time",
            "type": "string"
          },
          "sourceHoldingCount": {
            "format": "int32",
            "type": "integer"
          },
          "sourceVaultId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "targetHoldingCount": {
            "format": "int32",
            "type": "integer"
          },
          "targetVaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VaultMergeReceiptDto": {
        "additionalProperties": false,
        "properties": {
          "appliedAt": {
            "format": "date-time",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/MergeItemOutcomeDto"
            },
            "nullable": true,
            "type": "array"
          },
          "mergeId": {
            "format": "uuid",
            "type": "string"
          },
          "mergedCount": {
            "format": "int32",
            "type": "integer"
          },
          "skippedCount": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "unreadableCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "VaultRole": {
        "enum": [
          1,
          2,
          3
        ],
        "format": "int32",
        "type": "integer"
      },
      "VaultSplitContainerRebindDto": {
        "additionalProperties": false,
        "properties": {
          "accessRevoked": {
            "type": "boolean"
          },
          "reboundAt": {
            "format": "date-time",
            "type": "string"
          },
          "receivingPartyId": {
            "format": "uuid",
            "type": "string"
          },
          "relinquishingPartyId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VaultSplitRebindDto": {
        "additionalProperties": false,
        "properties": {
          "allocatedToCounterpart": {
            "format": "int32",
            "type": "integer"
          },
          "allocatedToYou": {
            "format": "int32",
            "type": "integer"
          },
          "committedAt": {
            "format": "date-time",
            "type": "string"
          },
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "containers": {
            "items": {
              "$ref": "#/components/schemas/VaultSplitContainerRebindDto"
            },
            "nullable": true,
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "itemCount": {
            "format": "int32",
            "type": "integer"
          },
          "manifestHash": {
            "nullable": true,
            "type": "string"
          },
          "outstandingToCounterpart": {
            "format": "int32",
            "type": "integer"
          },
          "outstandingToYou": {
            "format": "int32",
            "type": "integer"
          },
          "reboundToCounterpart": {
            "format": "int32",
            "type": "integer"
          },
          "reboundToYou": {
            "format": "int32",
            "type": "integer"
          },
          "retainedShared": {
            "format": "int32",
            "type": "integer"
          },
          "splitId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "VaultStorageReconciliationDto": {
        "additionalProperties": false,
        "properties": {
          "actualStorageUsedBytes": {
            "format": "int64",
            "type": "integer"
          },
          "corrected": {
            "type": "boolean"
          },
          "driftBytes": {
            "format": "int64",
            "type": "integer"
          },
          "previousStorageUsedBytes": {
            "format": "int64",
            "type": "integer"
          },
          "storageQuotaBytes": {
            "format": "int64",
            "type": "integer"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VersionDifference": {
        "additionalProperties": false,
        "properties": {
          "changeType": {
            "nullable": true,
            "type": "string"
          },
          "fieldName": {
            "nullable": true,
            "type": "string"
          },
          "valueInVersion1": {
            "nullable": true,
            "type": "string"
          },
          "valueInVersion2": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "VetContinuedAccessDto": {
        "additionalProperties": false,
        "properties": {
          "basis": {
            "nullable": true,
            "type": "string"
          },
          "disclosedToNewKeeper": {
            "type": "boolean"
          },
          "practiceName": {
            "nullable": true,
            "type": "string"
          },
          "scope": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "WalletCredentialDto": {
        "additionalProperties": false,
        "properties": {
          "credentialId": {
            "format": "uuid",
            "type": "string"
          },
          "issuer": {
            "nullable": true,
            "type": "string"
          },
          "kind": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "presentable": {
            "type": "boolean"
          },
          "sensitive": {
            "type": "boolean"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "vaultRef": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "WalletReissueFanOutCommand": {
        "additionalProperties": false,
        "properties": {
          "consentToMarkCompromised": {
            "type": "boolean"
          },
          "credentialIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "idempotencyKey": {
            "nullable": true,
            "type": "string"
          },
          "includeSensitive": {
            "type": "boolean"
          },
          "ownerUserId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WalletReissueFanOutResultDto": {
        "additionalProperties": false,
        "properties": {
          "heldCount": {
            "format": "int32",
            "type": "integer"
          },
          "idempotencyKey": {
            "nullable": true,
            "type": "string"
          },
          "markedCompromisedCount": {
            "format": "int32",
            "type": "integer"
          },
          "outcomes": {
            "items": {
              "$ref": "#/components/schemas/CredentialFanoutOutcome"
            },
            "nullable": true,
            "type": "array"
          },
          "reissueRequestedCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalCredentials": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WardOwnershipAcceptedDto": {
        "additionalProperties": false,
        "properties": {
          "adultUserId": {
            "format": "uuid",
            "type": "string"
          },
          "childUserId": {
            "format": "uuid",
            "type": "string"
          },
          "keyCustodyReference": {
            "nullable": true,
            "type": "string"
          },
          "ownershipAcceptedAt": {
            "format": "date-time",
            "type": "string"
          },
          "residualGuardianViewsRevoked": {
            "format": "int32",
            "type": "integer"
          },
          "soleKeyCustodyConfirmed": {
            "type": "boolean"
          },
          "transitionId": {
            "format": "uuid",
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          },
          "verificationCode": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "WardSummaryDto": {
        "additionalProperties": false,
        "properties": {
          "childId": {
            "format": "uuid",
            "type": "string"
          },
          "currentAge": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "custodyOrderReference": {
            "nullable": true,
            "type": "string"
          },
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "guardians": {
            "items": {
              "$ref": "#/components/schemas/GuardianRoleAssignmentDto"
            },
            "nullable": true,
            "type": "array"
          },
          "jurisdiction": {
            "nullable": true,
            "type": "string"
          },
          "majorityAge": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "majorityDate": {
            "format": "date",
            "type": "string"
          },
          "pendingApprovals": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "vaultId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WithdrawSponsorRecordRequestDto": {
        "additionalProperties": false,
        "properties": {
          "reasonCode": {
            "nullable": true,
            "type": "string"
          },
          "sourceItemId": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "Bearer": {
        "bearerFormat": "JWT",
        "description": "JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "contact": {
      "email": "support@essence-platform.com",
      "name": "Essence Platform Support",
      "url": "https://essence-platform.com/support"
    },
    "description": "REST API for managing zero-knowledge encrypted personal data vaults and documents.\n\n## Architecture\n- **Zero-Knowledge Encryption**: All sensitive data encrypted client-side\n- **Schema-Based Documents**: Flexible JSON Schema validation\n- **Full-Text Search**: Elasticsearch-powered search (on encrypted metadata)\n- **Chunked Uploads**: Large file support with resumable uploads\n\nAll endpoints require a Bearer token issued by the Essence Auth service (WS-C 4.3 foundation adoption).",
    "license": {
      "name": "Proprietary License",
      "url": "https://essence-platform.com/license"
    },
    "termsOfService": "https://essence-platform.com/terms",
    "title": "Essence Vault API",
    "version": "v1.0"
  },
  "openapi": "3.0.1",
  "paths": {
    "/api/v1/Categories": {
      "get": {
        "description": "Retrieves a paginated list of categories for a vault with optional filtering by parent category. Only returns categories from vaults owned by the authenticated user.",
        "operationId": "GetCategories",
        "parameters": [
          {
            "description": "Vault ID to filter categories (required).",
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Optional parent category ID to filter child categories (null for root categories).",
            "in": "query",
            "name": "parentCategoryId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Include soft-deleted categories in results (default: false).",
            "in": "query",
            "name": "includeDeleted",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "description": "The page number (default: 1).",
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "The page size (default: 10, max: 100).",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 10,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "items": [],
                  "pageNumber": 0,
                  "pageSize": 0,
                  "totalCount": 0,
                  "totalPages": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/CategoryDtoPagedResultDto"
                }
              }
            },
            "description": "Category list retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault."
          }
        },
        "summary": "Get categories",
        "tags": [
          "Categories"
        ]
      },
      "post": {
        "description": "Creates a new category in a vault. Category names must be unique within the same hierarchy level. User must own the vault.",
        "operationId": "CreateCategory",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "colorCode": "string",
                "description": "string",
                "displayOrder": 0,
                "icon": "string",
                "name": "string",
                "parentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateCategoryCommand"
              }
            },
            "application/json": {
              "example": {
                "colorCode": "string",
                "description": "string",
                "displayOrder": 0,
                "icon": "string",
                "name": "string",
                "parentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateCategoryCommand"
              }
            },
            "text/json": {
              "example": {
                "colorCode": "string",
                "description": "string",
                "displayOrder": 0,
                "icon": "string",
                "name": "string",
                "parentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateCategoryCommand"
              }
            }
          },
          "description": "The category creation request."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "childCategories": [],
                  "colorCode": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "displayOrder": 0,
                  "documentCount": 0,
                  "icon": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isDeleted": false,
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "name": "string",
                  "parentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CategoryDto"
                }
              }
            },
            "description": "Category created successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data or duplicate category name."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault or parent category."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault or parent category not found."
          }
        },
        "summary": "Create category",
        "tags": [
          "Categories"
        ]
      }
    },
    "/api/v1/Categories/statistics": {
      "get": {
        "description": "Retrieves statistics for categories in a vault, including total categories, root categories, total documents, and maximum hierarchy depth. User must own the vault.",
        "operationId": "GetCategoryStatistics",
        "parameters": [
          {
            "description": "The vault ID.",
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "averageDocumentsPerCategory": 0,
                  "maximumDepth": 0,
                  "rootCategories": 0,
                  "totalCategories": 0,
                  "totalDocuments": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/CategoryStatisticsDto"
                }
              }
            },
            "description": "Statistics retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault."
          }
        },
        "summary": "Get category statistics",
        "tags": [
          "Categories"
        ]
      }
    },
    "/api/v1/Categories/suggest": {
      "get": {
        "description": "Analyzes document metadata (file name, content type, schema) to suggest the most appropriate categories with confidence scores. Uses metadata-only analysis to comply with zero-knowledge architecture.",
        "operationId": "SuggestCategory",
        "parameters": [
          {
            "description": "The vault ID.",
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The document file name.",
            "in": "query",
            "name": "fileName",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The document MIME content type.",
            "in": "query",
            "name": "contentType",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional schema ID for schema-aware suggestions.",
            "in": "query",
            "name": "schemaId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "suggestions": []
                },
                "schema": {
                  "$ref": "#/components/schemas/SuggestCategoryQueryResult"
                }
              }
            },
            "description": "Category suggestions generated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Suggest categories for a document",
        "tags": [
          "Categories"
        ]
      }
    },
    "/api/v1/Categories/{id}": {
      "delete": {
        "description": "Soft deletes a category by marking it as deleted. Cannot delete categories with child categories or documents. User must own the vault.",
        "operationId": "DeleteCategory",
        "parameters": [
          {
            "description": "The category ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Category deleted successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Cannot delete category with child categories or documents."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this category."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Category not found."
          }
        },
        "summary": "Delete category",
        "tags": [
          "Categories"
        ]
      },
      "get": {
        "description": "Retrieves a specific category by its ID. User must own the vault containing the category.",
        "operationId": "GetCategoryById",
        "parameters": [
          {
            "description": "The category ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Include soft-deleted category (default: false).",
            "in": "query",
            "name": "includeDeleted",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "childCategories": [],
                  "colorCode": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "displayOrder": 0,
                  "documentCount": 0,
                  "icon": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isDeleted": false,
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "name": "string",
                  "parentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CategoryDto"
                }
              }
            },
            "description": "Category retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this category."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Category not found."
          }
        },
        "summary": "Get category by ID",
        "tags": [
          "Categories"
        ]
      },
      "put": {
        "description": "Updates an existing category. Supports partial updates. Category names must remain unique within the same hierarchy level. User must own the vault.",
        "operationId": "UpdateCategory",
        "parameters": [
          {
            "description": "The category ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "colorCode": "string",
                "description": "string",
                "displayOrder": 0,
                "icon": "string",
                "name": "string",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateCategoryCommand"
              }
            },
            "application/json": {
              "example": {
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "colorCode": "string",
                "description": "string",
                "displayOrder": 0,
                "icon": "string",
                "name": "string",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateCategoryCommand"
              }
            },
            "text/json": {
              "example": {
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "colorCode": "string",
                "description": "string",
                "displayOrder": 0,
                "icon": "string",
                "name": "string",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateCategoryCommand"
              }
            }
          },
          "description": "The category update request."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "childCategories": [],
                  "colorCode": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "displayOrder": 0,
                  "documentCount": 0,
                  "icon": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isDeleted": false,
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "name": "string",
                  "parentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CategoryDto"
                }
              }
            },
            "description": "Category updated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data or duplicate category name."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this category."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Category not found."
          }
        },
        "summary": "Update category",
        "tags": [
          "Categories"
        ]
      }
    },
    "/api/v1/Categories/{id}/hierarchy": {
      "get": {
        "description": "Retrieves the full category hierarchy starting from a specific category, including all descendants. User must own the vault containing the category.",
        "operationId": "GetCategoryHierarchy",
        "parameters": [
          {
            "description": "The root category ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Include soft-deleted categories (default: false).",
            "in": "query",
            "name": "includeDeleted",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "childCategories": [],
                  "colorCode": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "displayOrder": 0,
                  "documentCount": 0,
                  "icon": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isDeleted": false,
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "name": "string",
                  "parentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CategoryDto"
                }
              }
            },
            "description": "Category hierarchy retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this category."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Category not found."
          }
        },
        "summary": "Get category hierarchy",
        "tags": [
          "Categories"
        ]
      }
    },
    "/api/v1/Categories/{id}/move": {
      "post": {
        "description": "Moves a category to a new parent or to root level. Validates against circular references and duplicate names at destination level. User must own the vault.",
        "operationId": "MoveCategory",
        "parameters": [
          {
            "description": "The category ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "newParentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/MoveCategoryCommand"
              }
            },
            "application/json": {
              "example": {
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "newParentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/MoveCategoryCommand"
              }
            },
            "text/json": {
              "example": {
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "newParentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/MoveCategoryCommand"
              }
            }
          },
          "description": "The move category request."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "childCategories": [],
                  "colorCode": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "displayOrder": 0,
                  "documentCount": 0,
                  "icon": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isDeleted": false,
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "name": "string",
                  "parentCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CategoryDto"
                }
              }
            },
            "description": "Category moved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data, would create circular reference, or duplicate name at destination."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this category."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Category or new parent category not found."
          }
        },
        "summary": "Move category",
        "tags": [
          "Categories"
        ]
      }
    },
    "/api/v1/Dashboard/categories": {
      "get": {
        "operationId": "Dashboard_GetCategoryCounts",
        "responses": {
          "200": {
            "description": "The user's category counts (possibly empty)."
          }
        },
        "summary": "Real per-semantic-category document counts for the authenticated user (derived from each\r\ndocument's schema category). Response is wrapped as `{ \"data\": [...] }` to match the\r\nweb client contract.",
        "tags": [
          "Dashboard"
        ]
      }
    },
    "/api/v1/Documents": {
      "get": {
        "description": "Retrieves a paginated list of documents using Elasticsearch-powered search with support for filtering by categories, file types, tags, date ranges, file sizes, and fuzzy matching. Only searches unencrypted metadata (zero-knowledge compliant). Only returns documents from vaults owned by the authenticated user. When vaultId is omitted, the caller's own default vault is used.",
        "operationId": "SearchDocuments",
        "parameters": [
          {
            "description": "Vault ID to filter documents (required).",
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Optional search term for filename, category name, and tags matching (supports fuzzy search).",
            "in": "query",
            "name": "searchTerm",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional list of category IDs to filter documents.",
            "in": "query",
            "name": "categoryIds",
            "schema": {
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Optional list of file types/extensions to filter (e.g., \".pdf\", \".jpg\").",
            "in": "query",
            "name": "fileTypes",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Optional list of tags to filter documents.",
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Optional start date for filtering by creation date.",
            "in": "query",
            "name": "dateFrom",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Optional end date for filtering by creation date.",
            "in": "query",
            "name": "dateTo",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Optional minimum file size in bytes.",
            "in": "query",
            "name": "minFileSizeBytes",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Optional maximum file size in bytes.",
            "in": "query",
            "name": "maxFileSizeBytes",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Sort field: \"fileName\", \"createdAt\", \"updatedAt\", \"fileSize\", or \"relevance\" (default: \"relevance\").",
            "in": "query",
            "name": "sortBy",
            "schema": {
              "default": "relevance",
              "type": "string"
            }
          },
          {
            "description": "Sort order: true for ascending, false for descending (default: false).",
            "in": "query",
            "name": "sortAscending",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "description": "Enable fuzzy search for typo tolerance (default: true).",
            "in": "query",
            "name": "enableFuzzySearch",
            "schema": {
              "default": true,
              "type": "boolean"
            }
          },
          {
            "description": "Include faceted search aggregations for categories, file types, and tags (default: false).",
            "in": "query",
            "name": "includeFacets",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "archiveScope",
            "schema": {
              "$ref": "#/components/schemas/DocumentArchiveScope"
            }
          },
          {
            "description": "The page number (default: 1).",
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "The page size (default: 10, max: 100).",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 10,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "degradedReason": "string",
                  "documents": [],
                  "facets": [],
                  "firstItemIndex": 0,
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "isDegraded": false,
                  "isEmpty": false,
                  "lastItemIndex": 0,
                  "pageNumber": 0,
                  "pageSize": 0,
                  "totalCount": 0,
                  "totalPages": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/SearchResultDto"
                }
              }
            },
            "description": "Document list retrieved successfully with search metadata."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid search parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault."
          }
        },
        "summary": "Search documents with advanced filters",
        "tags": [
          "Documents"
        ]
      },
      "post": {
        "description": "Adds a new encrypted document to a vault. All document data must be encrypted client-side before upload. Validates vault ownership, status, and storage quota.",
        "operationId": "AddDocument",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contentFormat": "string",
                "contentHash": "string",
                "description": "string",
                "encryptedContent": "string",
                "fields": [],
                "fileName": "string",
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "sensitivityLabel": "string",
                "sizeBytes": 0,
                "tags": [],
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/AddDocumentCommand"
              }
            },
            "application/json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contentFormat": "string",
                "contentHash": "string",
                "description": "string",
                "encryptedContent": "string",
                "fields": [],
                "fileName": "string",
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "sensitivityLabel": "string",
                "sizeBytes": 0,
                "tags": [],
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/AddDocumentCommand"
              }
            },
            "text/json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contentFormat": "string",
                "contentHash": "string",
                "description": "string",
                "encryptedContent": "string",
                "fields": [],
                "fileName": "string",
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "sensitivityLabel": "string",
                "sizeBytes": 0,
                "tags": [],
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/AddDocumentCommand"
              }
            }
          },
          "description": "The document creation request with encrypted field data."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Document added successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data or vault quota exceeded."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault or vault is inactive."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault not found."
          },
          "428": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Account recovery must be set up before this vault can grow (graduated trust, D-121)."
          }
        },
        "summary": "Add document to vault",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/by-format/{format}": {
      "get": {
        "description": "Returns a paginated list of a vault's documents whose contentFormat matches (e.g. fhir-r4/Observation). Only unencrypted type metadata is returned (zero-knowledge). CC-062 / FR-02.065.",
        "operationId": "GetDocumentsByFormat",
        "parameters": [
          {
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "format",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "fhirCodingSystem",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "fhirCodingCode",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "items": [],
                  "pageNumber": 0,
                  "pageSize": 0,
                  "totalCount": 0,
                  "totalPages": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDtoPagedResultDto"
                }
              }
            },
            "description": "Documents retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid query parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault not found or not owned by the caller."
          }
        },
        "summary": "Get documents by content format",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/candidates": {
      "get": {
        "description": "Projects the authenticated caller's own documents matching the schemas a data-request check asks for, each with its schema-declared data-classification level and per-field requiredForCheck flags. Reads the caller's vaults only.",
        "operationId": "GetCandidateDocuments",
        "parameters": [
          {
            "description": "The data request naming the check.",
            "in": "query",
            "name": "requestId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The check within that request.",
            "in": "query",
            "name": "checkId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "candidates": [],
                  "checkId": "string",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requestedSchemas": []
                },
                "schema": {
                  "$ref": "#/components/schemas/CandidateDocumentsDto"
                }
              }
            },
            "description": "Candidate documents for the check."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request or check identifier."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Data request not found, or the caller is not its target (the two are intentionally indistinguishable)."
          }
        },
        "summary": "List the caller's own documents that could answer a requested check",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/presence": {
      "get": {
        "description": "Enables a consumer (e.g. EPIC 21 Healthcare) to page all documents of one FHIR resource type —\r\nfor example `fhir-r4/Patient` — without decrypting content. The `{format}` route is a\r\ncatch-all so a slash-bearing format (`fhir-r4/Patient`) is captured verbatim. Zero-knowledge:\r\nonly unencrypted type metadata is returned.",
        "operationId": "Documents_GetPresence",
        "parameters": [
          {
            "description": "Repeated or comma-separated schema refs (e.g. `module.civic.care-record.v1`).",
            "in": "query",
            "name": "schemaRefs",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "counts": {}
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentPresenceDto"
                }
              }
            },
            "description": "Documents retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid query parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "description": "Vault not found or not owned by the caller."
          }
        },
        "summary": "Bulk-retrieves a vault's documents of a given content format, paginated (CC-062 / FR-02.065).",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/search": {
      "post": {
        "description": "Performs advanced document search with full-text search, comprehensive filtering, relevance scoring, and pagination. Only searches unencrypted metadata fields (zero-knowledge compliant). User must own the specified vault.",
        "operationId": "SearchDocumentsAdvanced",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "query": "string",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentSearchRequest"
              }
            },
            "application/json": {
              "example": {
                "query": "string",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentSearchRequest"
              }
            },
            "text/json": {
              "example": {
                "query": "string",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentSearchRequest"
              }
            }
          },
          "description": "The search request containing vault ID, query, filters, and options."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "facets": [],
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "items": [],
                  "pageNumber": 0,
                  "pageSize": 0,
                  "totalCount": 0,
                  "totalPages": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentSearchDtoSearchResult"
                }
              }
            },
            "description": "Search completed successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid search parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault."
          }
        },
        "summary": "Search documents with advanced filters",
        "tags": [
          "Document Search"
        ]
      }
    },
    "/api/v1/Documents/search/facets": {
      "get": {
        "description": "Retrieves dynamic search facets showing aggregated filter options for file types, categories, and extensions. Helps users discover available filters and understand document distribution.",
        "operationId": "GetSearchFacets",
        "parameters": [
          {
            "description": "The vault ID to generate facets for.",
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Optional search query to filter facets (only show facets for matching documents).",
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SearchFacet"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Facets retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault."
          }
        },
        "summary": "Get search facets",
        "tags": [
          "Document Search"
        ]
      }
    },
    "/api/v1/Documents/search/suggestions": {
      "get": {
        "description": "Retrieves autocomplete suggestions for search queries based on document filenames, tags, and category names. Returns mixed suggestions prioritized by relevance and usage frequency.",
        "operationId": "GetSearchSuggestions",
        "parameters": [
          {
            "description": "The vault ID to search within.",
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The search query prefix (minimum 2 characters).",
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Maximum number of suggestions to return (default: 10, max: 50).",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 10,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SearchSuggestion"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Suggestions retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid query parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault."
          }
        },
        "summary": "Get search suggestions",
        "tags": [
          "Document Search"
        ]
      }
    },
    "/api/v1/Documents/trash": {
      "get": {
        "description": "Retrieves the soft-deleted documents in a vault for the Trash / Recently-Deleted recovery view, enriched with recovery-window metadata (recovery window days, purge-eligible timestamp, days remaining). Only the vault owner may view its trash.",
        "operationId": "ListDeletedDocuments",
        "parameters": [
          {
            "description": "The vault whose trash is requested (required).",
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The 1-based page number (default: 1).",
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "The page size (default: 50, server-enforced max: 100).",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "items": [],
                  "pageNumber": 0,
                  "pageSize": 0,
                  "recoveryWindowDays": 0,
                  "totalCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/ListDeletedDocumentsQueryResult"
                }
              }
            },
            "description": "Trash retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The required vaultId is missing or not a GUID."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not the owner of the vault (or it does not exist)."
          }
        },
        "summary": "List trashed (soft-deleted) documents",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}": {
      "delete": {
        "description": "Soft deletes a document and revokes every share that depends on it, notifying the recipients. The encrypted data is retained for the retention window and can be restored. Returns what the cascade revoked. To keep the dependent consents live, archive the document instead (POST {id}/archive). User must own the vault containing the document.",
        "operationId": "DeleteDocument",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "cancelledFieldSubscriptions": 0,
                  "notifiedRecipients": 0,
                  "revokedAnything": false,
                  "revokedDocumentShares": 0,
                  "revokedFieldShares": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDeletionResultDto"
                }
              }
            },
            "description": "Document deleted; the body reports the shares revoked and recipients notified."
          },
          "204": {
            "description": "Document deleted successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found or not owned by the caller."
          }
        },
        "summary": "Delete document",
        "tags": [
          "Documents"
        ]
      },
      "get": {
        "description": "Retrieves a document's unencrypted metadata and current encryption envelope. Pass keyGeneration to assert the generation you will decrypt with; a purged (older) generation returns 409 key_generation_purged (FR-02.011 dual-key window) rather than a silent wrong-key read.",
        "operationId": "GetDocument",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Optional key generation the caller intends to decrypt with. If\r\n            older than the document's current generation (rotation completed), the read is rejected with\r\n            409 `key_generation_purged` — never a silent wrong-key decrypt (FR-02.011).",
            "in": "query",
            "name": "keyGeneration",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Document retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found or not owned by the caller."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The requested key generation has been purged."
          }
        },
        "summary": "Get document by id",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/archive": {
      "post": {
        "description": "Takes the document out of the holder's default listing without revoking any share that depends on it, without notifying any recipient, and without starting a retention clock. Idempotent. On /{id}/sensitivity-label/{label} the vault's owner instead confirms or raises the record's sensitivity label (standard | personal | sensitive); a lower label on a record a sponsor loaded is held for that sponsor's reviewer (202).",
        "operationId": "ArchiveDocument",
        "parameters": [
          {
            "description": "The document to archive.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "On the sensitivity-label route only: `standard | personal | sensitive`.",
            "in": "path",
            "name": "label",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Document archived, or its label confirmed."
          },
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "The label is lower than the record's and a sponsor loaded it: held for that sponsor's reviewer."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The label is not standard, personal or sensitive."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found or not owned by the caller."
          }
        },
        "summary": "Archive a document (or confirm its sensitivity label)",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/content": {
      "put": {
        "description": "Replaces an existing document's client-encrypted content as a versioned correction (EPIC 89 FR-DCI.019, EPIC 5 FR-05.025). The overwritten state is retained as a version snapshot and the replacement becomes the current version. Requires vault ownership.",
        "operationId": "ReplaceDocumentContent",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "changeDescription": "string",
                "contentHash": "string",
                "description": "string",
                "encryptedContent": "string",
                "expectedRowVersion": "string",
                "fields": [],
                "fileName": "string",
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "sizeBytes": 0,
                "tags": []
              },
              "schema": {
                "$ref": "#/components/schemas/ReplaceDocumentContentRequestDto"
              }
            },
            "application/json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "changeDescription": "string",
                "contentHash": "string",
                "description": "string",
                "encryptedContent": "string",
                "expectedRowVersion": "string",
                "fields": [],
                "fileName": "string",
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "sizeBytes": 0,
                "tags": []
              },
              "schema": {
                "$ref": "#/components/schemas/ReplaceDocumentContentRequestDto"
              }
            },
            "text/json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "changeDescription": "string",
                "contentHash": "string",
                "description": "string",
                "encryptedContent": "string",
                "expectedRowVersion": "string",
                "fields": [],
                "fileName": "string",
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "sizeBytes": 0,
                "tags": []
              },
              "schema": {
                "$ref": "#/components/schemas/ReplaceDocumentContentRequestDto"
              }
            }
          },
          "description": "The replacement content and its encryption envelope."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Content replaced successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data or vault storage quota exceeded."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found or not owned by the caller."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Duplicate content in this vault, the vault is inactive, or the supplied expectedRowVersion is stale (FR-02.032)."
          },
          "428": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Replacement would grow the vault and account recovery is not set up (graduated trust, D-121)."
          }
        },
        "summary": "Replace document content",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/download": {
      "get": {
        "description": "Returns a document's stored ciphertext (Base64) together with the CC-013 encryption envelope (nonce, auth tag, algorithm, key generation, HKDF context) needed to decrypt it client-side. Zero-knowledge: the server never sees or returns plaintext.",
        "operationId": "DownloadDocumentContent",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "ciphertext": "string",
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "mimeType": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentContentDto"
                }
              }
            },
            "description": "Encrypted content retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found, not owned by the caller, or has no stored content."
          }
        },
        "summary": "Download encrypted document content",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/download/stream": {
      "get": {
        "description": "Streams a document's stored ciphertext as application/octet-stream, with the CC-013 encryption envelope (nonce, auth tag, algorithm, key generation, HKDF context) as base64url JSON in the X-Essence-Content-Envelope header. Never buffers the body; never returns plaintext.",
        "operationId": "StreamDocumentContent",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Ciphertext streamed."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found, not owned by the caller, or has no stored content."
          },
          "500": {
            "description": "The document's stored content could not be read (document-content-missing)."
          }
        },
        "summary": "Stream encrypted document content",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/encryption-metadata": {
      "put": {
        "description": "Replaces the stored encryption envelope for a document after a client-side key rotation. Updates IV/nonce, authentication tag, algorithm version, key derivation, and key generation. Requires vault ownership. Content and version are unchanged.",
        "operationId": "UpdateDocumentEncryptionMetadata",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "algorithm": "string",
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "expectedRowVersion": "string",
                "initializationVector": "string",
                "iterations": 0,
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "salt": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateEncryptionMetadataRequestDto"
              }
            },
            "application/json": {
              "example": {
                "algorithm": "string",
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "expectedRowVersion": "string",
                "initializationVector": "string",
                "iterations": 0,
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "salt": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateEncryptionMetadataRequestDto"
              }
            },
            "text/json": {
              "example": {
                "algorithm": "string",
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "expectedRowVersion": "string",
                "initializationVector": "string",
                "iterations": 0,
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "salt": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateEncryptionMetadataRequestDto"
              }
            }
          },
          "description": "The re-encrypted CC-013 envelope (IV/nonce, auth tag, algorithm version, key generation)."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Encryption metadata updated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid envelope data or the document is deleted."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found or not owned by the caller."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The supplied expectedRowVersion is stale; re-fetch the document and retry."
          }
        },
        "summary": "Update document encryption metadata",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/locate": {
      "get": {
        "description": "Returns metadata only: vault, jurisdiction, schema and sealed-field count.",
        "operationId": "LocateDocument",
        "parameters": [
          {
            "description": "The document id that resolved nowhere in the active vault.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "jurisdiction": "string",
                  "schemaRef": "string",
                  "sealedFieldCount": 0,
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentLocationDto"
                }
              }
            },
            "description": "Where the document lives."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not found in any vault the caller owns."
          }
        },
        "summary": "Locate one of the caller's own documents across their vaults",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/renewal-diff/{replacementId}": {
      "get": {
        "description": "Returns ciphertext for both documents so the client can decrypt and compare. The server does no comparing.",
        "operationId": "GetRenewalFieldEnvelopes",
        "parameters": [
          {
            "description": "The document being renewed.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The document replacing it.",
            "in": "path",
            "name": "replacementId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "addedFieldIds": [],
                  "comparableFieldIds": [],
                  "removedFieldIds": []
                },
                "schema": {
                  "$ref": "#/components/schemas/RenewalFieldEnvelopesDto"
                }
              }
            },
            "description": "Both documents' sealed fields."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found or not owned by the caller."
          }
        },
        "summary": "Read both documents' sealed fields for a renewal diff",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/restore": {
      "post": {
        "description": "Restores a soft-deleted document by reversing its soft-delete tombstone. Document content and versions are unchanged. Requires ownership of the vault containing the document.",
        "operationId": "RestoreDocument",
        "parameters": [
          {
            "description": "The document ID to restore.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Document restored successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found or not owned by the caller."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document is not currently deleted (nothing to restore)."
          }
        },
        "summary": "Restore a trashed document",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/sensitivity-label/{label}": {
      "post": {
        "description": "Takes the document out of the holder's default listing without revoking any share that depends on it, without notifying any recipient, and without starting a retention clock. Idempotent. On /{id}/sensitivity-label/{label} the vault's owner instead confirms or raises the record's sensitivity label (standard | personal | sensitive); a lower label on a record a sponsor loaded is held for that sponsor's reviewer (202).",
        "operationId": "ArchiveDocument",
        "parameters": [
          {
            "description": "The document to archive.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "On the sensitivity-label route only: `standard | personal | sensitive`.",
            "in": "path",
            "name": "label",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Document archived, or its label confirmed."
          },
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "The label is lower than the record's and a sponsor loaded it: held for that sponsor's reviewer."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The label is not standard, personal or sensitive."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found or not owned by the caller."
          }
        },
        "summary": "Archive a document (or confirm its sensitivity label)",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/supersedes/{supersededId}": {
      "post": {
        "description": "Records the renewal relation and returns the recipients who currently read the replaced document. Moves no access.",
        "operationId": "SupersedeDocument",
        "parameters": [
          {
            "description": "The new document, taking the old one's place.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The document being replaced.",
            "in": "path",
            "name": "supersededId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "dependents": [],
                  "hasDependents": false,
                  "replacementDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentSupersessionResponse"
                }
              }
            },
            "description": "Relation recorded."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found or not owned by the caller."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "A different replacement is already recorded."
          }
        },
        "summary": "Record that this document replaces another",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Documents/{id}/unarchive": {
      "post": {
        "description": "Returns an archived document to the holder's default listing. Idempotent.",
        "operationId": "UnarchiveDocument",
        "parameters": [
          {
            "description": "The document to unarchive.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Document unarchived."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found or not owned by the caller."
          }
        },
        "summary": "Unarchive a document",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/Search/suggestions": {
      "get": {
        "description": "Returns search suggestions based on partial input by searching document filenames, category names, and tags in Elasticsearch. Supports fuzzy matching for typo tolerance. Only returns suggestions from documents in vaults owned by the authenticated user.",
        "operationId": "GetSearchSuggestions",
        "parameters": [
          {
            "description": "Vault ID to scope suggestions to a specific vault.",
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Partial search input for autocomplete (minimum 2 characters).",
            "in": "query",
            "name": "input",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Maximum number of suggestions to return (default: 10, max: 50).",
            "in": "query",
            "name": "maxSuggestions",
            "schema": {
              "default": 10,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Search suggestions retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault."
          }
        },
        "summary": "Get search suggestions for autocomplete",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/Shares/{token}": {
      "get": {
        "description": "Accesses a document via its share token. No authentication required. Validates that the share is not expired or revoked. Every successful resolution is recorded for audit; the access write cannot be suppressed by the caller.",
        "operationId": "GetDocumentShareByToken",
        "parameters": [
          {
            "description": "The share token.",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "accessLevel": "string",
                  "canEdit": false,
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "isExpired": false,
                  "isPublic": false,
                  "isRevoked": false,
                  "isValid": false,
                  "isVersionSpecific": false,
                  "remainingTime": "string",
                  "versionNumber": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicDocumentShareDto"
                }
              }
            },
            "description": "Document share accessed successfully."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Share not found, expired, or revoked."
          }
        },
        "summary": "Access document via share token",
        "tags": [
          "Document Sharing"
        ]
      }
    },
    "/api/v1/Templates": {
      "get": {
        "description": "Retrieves a paginated list of document templates with optional filtering by category and active status.",
        "operationId": "ListTemplates",
        "parameters": [
          {
            "description": "The page number (default: 1).",
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "The page size (default: 20, max: 100).",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "Filter by category: Identity, Financial, Health, Education, Property (optional).",
            "in": "query",
            "name": "category",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by active status (optional).",
            "in": "query",
            "name": "isActive",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "pageNumber": 0,
                  "pageSize": 0,
                  "templates": [],
                  "totalCount": 0,
                  "totalPages": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/ListTemplatesQueryResult"
                }
              }
            },
            "description": "Template list retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid pagination or filter parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "List document templates",
        "tags": [
          "Templates"
        ]
      },
      "post": {
        "description": "Creates a new document template with multi-language support and field mappings. Template is active by default.",
        "operationId": "CreateTemplate",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "category": "string",
                "description": "string",
                "fieldMappings": [],
                "icon": "string",
                "localizedDescriptions": {},
                "localizedNames": {},
                "name": "string",
                "previewImage": "string",
                "schemaRef": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateCommand"
              }
            },
            "application/json": {
              "example": {
                "category": "string",
                "description": "string",
                "fieldMappings": [],
                "icon": "string",
                "localizedDescriptions": {},
                "localizedNames": {},
                "name": "string",
                "previewImage": "string",
                "schemaRef": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateCommand"
              }
            },
            "text/json": {
              "example": {
                "category": "string",
                "description": "string",
                "fieldMappings": [],
                "icon": "string",
                "localizedDescriptions": {},
                "localizedNames": {},
                "name": "string",
                "previewImage": "string",
                "schemaRef": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateCommand"
              }
            }
          },
          "description": "The template creation request."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "category": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "isActive": false,
                  "name": "string",
                  "schemaRef": "string",
                  "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CreateTemplateCommandResult"
                }
              }
            },
            "description": "Template created successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid template data or duplicate name."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Create a new template",
        "tags": [
          "Templates"
        ]
      }
    },
    "/api/v1/Templates/by-category/{category}": {
      "get": {
        "description": "Retrieves all templates in a specific category (Identity, Financial, Health, Education, Property).",
        "operationId": "GetTemplatesByCategory",
        "parameters": [
          {
            "description": "The category (Identity, Financial, Health, Education, Property).",
            "in": "path",
            "name": "category",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "category": "string",
                  "templates": [],
                  "totalCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/GetTemplatesByCategoryQueryResult"
                }
              }
            },
            "description": "Templates retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Get templates by category",
        "tags": [
          "Templates"
        ]
      }
    },
    "/api/v1/Templates/by-schema/{schemaRef}": {
      "get": {
        "description": "Retrieves all templates that use a specific document schema.",
        "operationId": "GetTemplatesBySchema",
        "parameters": [
          {
            "description": "The schema ID.",
            "in": "path",
            "name": "schemaRef",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "schemaRef": "string",
                  "templates": [],
                  "totalCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/GetTemplatesBySchemaQueryResult"
                }
              }
            },
            "description": "Templates retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Get templates by schema",
        "tags": [
          "Templates"
        ]
      }
    },
    "/api/v1/Templates/{id}": {
      "delete": {
        "description": "Deletes a template permanently. Consider using deactivate for soft delete instead.",
        "operationId": "DeleteTemplate",
        "parameters": [
          {
            "description": "The template ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Template deleted successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Template not found."
          }
        },
        "summary": "Delete template",
        "tags": [
          "Templates"
        ]
      },
      "get": {
        "description": "Retrieves detailed information about a specific template by ID including all localized content and field mappings.",
        "operationId": "GetTemplate",
        "parameters": [
          {
            "description": "The template ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "category": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "fieldMappings": [],
                  "icon": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActive": false,
                  "localizedDescriptions": {},
                  "localizedNames": {},
                  "name": "string",
                  "previewImage": "string",
                  "schemaRef": "string",
                  "updatedAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/TemplateDto"
                }
              }
            },
            "description": "Template retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Template not found."
          }
        },
        "summary": "Get template by ID",
        "tags": [
          "Templates"
        ]
      },
      "put": {
        "description": "Updates an existing template's details, localized content, and field mappings. Category cannot be changed.",
        "operationId": "UpdateTemplate",
        "parameters": [
          {
            "description": "The template ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "description": "string",
                "fieldMappings": [],
                "icon": "string",
                "localizedDescriptions": {},
                "localizedNames": {},
                "name": "string",
                "previewImage": "string",
                "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateTemplateCommand"
              }
            },
            "application/json": {
              "example": {
                "description": "string",
                "fieldMappings": [],
                "icon": "string",
                "localizedDescriptions": {},
                "localizedNames": {},
                "name": "string",
                "previewImage": "string",
                "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateTemplateCommand"
              }
            },
            "text/json": {
              "example": {
                "description": "string",
                "fieldMappings": [],
                "icon": "string",
                "localizedDescriptions": {},
                "localizedNames": {},
                "name": "string",
                "previewImage": "string",
                "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateTemplateCommand"
              }
            }
          },
          "description": "The template update request."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "name": "string",
                  "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "updatedAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/UpdateTemplateCommandResult"
                }
              }
            },
            "description": "Template updated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid template data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Template not found."
          }
        },
        "summary": "Update template",
        "tags": [
          "Templates"
        ]
      }
    },
    "/api/v1/Templates/{id}/activate": {
      "post": {
        "description": "Activates a template, making it available for document creation.",
        "operationId": "ActivateTemplate",
        "parameters": [
          {
            "description": "The template ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "isActive": false,
                  "name": "string",
                  "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/ActivateTemplateCommandResult"
                }
              }
            },
            "description": "Template activated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Template is already active."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Template not found."
          }
        },
        "summary": "Activate template",
        "tags": [
          "Templates"
        ]
      }
    },
    "/api/v1/Templates/{id}/deactivate": {
      "post": {
        "description": "Deactivates a template, making it unavailable for document creation (soft delete).",
        "operationId": "DeactivateTemplate",
        "parameters": [
          {
            "description": "The template ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "isActive": false,
                  "name": "string",
                  "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DeactivateTemplateCommandResult"
                }
              }
            },
            "description": "Template deactivated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Template is already inactive."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Template not found."
          }
        },
        "summary": "Deactivate template",
        "tags": [
          "Templates"
        ]
      }
    },
    "/api/v1/Uploads": {
      "post": {
        "description": "Creates a new upload session for chunked file upload. Performs file validation and duplicate detection. Returns session ID for subsequent chunk uploads.",
        "operationId": "InitiateUpload",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "chunkSize": 0,
                "contentType": "string",
                "fileHash": "string",
                "fileName": "string",
                "fileSize": 0,
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/InitiateUploadCommand"
              }
            },
            "application/json": {
              "example": {
                "chunkSize": 0,
                "contentType": "string",
                "fileHash": "string",
                "fileName": "string",
                "fileSize": 0,
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/InitiateUploadCommand"
              }
            },
            "text/json": {
              "example": {
                "chunkSize": 0,
                "contentType": "string",
                "fileHash": "string",
                "fileName": "string",
                "fileSize": 0,
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/InitiateUploadCommand"
              }
            }
          },
          "description": "The upload initiation request with file metadata."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "chunkSize": 0,
                  "duplicateDetected": false,
                  "existingDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "sessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "totalChunks": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/InitiateUploadCommandResult"
                }
              }
            },
            "description": "Upload session created successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid file metadata or validation failure."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "File already exists (duplicate detected)."
          },
          "428": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Account recovery must be set up before this vault can grow (graduated trust, D-121)."
          }
        },
        "summary": "Initiate chunked file upload",
        "tags": [
          "Uploads"
        ]
      }
    },
    "/api/v1/Uploads/{id}": {
      "delete": {
        "description": "Cancels an active upload session and deletes all uploaded chunks from storage. Idempotent operation - already cancelled sessions are safely ignored.",
        "operationId": "CancelUpload",
        "parameters": [
          {
            "description": "The upload session ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "reason": "string",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "uploadSessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CancelUploadCommand"
              }
            },
            "application/json": {
              "example": {
                "reason": "string",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "uploadSessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CancelUploadCommand"
              }
            },
            "text/json": {
              "example": {
                "reason": "string",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "uploadSessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CancelUploadCommand"
              }
            }
          },
          "description": "Optional cancellation request with reason."
        },
        "responses": {
          "204": {
            "description": "Upload session cancelled successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Upload already completed or invalid state."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Upload session not found."
          }
        },
        "summary": "Cancel file upload",
        "tags": [
          "Uploads"
        ]
      }
    },
    "/api/v1/Uploads/{id}/chunks": {
      "post": {
        "description": "Uploads a single chunk for an existing upload session. Performs hash verification and validates chunk index. Idempotent operation - duplicate chunks are safely ignored.",
        "operationId": "UploadChunk",
        "parameters": [
          {
            "description": "The upload session ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "chunkData": "string",
                "chunkHash": "string",
                "chunkIndex": 0,
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "uploadSessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UploadChunkCommand"
              }
            },
            "application/json": {
              "example": {
                "chunkData": "string",
                "chunkHash": "string",
                "chunkIndex": 0,
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "uploadSessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UploadChunkCommand"
              }
            },
            "text/json": {
              "example": {
                "chunkData": "string",
                "chunkHash": "string",
                "chunkIndex": 0,
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "uploadSessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UploadChunkCommand"
              }
            }
          },
          "description": "The chunk upload request with chunk data and hash."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "progress": 0,
                  "remainingChunks": 0,
                  "success": false,
                  "uploadedChunks": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/UploadChunkCommandResult"
                }
              }
            },
            "description": "Chunk uploaded successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid chunk data, hash mismatch, or session expired."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Upload session not found."
          }
        },
        "summary": "Upload file chunk",
        "tags": [
          "Uploads"
        ]
      }
    },
    "/api/v1/Uploads/{id}/complete": {
      "post": {
        "description": "Completes an upload session by merging all chunks into a final file. Validates that all chunks have been uploaded. Triggers virus scanning asynchronously.",
        "operationId": "CompleteUpload",
        "parameters": [
          {
            "description": "The upload session ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "description": "string",
                "fields": [],
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "tags": [],
                "uploadSessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CompleteUploadCommand"
              }
            },
            "application/json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "description": "string",
                "fields": [],
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "tags": [],
                "uploadSessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CompleteUploadCommand"
              }
            },
            "text/json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "description": "string",
                "fields": [],
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "tags": [],
                "uploadSessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CompleteUploadCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "blobStoragePath": "string",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "message": "string",
                  "quarantined": false,
                  "status": "string",
                  "success": false,
                  "threatName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/CompleteUploadCommandResult"
                }
              }
            },
            "description": "Upload completed successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not all chunks uploaded, or the merged file does not match its declared hash."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Upload session not found."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The session has already ended (quarantined, failed or cancelled)."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Malware detected; the upload was quarantined and purged."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The completion failed on the server."
          }
        },
        "summary": "Complete file upload",
        "tags": [
          "Uploads"
        ]
      }
    },
    "/api/v1/Uploads/{id}/status": {
      "get": {
        "description": "Retrieves the current status and progress information for an upload session. Useful for monitoring upload progress and resuming interrupted uploads.",
        "operationId": "GetUploadStatus",
        "parameters": [
          {
            "description": "The upload session ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "blobStoragePath": "string",
                  "chunkSize": 0,
                  "contentType": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "fileHash": "string",
                  "fileName": "string",
                  "fileSize": 0,
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isComplete": false,
                  "progress": 0,
                  "remainingSeconds": 0,
                  "totalChunks": 0,
                  "updatedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "uploadedChunks": [],
                  "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/UploadSessionDto"
                }
              }
            },
            "description": "Upload status retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Upload session not found."
          }
        },
        "summary": "Get upload status",
        "tags": [
          "Uploads"
        ]
      }
    },
    "/api/v1/Vaults": {
      "get": {
        "description": "Retrieves a paginated list of all vaults owned by the authenticated user.",
        "operationId": "ListVaults",
        "parameters": [
          {
            "description": "The page number (default: 1).",
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "The page size (default: 10, max: 100).",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 10,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "Include inactive (soft-deleted) vaults (default: false).",
            "in": "query",
            "name": "includeInactive",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "items": [],
                  "pageNumber": 0,
                  "pageSize": 0,
                  "totalCount": 0,
                  "totalPages": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultDtoPagedResultDto"
                }
              }
            },
            "description": "Vault list retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid pagination parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "List user's vaults",
        "tags": [
          "Vaults"
        ]
      },
      "post": {
        "description": "Creates a new zero-knowledge encrypted vault. All encryption metadata must be provided by the client.",
        "operationId": "CreateVault",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "authenticationTag": "string",
                "autoDeleteDays": 0,
                "autoDeleteEnabled": false,
                "description": "string",
                "homeRegion": "string",
                "initializationVector": "string",
                "isDefault": false,
                "keyId": "string",
                "maxDocuments": 0,
                "maxStorageSizeBytes": 0,
                "name": "string",
                "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "vaultType": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateVaultCommand"
              }
            },
            "application/json": {
              "example": {
                "authenticationTag": "string",
                "autoDeleteDays": 0,
                "autoDeleteEnabled": false,
                "description": "string",
                "homeRegion": "string",
                "initializationVector": "string",
                "isDefault": false,
                "keyId": "string",
                "maxDocuments": 0,
                "maxStorageSizeBytes": 0,
                "name": "string",
                "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "vaultType": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateVaultCommand"
              }
            },
            "text/json": {
              "example": {
                "authenticationTag": "string",
                "autoDeleteDays": 0,
                "autoDeleteEnabled": false,
                "description": "string",
                "homeRegion": "string",
                "initializationVector": "string",
                "isDefault": false,
                "keyId": "string",
                "maxDocuments": 0,
                "maxStorageSizeBytes": 0,
                "name": "string",
                "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "vaultType": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateVaultCommand"
              }
            }
          },
          "description": "The vault creation request."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "autoDeleteDays": 0,
                  "autoDeleteEnabled": false,
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "documentCount": 0,
                  "encryptionAlgorithm": "string",
                  "fieldCount": 0,
                  "homeRegion": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActive": false,
                  "keyId": "string",
                  "maxDocuments": 0,
                  "maxStorageSizeBytes": 0,
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "name": "string",
                  "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "schemaBoundNotSealedCount": 0,
                  "sharedFieldCount": 0,
                  "storageUsedBytes": 0,
                  "vaultType": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultDto"
                }
              }
            },
            "description": "Vault created successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data or duplicate vault name."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Create a new vault",
        "tags": [
          "Vaults"
        ]
      }
    },
    "/api/v1/Vaults/provisioning-status": {
      "get": {
        "description": "Reports whether the authenticated user's default vault exists yet, is still being provisioned, or is delayed.",
        "operationId": "GetDefaultVaultProvisioningStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "attempts": 0,
                  "pendingSince": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/DefaultVaultProvisioningStatusDto"
                }
              }
            },
            "description": "Provisioning status retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Default-vault provisioning status",
        "tags": [
          "Vaults"
        ]
      }
    },
    "/api/v1/Vaults/{id}": {
      "delete": {
        "description": "Soft deletes a vault by marking it as inactive. Documents are not automatically deleted. User must be the vault owner.",
        "operationId": "DeleteVault",
        "parameters": [
          {
            "description": "The vault ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Vault deleted successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own this vault."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault not found."
          }
        },
        "summary": "Delete vault",
        "tags": [
          "Vaults"
        ]
      },
      "get": {
        "description": "Retrieves detailed information about a specific vault by ID. User must be the vault owner.",
        "operationId": "GetVault",
        "parameters": [
          {
            "description": "The vault ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "autoDeleteDays": 0,
                  "autoDeleteEnabled": false,
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "documentCount": 0,
                  "encryptionAlgorithm": "string",
                  "fieldCount": 0,
                  "homeRegion": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActive": false,
                  "keyId": "string",
                  "maxDocuments": 0,
                  "maxStorageSizeBytes": 0,
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "name": "string",
                  "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "schemaBoundNotSealedCount": 0,
                  "sharedFieldCount": 0,
                  "storageUsedBytes": 0,
                  "vaultType": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultDto"
                }
              }
            },
            "description": "Vault retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own this vault."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault not found."
          }
        },
        "summary": "Get vault by ID",
        "tags": [
          "Vaults"
        ]
      },
      "put": {
        "description": "Updates a vault's name and settings. User must be the vault owner.",
        "operationId": "UpdateVault",
        "parameters": [
          {
            "description": "The vault ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "autoDeleteDays": 0,
                "autoDeleteEnabled": false,
                "description": "string",
                "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "maxDocuments": 0,
                "maxStorageSizeBytes": 0,
                "name": "string",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateVaultCommand"
              }
            },
            "application/json": {
              "example": {
                "autoDeleteDays": 0,
                "autoDeleteEnabled": false,
                "description": "string",
                "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "maxDocuments": 0,
                "maxStorageSizeBytes": 0,
                "name": "string",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateVaultCommand"
              }
            },
            "text/json": {
              "example": {
                "autoDeleteDays": 0,
                "autoDeleteEnabled": false,
                "description": "string",
                "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "maxDocuments": 0,
                "maxStorageSizeBytes": 0,
                "name": "string",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateVaultCommand"
              }
            }
          },
          "description": "The vault update request."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "autoDeleteDays": 0,
                  "autoDeleteEnabled": false,
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "documentCount": 0,
                  "encryptionAlgorithm": "string",
                  "fieldCount": 0,
                  "homeRegion": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActive": false,
                  "keyId": "string",
                  "maxDocuments": 0,
                  "maxStorageSizeBytes": 0,
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "name": "string",
                  "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "schemaBoundNotSealedCount": 0,
                  "sharedFieldCount": 0,
                  "storageUsedBytes": 0,
                  "vaultType": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultDto"
                }
              }
            },
            "description": "Vault updated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own this vault."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault not found."
          }
        },
        "summary": "Update vault",
        "tags": [
          "Vaults"
        ]
      }
    },
    "/api/v1/Vaults/{id}/attention": {
      "get": {
        "description": "Board 21c makes the attention queue the one deliberate exception to vault scoping: a\r\nnaturalisation running since October cannot vanish because somebody switched vaults to check\r\na tenancy.\r\n            \r\nOne vault per call; the client fans out. A Global endpoint aggregating every vault would\r\nconcentrate, in one place, a map of what needs doing across all of a person's jurisdictions\r\n— the concentration regional sovereignty exists to prevent.\r\n            \r\nMetadata only. Expiring DOCUMENTS are deliberately absent: an expiry date is a SecureField\r\nvalue, derived on the client after decryption, so it cannot cross a vault boundary without\r\nthe server holding plaintext.",
        "operationId": "Vaults_GetVaultAttention",
        "parameters": [
          {
            "description": "The vault to ask about — usually one the caller is NOT currently in.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "items": [],
                  "jurisdiction": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultAttentionDto"
                }
              }
            },
            "description": "The vault's attention rows."
          },
          "201": {
            "description": "Vault created in this Sovereign instance."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not own that vault."
          },
          "409": {
            "description": "A default vault already exists for the owner (idempotent no-op)."
          }
        },
        "summary": "Cross-instance sovereign vault provisioning (FR-03). Called service-to-service\r\nby the Global instance's vault router to create a user's default vault IN THIS\r\nSovereign instance. Authenticated with the scoped platform service token\r\n(`ServiceProvisioning` scheme, and `scope=vault:provision` — the scheme also guards\r\nshared-blob destruction, so the scope is what keeps a blob-purge credential from reaching this\r\nroute, debt-2026-08-27-213), NOT a user token: the caller supplies the\r\ntarget `OwnerId` in the body (there is no user principal). Never exposed to\r\nend users and never routed to on the Global instance (the never-Global guard in\r\nthe create handler rejects it there).",
        "tags": [
          "Vaults"
        ]
      }
    },
    "/api/v1/Vaults/{id}/storage/reconcile": {
      "post": {
        "description": "Recomputes the vault's storage counter from the total size of its active documents and corrects any drift. Idempotent. User must be the vault owner.",
        "operationId": "ReconcileVaultStorage",
        "parameters": [
          {
            "description": "The vault ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "actualStorageUsedBytes": 0,
                  "corrected": false,
                  "driftBytes": 0,
                  "previousStorageUsedBytes": 0,
                  "storageQuotaBytes": 0,
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultStorageReconciliationDto"
                }
              }
            },
            "description": "Reconciliation completed."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own this vault."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault not found."
          }
        },
        "summary": "Reconcile vault storage usage",
        "tags": [
          "Vaults"
        ]
      }
    },
    "/api/v1/account/merge/{mergeId}/conflicts": {
      "get": {
        "description": "Scans both accounts' vaults, auto-resolves the non-critical collisions server-side, and returns only the critical collisions to triage plus the auto-resolved + unreadable counts. Metadata only.",
        "operationId": "GetAccountMergeConflictQueue",
        "parameters": [
          {
            "in": "path",
            "name": "mergeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "autoResolvedCount": 0,
                  "conflicts": [],
                  "mergeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "unreadableCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/MergeConflictQueueDto"
                }
              }
            },
            "description": "The bulk conflict queue (critical set + auto-resolved / unreadable counts)."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not own the merge."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The merge does not exist."
          }
        },
        "summary": "Get the bulk merge-conflict queue",
        "tags": [
          "AccountMerge"
        ]
      }
    },
    "/api/v1/account/merge/{mergeId}/resolutions": {
      "post": {
        "description": "Records the caller's triage choice for each named conflict ahead of the merge commit. Commits nothing to the vaults.",
        "operationId": "AcceptAccountMergeResolutions",
        "parameters": [
          {
            "in": "path",
            "name": "mergeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "resolutions": []
              },
              "schema": {
                "$ref": "#/components/schemas/AcceptMergeResolutionsRequestDto"
              }
            },
            "application/json": {
              "example": {
                "resolutions": []
              },
              "schema": {
                "$ref": "#/components/schemas/AcceptMergeResolutionsRequestDto"
              }
            },
            "text/json": {
              "example": {
                "resolutions": []
              },
              "schema": {
                "$ref": "#/components/schemas/AcceptMergeResolutionsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "autoResolvedCount": 0,
                  "conflicts": [],
                  "mergeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "unreadableCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/MergeConflictQueueDto"
                }
              }
            },
            "description": "The refreshed bulk conflict queue."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid resolution payload."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not own the merge."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The merge does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "A resolution targets a non-conflict item or an already-applied merge."
          }
        },
        "summary": "Accept the merge-conflict resolution set",
        "tags": [
          "AccountMerge"
        ]
      }
    },
    "/api/v1/account/merge/{mergeId}/summary": {
      "get": {
        "description": "Returns the one figure set — keyed to the chosen survivor — that the account-merge journey renders identically at the step-2 preview, step-5 consent, step-6 warning and step-7 receipt. Documents are authoritative from the vault reconciliation; contacts and consents are honest-unavailable until their owning capabilities supply them. Metadata only.",
        "operationId": "GetAccountMergeSummary",
        "parameters": [
          {
            "in": "path",
            "name": "mergeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "consents": [],
                  "contacts": [],
                  "mergeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/MergeSummaryDto"
                }
              }
            },
            "description": "The merge-preview summary (documents authoritative; contacts/consents when supplied). Metadata only."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not own the merge."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The merge does not exist."
          }
        },
        "summary": "Get the authoritative merge-preview summary",
        "tags": [
          "AccountMerge"
        ]
      }
    },
    "/api/v1/administration/vault-access/{subjectUserId}": {
      "post": {
        "description": "Idempotent. Re-applying a lock that is already in force, and lifting one that is not, are\r\nboth successful — the caller resumes by re-driving outstanding subjects — and are\r\ndistinguished from a first application by `stateChanged` in the response.",
        "operationId": "AdministrativeVaultAccess_ApplyEffect",
        "parameters": [
          {
            "description": "The subject whose vault access moves.",
            "in": "path",
            "name": "subjectUserId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "operationClass": "string",
                "operationReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AdministrativeVaultAccessEffectRequestDto"
              }
            },
            "application/json": {
              "example": {
                "operationClass": "string",
                "operationReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AdministrativeVaultAccessEffectRequestDto"
              }
            },
            "text/json": {
              "example": {
                "operationClass": "string",
                "operationReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AdministrativeVaultAccessEffectRequestDto"
              }
            }
          },
          "description": "The operation class and its originating operation reference."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "effectiveAt": "2026-01-01T00:00:00.0000000+00:00",
                  "operationClass": "string",
                  "outcome": "string",
                  "stateChanged": false,
                  "subjectUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/AdministrativeVaultAccessEffectDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Applies the vault-access effect of an administrative account-state change to one subject:\r\nlocks access for a restricting operation class, restores it for a reinstating one.",
        "tags": [
          "AdministrativeVaultAccess"
        ]
      }
    },
    "/api/v1/attorney-scope": {
      "post": {
        "description": "The vault owner (donor) grants an attorney a time-boxed field/document/category-scoped read authority.",
        "operationId": "ProvisionAttorneyScope",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "attorneyUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "authorityRecordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "scopedCategories": [],
                "scopedDocumentIds": [],
                "scopedFieldIds": [],
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionAttorneyScopeRequestDto"
              }
            },
            "application/json": {
              "example": {
                "attorneyUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "authorityRecordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "scopedCategories": [],
                "scopedDocumentIds": [],
                "scopedFieldIds": [],
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionAttorneyScopeRequestDto"
              }
            },
            "text/json": {
              "example": {
                "attorneyUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "authorityRecordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "scopedCategories": [],
                "scopedDocumentIds": [],
                "scopedFieldIds": [],
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionAttorneyScopeRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "attorneyUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "authorityRecordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "donorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "grantedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActive": false,
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "scopedCategories": [],
                  "scopedDocumentIds": [],
                  "scopedFieldIds": [],
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/AttorneyVaultScopeGrantDto"
                }
              }
            },
            "description": "The provisioned scope grant."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation (e.g. empty scope, past expiry, donor == attorney)."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not own the target vault."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The target vault was not found."
          }
        },
        "summary": "Provision an attorney scope",
        "tags": [
          "AttorneyScope"
        ]
      }
    },
    "/api/v1/attorney-scope/grants": {
      "get": {
        "description": "Returns the caller-attorney's active (non-revoked, non-expired) vault scope grants so the workspace can link each donor to their vault landing.",
        "operationId": "GetAttorneyScopeGrants",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AttorneyScopeGrantSummaryDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The caller-attorney's active scope grants (possibly empty), newest first."
          }
        },
        "summary": "List my active attorney scope grants",
        "tags": [
          "AttorneyScope"
        ]
      }
    },
    "/api/v1/attorney-scope/revoke": {
      "post": {
        "description": "The donor withdraws a previously-granted attorney scope before its expiry.",
        "operationId": "RevokeAttorneyScope",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "scopeGrantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RevokeAttorneyScopeRequestDto"
              }
            },
            "application/json": {
              "example": {
                "scopeGrantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RevokeAttorneyScopeRequestDto"
              }
            },
            "text/json": {
              "example": {
                "scopeGrantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RevokeAttorneyScopeRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "attorneyUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "authorityRecordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "donorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "grantedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActive": false,
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "scopedCategories": [],
                  "scopedDocumentIds": [],
                  "scopedFieldIds": [],
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/AttorneyVaultScopeGrantDto"
                }
              }
            },
            "description": "The revoked scope grant."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The grant was not found (or the caller is not its donor)."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The grant is already revoked."
          }
        },
        "summary": "Revoke an attorney scope",
        "tags": [
          "AttorneyScope"
        ]
      }
    },
    "/api/v1/attorney-scope/{vaultId}/audit": {
      "get": {
        "description": "Every attorney scoped read against the vault — served or withheld — newest first.",
        "operationId": "GetAttorneyReadAudit",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AttorneyReadAuditEntryDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The attorney-action audit trail (possibly empty), newest first."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not own the vault."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault was not found."
          }
        },
        "summary": "Attorney-action audit trail",
        "tags": [
          "AttorneyScope"
        ]
      }
    },
    "/api/v1/attorney-scope/{vaultId}/documents/{documentId}": {
      "get": {
        "description": "Gates the read on the PoA scope; out-of-scope reads are provably withheld and logged.",
        "operationId": "ReadScopedDocument",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "documentId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "authorityRecordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "inScopeFieldIds": [],
                  "permittedActions": [],
                  "scopeGrantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/AttorneyScopedDocumentDto"
                }
              }
            },
            "description": "The in-scope document with its authorising allocation."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The document is outside the PoA scope (the attempt is logged)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No active scope grants the attorney access to this vault."
          }
        },
        "summary": "Read a document under attorney scope",
        "tags": [
          "AttorneyScope"
        ]
      }
    },
    "/api/v1/attorney-scope/{vaultId}/landing": {
      "get": {
        "description": "Resolves the attorney's active scope over a vault into the before-any-data landing surface.",
        "operationId": "GetAttorneyFirstAccessLanding",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "auditNotice": "string",
                  "authorityRecordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "donorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "permittedActions": [],
                  "scopeGrantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "scopedCategories": [],
                  "scopedDocumentIds": [],
                  "scopedFieldIds": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/AttorneyFirstAccessLandingDto"
                }
              }
            },
            "description": "The first-access landing (whose vault / authority / scope / actions / audit notice)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No active scope grants the attorney access to this vault."
          }
        },
        "summary": "Attorney first-access landing",
        "tags": [
          "AttorneyScope"
        ]
      }
    },
    "/api/v1/crossings": {
      "get": {
        "description": "Per (document, recipient): distinct fields held, the recipient's recorded home region, and whether the holding left the vault's jurisdiction. Scoped to the caller; metadata only.",
        "operationId": "GetUserCrossings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "crossBorder": 0,
                  "domestic": 0,
                  "rows": [],
                  "unknown": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultCrossings"
                }
              }
            },
            "description": "Crossings retrieved."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Border crossings out of the caller's vaults",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/data-requests": {
      "get": {
        "description": "Retrieves a page of data requests filtered by targetUserId, requesterId, and/or status. Results are always bounded by pageNumber/pageSize (debt-2026-06-28-579).",
        "operationId": "GetDataRequests",
        "parameters": [
          {
            "in": "query",
            "name": "targetUserId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "requesterId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "items": [],
                  "pageNumber": 0,
                  "pageSize": 0,
                  "totalCount": 0,
                  "totalPages": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DataRequestSummaryDtoPagedResultDto"
                }
              }
            },
            "description": "Data requests retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid filter or paging parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "List data requests",
        "tags": [
          "Data Requests"
        ]
      },
      "post": {
        "description": "Creates a new data request. The returned ShareToken is used to generate a QR code or platform link for the target user.",
        "operationId": "CreateDataRequest",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "privacyTermsJson": "string",
                "requestedFieldsJson": "string",
                "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requesterType": "string",
                "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateDataRequestCommand"
              }
            },
            "application/json": {
              "example": {
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "privacyTermsJson": "string",
                "requestedFieldsJson": "string",
                "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requesterType": "string",
                "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateDataRequestCommand"
              }
            },
            "text/json": {
              "example": {
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "privacyTermsJson": "string",
                "requestedFieldsJson": "string",
                "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requesterType": "string",
                "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateDataRequestCommand"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "grantKind": "string",
                  "grantValidTo": "2026-01-01T00:00:00.0000000+00:00",
                  "injectedDocumentAccessStatement": "string",
                  "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "injectedDocumentReadability": "string",
                  "privacyTermsJson": "string",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requestedFieldsJson": "string",
                  "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requesterType": "string",
                  "shareToken": "string",
                  "status": "string",
                  "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DataRequestDto"
                }
              }
            },
            "description": "Data request created successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request cannot be addressed to that recipient: this instance holds no vault for it (#14131)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "This requester already has the maximum number of unanswered requests for this recipient (DD-040)."
          }
        },
        "summary": "Create a data request",
        "tags": [
          "Data Requests"
        ]
      }
    },
    "/api/v1/data-requests/by-token/{token}": {
      "get": {
        "description": "Retrieves a data request using the token embedded in a QR code or platform link. Anonymous access is permitted so unauthenticated users can review the request before logging in.",
        "operationId": "GetDataRequestByToken",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "privacyTermsJson": "string",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requestedFieldsJson": "string",
                  "requesterLegalName": "string",
                  "requesterRegistryScheme": "string",
                  "requesterRegistryValue": "string",
                  "requesterType": "string",
                  "requesterUnverifiedReason": "string",
                  "requesterVerified": false,
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/AnonymousDataRequestDto"
                }
              }
            },
            "description": "Data request retrieved successfully."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No data request found for the given token."
          }
        },
        "summary": "Get data request by share token",
        "tags": [
          "Data Requests"
        ]
      }
    },
    "/api/v1/data-requests/injections/targeted": {
      "post": {
        "description": "Organisation injects a document directly to a known platform user with their consent (FR-02.029). The injection awaits the recipient's acceptance.",
        "operationId": "InjectTargetedDocument",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "consentReference": "string",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "privacyTermsJson": "string",
                "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requesterType": "string",
                "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/InjectTargetedDocumentCommand"
              }
            },
            "application/json": {
              "example": {
                "consentReference": "string",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "privacyTermsJson": "string",
                "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requesterType": "string",
                "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/InjectTargetedDocumentCommand"
              }
            },
            "text/json": {
              "example": {
                "consentReference": "string",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "privacyTermsJson": "string",
                "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requesterType": "string",
                "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/InjectTargetedDocumentCommand"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "grantKind": "string",
                  "grantValidTo": "2026-01-01T00:00:00.0000000+00:00",
                  "injectedDocumentAccessStatement": "string",
                  "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "injectedDocumentReadability": "string",
                  "privacyTermsJson": "string",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requestedFieldsJson": "string",
                  "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requesterType": "string",
                  "shareToken": "string",
                  "status": "string",
                  "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DataRequestDto"
                }
              }
            },
            "description": "Injection created successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data, missing/invalid consent reference, or the consent grant does not authorise this injection."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not an organisation principal, or does not control the injected document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The injected document does not exist."
          },
          "503": {
            "description": "The Consent Service is temporarily unavailable; the consent check could not complete."
          }
        },
        "summary": "Inject a document (targeted)",
        "tags": [
          "Data Requests"
        ]
      }
    },
    "/api/v1/data-requests/injections/unmatched": {
      "post": {
        "description": "Organisation injects a document for an as-yet-unidentified recipient (FR-02.028). Returns a claim ShareToken; the injection is auto-matched when the match hint resolves a user, else held unmatched until claimed or TTL-purged.",
        "operationId": "InjectUnmatchedDocument",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "matchHintHash": "string",
                "privacyTermsJson": "string",
                "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requesterType": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/InjectUnmatchedDocumentCommand"
              }
            },
            "application/json": {
              "example": {
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "matchHintHash": "string",
                "privacyTermsJson": "string",
                "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requesterType": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/InjectUnmatchedDocumentCommand"
              }
            },
            "text/json": {
              "example": {
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "matchHintHash": "string",
                "privacyTermsJson": "string",
                "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requesterType": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/InjectUnmatchedDocumentCommand"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "grantKind": "string",
                  "grantValidTo": "2026-01-01T00:00:00.0000000+00:00",
                  "injectedDocumentAccessStatement": "string",
                  "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "injectedDocumentReadability": "string",
                  "privacyTermsJson": "string",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requestedFieldsJson": "string",
                  "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requesterType": "string",
                  "shareToken": "string",
                  "status": "string",
                  "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DataRequestDto"
                }
              }
            },
            "description": "Injection created successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not an organisation principal, or does not control the injected document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The injected document does not exist."
          }
        },
        "summary": "Inject a document (unmatched)",
        "tags": [
          "Data Requests"
        ]
      }
    },
    "/api/v1/data-requests/injections/{id}/accept": {
      "post": {
        "description": "The recipient accepts an injected document. An unmatched injection is claimed and bound to the accepting user; a targeted injection is confirmed.",
        "operationId": "AcceptInjection",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "grantKind": "string",
                  "grantValidTo": "2026-01-01T00:00:00.0000000+00:00",
                  "injectedDocumentAccessStatement": "string",
                  "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "injectedDocumentReadability": "string",
                  "privacyTermsJson": "string",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requestedFieldsJson": "string",
                  "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requesterType": "string",
                  "shareToken": "string",
                  "status": "string",
                  "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DataRequestDto"
                }
              }
            },
            "description": "Injection accepted successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Injection is no longer pending or is not an injection."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not the intended recipient."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Injection not found."
          }
        },
        "summary": "Accept an injected document",
        "tags": [
          "Data Requests"
        ]
      }
    },
    "/api/v1/data-requests/injections/{id}/document": {
      "get": {
        "description": "Returns the stored ciphertext and envelope of a document injected to the caller. Only the injection's bound target can read it, only while it is pending (and unexpired) or accepted. Every other case is 404, indistinguishable from an unknown id.",
        "operationId": "GetInjectedDocumentContent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "ciphertext": "string",
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "mimeType": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentContentDto"
                }
              }
            },
            "description": "The injected document's ciphertext and envelope."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No injection this caller may read."
          }
        },
        "summary": "Download an injected document",
        "tags": [
          "Data Requests"
        ]
      }
    },
    "/api/v1/data-requests/injections/{id}/reject": {
      "post": {
        "description": "The recipient rejects an injected document. An unmatched injection is bound to the rejecting user so the decline is attributable; a targeted injection may only be rejected by its intended recipient.",
        "operationId": "RejectInjection",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "grantKind": "string",
                  "grantValidTo": "2026-01-01T00:00:00.0000000+00:00",
                  "injectedDocumentAccessStatement": "string",
                  "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "injectedDocumentReadability": "string",
                  "privacyTermsJson": "string",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requestedFieldsJson": "string",
                  "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requesterType": "string",
                  "shareToken": "string",
                  "status": "string",
                  "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DataRequestDto"
                }
              }
            },
            "description": "Injection rejected successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Injection is no longer pending or is not an injection."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not the intended recipient."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Injection not found."
          }
        },
        "summary": "Reject an injected document",
        "tags": [
          "Data Requests"
        ]
      }
    },
    "/api/v1/data-requests/pending": {
      "get": {
        "description": "Retrieves a page of the caller's incoming data requests in the Pending status — those addressed to them and awaiting review. Bounded by pageNumber/pageSize.",
        "operationId": "GetPendingDataRequests",
        "parameters": [
          {
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "items": [],
                  "pageNumber": 0,
                  "pageSize": 0,
                  "totalCount": 0,
                  "totalPages": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DataRequestSummaryDtoPagedResultDto"
                }
              }
            },
            "description": "Pending data requests retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid paging parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "List the caller's pending data requests",
        "tags": [
          "Data Requests"
        ]
      }
    },
    "/api/v1/data-requests/{id}/approve": {
      "post": {
        "description": "Target user approves the data request, specifying which fields are approved and which are declined.",
        "operationId": "ApproveDataRequest",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "approvedFieldsJson": "string",
                "dataRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keepCurrent": false,
                "keepCurrentUntil": "2026-01-01T00:00:00.0000000+00:00",
                "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ApproveDataRequestCommand"
              }
            },
            "application/json": {
              "example": {
                "approvedFieldsJson": "string",
                "dataRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keepCurrent": false,
                "keepCurrentUntil": "2026-01-01T00:00:00.0000000+00:00",
                "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ApproveDataRequestCommand"
              }
            },
            "text/json": {
              "example": {
                "approvedFieldsJson": "string",
                "dataRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keepCurrent": false,
                "keepCurrentUntil": "2026-01-01T00:00:00.0000000+00:00",
                "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ApproveDataRequestCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "grantKind": "string",
                  "grantValidTo": "2026-01-01T00:00:00.0000000+00:00",
                  "injectedDocumentAccessStatement": "string",
                  "injectedDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "injectedDocumentReadability": "string",
                  "privacyTermsJson": "string",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requestedFieldsJson": "string",
                  "requesterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requesterType": "string",
                  "shareToken": "string",
                  "status": "string",
                  "targetUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DataRequestDto"
                }
              }
            },
            "description": "Data request approved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data or request is no longer pending."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Data request not found, or the caller is not its intended recipient (the two are intentionally indistinguishable)."
          }
        },
        "summary": "Approve a data request",
        "tags": [
          "Data Requests"
        ]
      }
    },
    "/api/v1/data-requests/{id}/reject": {
      "post": {
        "description": "Target user explicitly declines the data request.",
        "operationId": "RejectDataRequest",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Data request rejected successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request is no longer pending."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Data request not found, or the caller is not its intended recipient (the two are intentionally indistinguishable)."
          }
        },
        "summary": "Reject a data request",
        "tags": [
          "Data Requests"
        ]
      }
    },
    "/api/v1/delegated-writes": {
      "post": {
        "description": "Captures that the authenticated delegate performed a write on behalf of the named principal.",
        "operationId": "RecordDelegatedWrite",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "delegationGrantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "justification": "string",
                "operation": "string",
                "principalUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "resourceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "resourceType": "string",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RecordDelegatedWriteRequestDto"
              }
            },
            "application/json": {
              "example": {
                "delegationGrantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "justification": "string",
                "operation": "string",
                "principalUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "resourceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "resourceType": "string",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RecordDelegatedWriteRequestDto"
              }
            },
            "text/json": {
              "example": {
                "delegationGrantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "justification": "string",
                "operation": "string",
                "principalUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "resourceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "resourceType": "string",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RecordDelegatedWriteRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "delegateKind": "string",
                  "delegateSubjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "delegateUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "delegationGrantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "justification": "string",
                  "occurredAt": "2026-01-01T00:00:00.0000000+00:00",
                  "operation": "string",
                  "principalUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "resourceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "resourceType": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/DelegatedWriteAttributionDto"
                }
              }
            },
            "description": "The recorded attribution."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation (e.g. delegate == principal, or no delegation grant cited)."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The named principal does not own the target vault, or the cited delegation grant does not\r\nauthorise this delegate to act for that principal (debt-2026-08-13-202)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The target vault was not found."
          },
          "503": {
            "description": "The granting service was unreachable, so the delegation could not be verified."
          }
        },
        "summary": "Record a delegated write",
        "tags": [
          "DelegatedWrites"
        ]
      }
    },
    "/api/v1/delegated-writes/on-behalf-of-me": {
      "get": {
        "description": "Every write a delegate made on behalf of the authenticated principal, newest first.",
        "operationId": "GetMyDelegatedWrites",
        "parameters": [
          {
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DelegatedWriteAttributionDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The delegated-write feed (possibly empty)."
          }
        },
        "summary": "My delegated-write feed",
        "tags": [
          "DelegatedWrites"
        ]
      }
    },
    "/api/v1/documents/care-link-deliveries": {
      "post": {
        "operationId": "DeliverCareLinkDocument",
        "parameters": [
          {
            "description": "The care-link grant the delivery relies on.",
            "in": "query",
            "name": "consentGrantId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contentFormat": "string",
                "contentHash": "string",
                "description": "string",
                "encryptedContent": "string",
                "fields": [],
                "fileName": "string",
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "sensitivityLabel": "string",
                "sizeBytes": 0,
                "tags": [],
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/AddDocumentCommand"
              }
            },
            "application/json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contentFormat": "string",
                "contentHash": "string",
                "description": "string",
                "encryptedContent": "string",
                "fields": [],
                "fileName": "string",
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "sensitivityLabel": "string",
                "sizeBytes": 0,
                "tags": [],
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/AddDocumentCommand"
              }
            },
            "text/json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contentFormat": "string",
                "contentHash": "string",
                "description": "string",
                "encryptedContent": "string",
                "fields": [],
                "fileName": "string",
                "initializationVector": "string",
                "keyDerivationFunction": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string",
                "ownerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "schemaRef": "string",
                "schemaVersion": "string",
                "sensitivityLabel": "string",
                "sizeBytes": 0,
                "tags": [],
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/AddDocumentCommand"
              }
            }
          },
          "description": "The sealed item (content format `child-health/inbound.v1`)."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Delivered."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No live care link from this child's family to the caller's organisation, or it is not for this vault."
          },
          "503": {
            "description": "The consent service could not be consulted; nothing was delivered."
          }
        },
        "summary": "Deliver a sealed item under a care link",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/documents/{docId}/fields": {
      "get": {
        "description": "Retrieves active field shares for a document, paginated. Only Status==Active rows are returned; revoked/expired shares are filtered server-side.",
        "operationId": "GetDocumentFieldShares",
        "parameters": [
          {
            "description": "The document identifier.",
            "in": "path",
            "name": "docId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The page number (1-based, default: 1).",
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "The page size (default: 20, max: 100).",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "items": [],
                  "pageNumber": 0,
                  "pageSize": 0,
                  "totalCount": 0,
                  "totalPages": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/FieldShareDtoPagedResultDto"
                }
              }
            },
            "description": "Field shares retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid pagination parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "List field shares for document",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/documents/{docId}/fields/share-batch": {
      "post": {
        "description": "Shares up to the configured maximum fields-per-share (NFR-02.026) within a document in one request. Returns the per-field outcome; a request exceeding the cap is rejected with HTTP 400.",
        "operationId": "CreateFieldShareBatch",
        "parameters": [
          {
            "in": "path",
            "name": "docId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "fields": []
              },
              "schema": {
                "$ref": "#/components/schemas/CreateFieldShareCommand"
              }
            },
            "application/json": {
              "example": {
                "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "fields": []
              },
              "schema": {
                "$ref": "#/components/schemas/CreateFieldShareCommand"
              }
            },
            "text/json": {
              "example": {
                "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "fields": []
              },
              "schema": {
                "$ref": "#/components/schemas/CreateFieldShareCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "failedCount": 0,
                  "requestedCount": 0,
                  "results": [],
                  "succeededCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/BatchFieldShareResultDto"
                }
              }
            },
            "description": "Batch processed; see per-field outcomes."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data (no fields or fields-per-share cap exceeded)."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "503": {
            "description": "Consent service temporarily unavailable (degraded path)."
          }
        },
        "summary": "Share multiple fields",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/documents/{docId}/fields/{fieldId}/share": {
      "post": {
        "description": "Shares a specific field within a document. The wrapped field encryption key enables the recipient to decrypt only this field.",
        "operationId": "ShareField",
        "parameters": [
          {
            "in": "path",
            "name": "docId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "fieldId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "accessLevel": "string",
                "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "fieldId": "string",
                "fieldLabel": "string",
                "mintConsentOnWiden": false,
                "recipientDisplayName": "string",
                "recipientKeyUnavailable": false,
                "recipientOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "recipientType": "string",
                "recipientUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sharedBlobReference": "string",
                "sharerDisplayName": "string",
                "sharerNote": "string",
                "sharerType": "string",
                "sharingKeyAuthTagBase64": "string",
                "sharingKeyNonceBase64": "string",
                "wrappedFieldKeyBase64": "string",
                "wrappedSharingKeyBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ShareFieldCommand"
              }
            },
            "application/json": {
              "example": {
                "accessLevel": "string",
                "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "fieldId": "string",
                "fieldLabel": "string",
                "mintConsentOnWiden": false,
                "recipientDisplayName": "string",
                "recipientKeyUnavailable": false,
                "recipientOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "recipientType": "string",
                "recipientUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sharedBlobReference": "string",
                "sharerDisplayName": "string",
                "sharerNote": "string",
                "sharerType": "string",
                "sharingKeyAuthTagBase64": "string",
                "sharingKeyNonceBase64": "string",
                "wrappedFieldKeyBase64": "string",
                "wrappedSharingKeyBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ShareFieldCommand"
              }
            },
            "text/json": {
              "example": {
                "accessLevel": "string",
                "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "fieldId": "string",
                "fieldLabel": "string",
                "mintConsentOnWiden": false,
                "recipientDisplayName": "string",
                "recipientKeyUnavailable": false,
                "recipientOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "recipientType": "string",
                "recipientUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sharedBlobReference": "string",
                "sharerDisplayName": "string",
                "sharerNote": "string",
                "sharerType": "string",
                "sharingKeyAuthTagBase64": "string",
                "sharingKeyNonceBase64": "string",
                "wrappedFieldKeyBase64": "string",
                "wrappedSharingKeyBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ShareFieldCommand"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "accessLevel": "string",
                  "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "crossing": "string",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "fieldId": "string",
                  "grantedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "pendingResolutionDeadline": "2026-01-01T00:00:00.0000000+00:00",
                  "recipientDisplayName": "string",
                  "recipientHomeRegion": "string",
                  "recipientOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "recipientType": "string",
                  "recipientUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string",
                  "suspensionGraceWindowEndsAt": "2026-01-01T00:00:00.0000000+00:00",
                  "vaultHomeRegion": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/FieldShareDto"
                }
              }
            },
            "description": "Field shared successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The sharer holds as many fields under a live share as their plan includes (#8365). The problem body names the feature code, the allowance, the SKUs that lift it and an upgrade route."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Active share already exists for this field/recipient combination."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Edit-level field shares are not yet supported (SC-02.E)."
          }
        },
        "summary": "Share a field",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/documents/{documentId}/fields/{fieldId}/content": {
      "get": {
        "description": "Returns one field's sealed envelope to the document owner or the holder of an Active field share on exactly this (document, field). Expiry, revocation and suspension are evaluated on every read.",
        "operationId": "GetFieldContent",
        "parameters": [
          {
            "in": "path",
            "name": "documentId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "fieldId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "algorithmVersion": 0,
                  "authTag": "string",
                  "ciphertext": "string",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "fieldId": "string",
                  "iv": "string",
                  "keyGeneration": 0,
                  "keyId": "string",
                  "wrappedKey": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/FieldContentDto"
                }
              }
            },
            "description": "The field envelope."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The field does not exist, or the caller holds no live share on it — deliberately indistinguishable."
          }
        },
        "summary": "Read one field envelope",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/documents/{id}/activity": {
      "get": {
        "description": "Retrieves a bounded page of the access records the server holds against a document — each one an envelope, field or download serve, newest first. Identifiers, kinds and instants only: the server cannot read the document and holds no actor names, addresses or free-form metadata to report.",
        "operationId": "GetDocumentActivity",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Optional repeated filter on activity kind (`envelope-served`, `field-served`, `download-served`).",
            "in": "query",
            "name": "activityType",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Optional filter to a single acting principal.",
            "in": "query",
            "name": "actorId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Optional inclusive lower time bound (UTC).",
            "in": "query",
            "name": "fromDate",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Optional inclusive upper time bound (UTC).",
            "in": "query",
            "name": "toDate",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "1-based page number (default 1).",
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "Page size (default 50, server ceiling 100).",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "activities": [],
                  "page": 0,
                  "pageSize": 0,
                  "total": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentActivityPageDto"
                }
              }
            },
            "description": "Activity page retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "An activity-type token or date range was not understood."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not have access to the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found."
          }
        },
        "summary": "Get document activity",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/documents/{id}/ownership": {
      "get": {
        "description": "Returns whether the given userId owns the given document. Used by industry modules (e.g. EPIC 30 Family) that hold no document storage of their own to verify ownership against the authoritative Core Document/Vault service before creating a cross-vault sharing record, instead of trusting a caller-supplied documentId blindly.",
        "operationId": "CheckDocumentOwnership",
        "parameters": [
          {
            "description": "The document id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The user whose ownership is being asserted.",
            "in": "query",
            "name": "userId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "owned": false
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentOwnershipDto"
                }
              }
            },
            "description": "Ownership result."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not a service principal holding the ownership-check scope."
          }
        },
        "summary": "Check document ownership (service-to-service)",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/documents/{id}/shares": {
      "get": {
        "description": "Retrieves a document's live shares. Set includeExpired and/or includeRevoked to also return shares that have lapsed or been revoked, so an owner can audit past access. User must own the vault containing the document.",
        "operationId": "GetDocumentShares",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Include shares whose expiry has passed (default false).",
            "in": "query",
            "name": "includeExpired",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "description": "Include shares the owner has revoked (default false).",
            "in": "query",
            "name": "includeRevoked",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DocumentShareDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Document shares retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found."
          }
        },
        "summary": "Get document shares",
        "tags": [
          "Document Sharing"
        ]
      },
      "post": {
        "description": "Creates a new share for a document, generating a cryptographically secure share token. Supports version-specific or document-wide sharing with View or Edit permissions. Can create private (user-specific) or public (anonymous) shares.",
        "operationId": "CreateDocumentShare",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "accessLevel": "string",
                "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "sharedWithUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "versionNumber": 0
              },
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentShareCommand"
              }
            },
            "application/json": {
              "example": {
                "accessLevel": "string",
                "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "sharedWithUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "versionNumber": 0
              },
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentShareCommand"
              }
            },
            "text/json": {
              "example": {
                "accessLevel": "string",
                "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "sharedWithUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "versionNumber": 0
              },
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentShareCommand"
              }
            }
          },
          "description": "The share creation request."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "accessCount": 0,
                  "accessLevel": "string",
                  "ageInDays": 0,
                  "canEdit": false,
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isExpired": false,
                  "isPublic": false,
                  "isRevoked": false,
                  "isValid": false,
                  "isVersionSpecific": false,
                  "lastAccessedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "remainingTime": "string",
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "shareToken": "string",
                  "shareUrl": "string",
                  "sharedWithUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "versionNumber": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentShareDto"
                }
              }
            },
            "description": "Document share created successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found."
          }
        },
        "summary": "Create document share",
        "tags": [
          "Document Sharing"
        ]
      }
    },
    "/api/v1/documents/{id}/shares/{shareId}": {
      "delete": {
        "description": "Revokes a document share by marking it as revoked. The share token becomes invalid immediately. User must own the vault containing the document.",
        "operationId": "RevokeDocumentShare",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The share ID.",
            "in": "path",
            "name": "shareId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Share revoked successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document or share not found."
          }
        },
        "summary": "Revoke document share",
        "tags": [
          "Document Sharing"
        ]
      },
      "get": {
        "description": "Retrieves a specific document share by ID. User must own the vault containing the document.",
        "operationId": "GetDocumentShareById",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The share ID.",
            "in": "path",
            "name": "shareId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "accessCount": 0,
                  "accessLevel": "string",
                  "ageInDays": 0,
                  "canEdit": false,
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isExpired": false,
                  "isPublic": false,
                  "isRevoked": false,
                  "isValid": false,
                  "isVersionSpecific": false,
                  "lastAccessedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "remainingTime": "string",
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "shareToken": "string",
                  "shareUrl": "string",
                  "sharedWithUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "versionNumber": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentShareDto"
                }
              }
            },
            "description": "Document share retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document or share not found."
          }
        },
        "summary": "Get document share by ID",
        "tags": [
          "Document Sharing"
        ]
      }
    },
    "/api/v1/documents/{id}/shares/{shareId}/accept": {
      "post": {
        "description": "Records the recipient's acceptance of a private document share and publishes a ShareAccepted event so the owner is notified. Only the designated recipient may accept.",
        "operationId": "AcceptDocumentShare",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The share ID to accept.",
            "in": "path",
            "name": "shareId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "accessCount": 0,
                  "accessLevel": "string",
                  "ageInDays": 0,
                  "canEdit": false,
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isExpired": false,
                  "isPublic": false,
                  "isRevoked": false,
                  "isValid": false,
                  "isVersionSpecific": false,
                  "lastAccessedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "remainingTime": "string",
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "shareToken": "string",
                  "shareUrl": "string",
                  "sharedWithUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "versionNumber": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentShareDto"
                }
              }
            },
            "description": "Share accepted successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not the designated recipient of the share."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document or share not found."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Share is not in an acceptable state."
          }
        },
        "summary": "Accept document share",
        "tags": [
          "Document Sharing"
        ]
      }
    },
    "/api/v1/documents/{id}/shares/{shareId}/expiration": {
      "put": {
        "description": "Extends the expiration date of a document share. Cannot extend a revoked share. User must own the vault containing the document.",
        "operationId": "ExtendShareExpiration",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The share ID.",
            "in": "path",
            "name": "shareId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "newExpiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "shareId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ExtendShareExpirationCommand"
              }
            },
            "application/json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "newExpiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "shareId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ExtendShareExpirationCommand"
              }
            },
            "text/json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "newExpiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "shareId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ExtendShareExpirationCommand"
              }
            }
          },
          "description": "The expiration extension request."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "accessCount": 0,
                  "accessLevel": "string",
                  "ageInDays": 0,
                  "canEdit": false,
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isExpired": false,
                  "isPublic": false,
                  "isRevoked": false,
                  "isValid": false,
                  "isVersionSpecific": false,
                  "lastAccessedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "remainingTime": "string",
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "shareToken": "string",
                  "shareUrl": "string",
                  "sharedWithUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "versionNumber": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentShareDto"
                }
              }
            },
            "description": "Share expiration extended successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data or share already revoked."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document or share not found."
          }
        },
        "summary": "Extend share expiration",
        "tags": [
          "Document Sharing"
        ]
      }
    },
    "/api/v1/documents/{id}/shares/{shareId}/permission": {
      "put": {
        "description": "Updates the permission level of a document share (View or Edit). User must own the vault containing the document.",
        "operationId": "UpdateSharePermission",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The share ID.",
            "in": "path",
            "name": "shareId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "accessLevel": "string",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "shareId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateSharePermissionCommand"
              }
            },
            "application/json": {
              "example": {
                "accessLevel": "string",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "shareId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateSharePermissionCommand"
              }
            },
            "text/json": {
              "example": {
                "accessLevel": "string",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "shareId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/UpdateSharePermissionCommand"
              }
            }
          },
          "description": "The permission update request."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "accessCount": 0,
                  "accessLevel": "string",
                  "ageInDays": 0,
                  "canEdit": false,
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isExpired": false,
                  "isPublic": false,
                  "isRevoked": false,
                  "isValid": false,
                  "isVersionSpecific": false,
                  "lastAccessedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "remainingTime": "string",
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "shareToken": "string",
                  "shareUrl": "string",
                  "sharedWithUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "versionNumber": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentShareDto"
                }
              }
            },
            "description": "Share permission updated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document or share not found."
          }
        },
        "summary": "Update share permission",
        "tags": [
          "Document Sharing"
        ]
      }
    },
    "/api/v1/documents/{id}/statistics": {
      "get": {
        "description": "Retrieves aggregate counters for a document: envelope/field serves ('views'), download serves, distinct principals for each, the most recent serve, the active-share count and the retained version count. 'Views' means envelopes the server handed out — the closest honest signal a zero-knowledge platform has, since a client decrypting a cached copy is invisible to the server.",
        "operationId": "GetDocumentStatistics",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "lastAccessedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "lastAccessedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "totalDownloads": 0,
                  "totalShares": 0,
                  "totalVersions": 0,
                  "totalViews": 0,
                  "uniqueDownloaders": 0,
                  "uniqueViewers": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentStatisticsDto"
                }
              }
            },
            "description": "Statistics retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not have access to the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found."
          }
        },
        "summary": "Get document statistics",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/documents/{id}/tags": {
      "post": {
        "description": "Adds one or more opaque tags to a document. Adding a tag the document already carries is ignored, so the call is idempotent under retry. Tags are matched byte-for-byte because they may themselves be client-encrypted.",
        "operationId": "AddDocumentTags",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "tags": []
              },
              "schema": {
                "$ref": "#/components/schemas/AddDocumentTagsRequestDto"
              }
            },
            "application/json": {
              "example": {
                "tags": []
              },
              "schema": {
                "$ref": "#/components/schemas/AddDocumentTagsRequestDto"
              }
            },
            "text/json": {
              "example": {
                "tags": []
              },
              "schema": {
                "$ref": "#/components/schemas/AddDocumentTagsRequestDto"
              }
            }
          },
          "description": "The tags to add."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Tags added; the updated document is returned."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "A tag was invalid or the per-document cap would be exceeded."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not have write access to the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found."
          }
        },
        "summary": "Add document tags",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/documents/{id}/tags/{tag}": {
      "delete": {
        "description": "Removes one tag from a document. Removing a tag the document does not carry is not an error: the caller's intent — that the tag is gone — already holds, and reporting 404 would make an idempotent retry look like a failure.",
        "operationId": "RemoveDocumentTag",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The tag to remove (URL-encoded; matched byte-for-byte).",
            "in": "path",
            "name": "tag",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Tag removed (or was not present); the updated document is returned."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The tag was invalid or the document is deleted."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not have write access to the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found."
          }
        },
        "summary": "Remove a document tag",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/documents/{id}/versions": {
      "get": {
        "description": "Retrieves a bounded page of a document's versions ordered by version number (newest first). Each version includes metadata snapshot and encryption information. Use pageNumber/pageSize to page; pageSize is capped server-side at 100. User must own the vault containing the document.",
        "operationId": "GetDocumentVersionHistory",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The 1-based page number (default: 1).",
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "The page size (default: 50, server-enforced ceiling: 100).",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "currentVersionNumber": 0,
                  "pageNumber": 0,
                  "pageSize": 0,
                  "totalVersions": 0,
                  "versions": []
                },
                "schema": {
                  "$ref": "#/components/schemas/GetDocumentVersionHistoryQueryResult"
                }
              }
            },
            "description": "Version history retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found."
          }
        },
        "summary": "Get document version history",
        "tags": [
          "Documents"
        ]
      },
      "post": {
        "description": "Creates a new version snapshot of a document, capturing current metadata and encryption state. The new version becomes the current version. User must own the vault containing the document.",
        "operationId": "CreateDocumentVersion",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "changeDescription": "string",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentVersionCommand"
              }
            },
            "application/json": {
              "example": {
                "changeDescription": "string",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentVersionCommand"
              }
            },
            "text/json": {
              "example": {
                "changeDescription": "string",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentVersionCommand"
              }
            }
          },
          "description": "The version creation request with change description."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "ageInDays": 0,
                  "changeDescription": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "description": "string",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "encryptionAlgorithm": "string",
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isCurrent": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "sizeBytes": 0,
                  "tags": [],
                  "versionNumber": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentVersionDto"
                }
              }
            },
            "description": "Document version created successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data or maximum versions reached."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document not found."
          }
        },
        "summary": "Create document version",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/documents/{id}/versions/compare": {
      "get": {
        "description": "Compares two versions of a document, highlighting differences in metadata fields. User must own the vault containing the document.",
        "operationId": "CompareDocumentVersions",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The starting version number for comparison.",
            "in": "query",
            "name": "fromVersion",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "The ending version number for comparison.",
            "in": "query",
            "name": "toVersion",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "areIdentical": false,
                  "differences": [],
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "versionNumber1": 0,
                  "versionNumber2": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/CompareDocumentVersionsQueryResult"
                }
              }
            },
            "description": "Version comparison completed successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid version numbers."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document or versions not found."
          }
        },
        "summary": "Compare document versions",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/documents/{id}/versions/{versionNumber}": {
      "get": {
        "description": "Retrieves a specific version of a document by version number. Returns the metadata snapshot and encryption information for that version. User must own the vault containing the document.",
        "operationId": "GetDocumentVersion",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The version number to retrieve.",
            "in": "path",
            "name": "versionNumber",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "ageInDays": 0,
                  "changeDescription": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "description": "string",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "encryptionAlgorithm": "string",
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isCurrent": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "sizeBytes": 0,
                  "tags": [],
                  "versionNumber": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentVersionDto"
                }
              }
            },
            "description": "Document version retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document or version not found."
          }
        },
        "summary": "Get specific document version",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/documents/{id}/versions/{versionNumber}/rollback": {
      "post": {
        "description": "Rolls back a document to a specific version by restoring its metadata from that version's snapshot. Creates a new version after rollback. User must own the vault containing the document.",
        "operationId": "RollbackDocumentVersion",
        "parameters": [
          {
            "description": "The document ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The version number to rollback to.",
            "in": "path",
            "name": "versionNumber",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expectedRowVersion": "string",
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "versionNumber": 0
              },
              "schema": {
                "$ref": "#/components/schemas/RollbackDocumentVersionCommand"
              }
            },
            "application/json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expectedRowVersion": "string",
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "versionNumber": 0
              },
              "schema": {
                "$ref": "#/components/schemas/RollbackDocumentVersionCommand"
              }
            },
            "text/json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expectedRowVersion": "string",
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "versionNumber": 0
              },
              "schema": {
                "$ref": "#/components/schemas/RollbackDocumentVersionCommand"
              }
            }
          },
          "description": "The rollback request."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Document rolled back successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data or version not found."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not own the vault containing this document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Document or version not found."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The supplied expectedRowVersion is stale; re-fetch the document and retry."
          }
        },
        "summary": "Rollback document to version",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/family/wards": {
      "get": {
        "description": "Returns every ward the authenticated guardian manages, with its supervised→adult lifecycle status, graduation date and per-guardian roles. Scoped strictly to the caller.",
        "operationId": "GetGuardianWards",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WardSummaryDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The caller's ward roster (an empty list when they manage none)."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not authenticated."
          }
        },
        "summary": "List the caller's wards",
        "tags": [
          "FamilyWards"
        ]
      }
    },
    "/api/v1/family/wards/{childId}/accept-ownership": {
      "post": {
        "description": "The now-adult records their client-side UMK re-wrap, revoking any residual guardian access and confirming sole key-custody.",
        "operationId": "AcceptWardVaultOwnership",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "keyCustodyReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AcceptWardOwnershipRequestDto"
              }
            },
            "application/json": {
              "example": {
                "keyCustodyReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AcceptWardOwnershipRequestDto"
              }
            },
            "text/json": {
              "example": {
                "keyCustodyReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AcceptWardOwnershipRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "adultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "keyCustodyReference": "string",
                  "ownershipAcceptedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "residualGuardianViewsRevoked": 0,
                  "soleKeyCustodyConfirmed": false,
                  "transitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "verificationCode": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/WardOwnershipAcceptedDto"
                }
              }
            },
            "description": "Ownership accepted; sole key-custody confirmed."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation (e.g. missing key-custody reference)."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not the young adult the vault was rebound to."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No completed majority handover exists for this ward."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Ownership was already accepted with a different key-custody reference (write-once)."
          }
        },
        "summary": "Accept ward vault ownership (UMK re-wrap)",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/family/wards/{childId}/handover-certificate": {
      "get": {
        "description": "Majority date, jurisdiction, revocation timestamp, records transferred, sole-key-custody and a verifiable code.",
        "operationId": "GetWardHandoverCertificate",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "adultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "guardianAccessRevokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "jurisdiction": "string",
                  "majorityDate": "2026-01-01",
                  "recordsByClass": [],
                  "recordsTransferred": 0,
                  "soleKeyCustodyConfirmed": false,
                  "transitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "verificationCode": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/HandoverCertificateDto"
                }
              }
            },
            "description": "The handover certificate."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No handover has completed for this ward."
          }
        },
        "summary": "Majority handover certificate",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/family/wards/{childId}/handover-confirmation": {
      "get": {
        "description": "Guardian-access-revocation date + the full former-guardian feed proving zero guardians remain.",
        "operationId": "GetWardHandoverConfirmation",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "adultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "formerGuardians": [],
                  "jurisdiction": "string",
                  "remainingGuardianCount": 0,
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "transitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/HandoverConfirmationDto"
                }
              }
            },
            "description": "The handover confirmation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No handover has completed for this ward."
          }
        },
        "summary": "Verified-majority handover confirmation",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/family/wards/{childId}/residual-visibility": {
      "get": {
        "description": "For each record category, whether a former guardian retains a view vs it is private to the young adult.",
        "operationId": "GetWardResidualVisibility",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "categories": [],
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/ResidualVisibilityDto"
                }
              }
            },
            "description": "The residual-visibility projection."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No handover has completed for this ward."
          }
        },
        "summary": "Per-category residual-guardian visibility",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/family/wards/{childId}/revocation-proof": {
      "get": {
        "description": "Ownership rebound + every guardian's access ended, with the transition reference the audit chain anchors.",
        "operationId": "GetWardRevocationProof",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "adultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "guardianAccessRevokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "ownershipReboundAt": "2026-01-01T00:00:00.0000000+00:00",
                  "revokedGuardians": [],
                  "transitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "verificationCode": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/RevocationProofDto"
                }
              }
            },
            "description": "The revocation proof."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No handover has completed for this ward."
          }
        },
        "summary": "Verified-majority revocation proof",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/family/wards/{childId}/transition-prep": {
      "get": {
        "description": "Live content groups (categories + counts) for the ward vault plus whether the handover has completed.",
        "operationId": "GetWardTransitionPrep",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentGroups": [],
                  "handoverCompleted": false,
                  "totalDocuments": 0,
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/TransitionPrepDto"
                }
              }
            },
            "description": "The content-group summary."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The ward owns no vault."
          }
        },
        "summary": "Ward vault content-group summary",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/field-shares/organization-consent-ledger": {
      "get": {
        "description": "Per counterparty: distinct fields held, live consents, and the soonest expiry — plus the register rollup. Metadata only.",
        "operationId": "GetOrganizationConsentLedger",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "counterparties": [],
                  "counterpartyOrganizations": []
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationConsentLedger"
                }
              }
            },
            "description": "Ledger retrieved."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Organisation consent ledger by counterparty",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/field-shares/{id}": {
      "delete": {
        "description": "Revokes a field share, preventing further access by the recipient.",
        "operationId": "RevokeFieldShare",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Field share revoked successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not the sharer."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Field share not found."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Field share is already in a terminal state (revoked or expired)."
          }
        },
        "summary": "Revoke a field share",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/field-shares/{id}/resolve": {
      "post": {
        "description": "FR-02.038: the original sharer resolves a recipient-key-unavailable pending share by submitting the field key wrapped with the recipient's now-registered key. The share becomes Active.",
        "operationId": "ResolvePendingFieldShare",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "fieldShareId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "wrappedFieldKeyBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ResolvePendingFieldShareCommand"
              }
            },
            "application/json": {
              "example": {
                "fieldShareId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "wrappedFieldKeyBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ResolvePendingFieldShareCommand"
              }
            },
            "text/json": {
              "example": {
                "fieldShareId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "requestingUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "wrappedFieldKeyBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ResolvePendingFieldShareCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "accessLevel": "string",
                  "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "crossing": "string",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "fieldId": "string",
                  "grantedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "pendingResolutionDeadline": "2026-01-01T00:00:00.0000000+00:00",
                  "recipientDisplayName": "string",
                  "recipientHomeRegion": "string",
                  "recipientOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "recipientType": "string",
                  "recipientUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string",
                  "suspensionGraceWindowEndsAt": "2026-01-01T00:00:00.0000000+00:00",
                  "vaultHomeRegion": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/FieldShareDto"
                }
              }
            },
            "description": "Pending field share resolved to active."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not the sharer."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Field share not found."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Field share is not pending or has timed out."
          }
        },
        "summary": "Resolve a pending field share",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/field-shares/{id}/restore": {
      "post": {
        "description": "Re-activates a suspended (Paused) field share. Returns 400 once the grace window has closed and the share has been permanently revoked.",
        "operationId": "RestoreFieldShare",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "accessLevel": "string",
                  "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "crossing": "string",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "fieldId": "string",
                  "grantedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "pendingResolutionDeadline": "2026-01-01T00:00:00.0000000+00:00",
                  "recipientDisplayName": "string",
                  "recipientHomeRegion": "string",
                  "recipientOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "recipientType": "string",
                  "recipientUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string",
                  "suspensionGraceWindowEndsAt": "2026-01-01T00:00:00.0000000+00:00",
                  "vaultHomeRegion": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/FieldShareDto"
                }
              }
            },
            "description": "Field share restored."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The share is not suspended (never suspended, or its grace window has closed)."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not the sharer."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Field share not found."
          }
        },
        "summary": "Restore a suspended field share",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/field-shares/{id}/suspend": {
      "post": {
        "description": "Pauses a live field share so the recipient loses access, retaining the wrapped key so the same share can be restored. An optional graceWindowDays makes the suspension lapse to a permanent revocation.",
        "operationId": "SuspendFieldShare",
        "parameters": [
          {
            "description": "The field share to suspend.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "graceWindowDays": 0
              },
              "schema": {
                "$ref": "#/components/schemas/SuspendFieldShareRequestDto"
              }
            },
            "application/json": {
              "example": {
                "graceWindowDays": 0
              },
              "schema": {
                "$ref": "#/components/schemas/SuspendFieldShareRequestDto"
              }
            },
            "text/json": {
              "example": {
                "graceWindowDays": 0
              },
              "schema": {
                "$ref": "#/components/schemas/SuspendFieldShareRequestDto"
              }
            }
          },
          "description": "Optional grace window; omit the body for an indefinite suspension."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "accessLevel": "string",
                  "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "crossing": "string",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "fieldId": "string",
                  "grantedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "pendingResolutionDeadline": "2026-01-01T00:00:00.0000000+00:00",
                  "recipientDisplayName": "string",
                  "recipientHomeRegion": "string",
                  "recipientOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "recipientType": "string",
                  "recipientUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string",
                  "suspensionGraceWindowEndsAt": "2026-01-01T00:00:00.0000000+00:00",
                  "vaultHomeRegion": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/FieldShareDto"
                }
              }
            },
            "description": "Field share suspended."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request, or the share is not Active."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not the sharer."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Field share not found."
          }
        },
        "summary": "Suspend a field share (reversible hide)",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/field-subscriptions": {
      "get": {
        "description": "Retrieves field subscriptions matching the provided filters. Supply documentId + fieldId to list all subscribers for a specific field, documentId alone for all active subscriptions on a document, or subscriberId for all subscriptions held by a specific subscriber. The subscriber-filtered listing is paged (pageNumber/pageSize; pageSize capped server-side at 100).",
        "operationId": "GetFieldSubscriptions",
        "parameters": [
          {
            "in": "query",
            "name": "documentId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "fieldId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "subscriberId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FieldSubscriptionDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Field subscriptions retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "List field subscriptions",
        "tags": [
          "Field Subscriptions"
        ]
      },
      "post": {
        "description": "Creates a subscription that delivers synced updates to the subscriber whenever the specified field changes. SyncType controls delivery: Unlimited (always), DateBounded (within a date range), CountLimited (up to MaxSyncs deliveries), or PerSyncConsent (each sync requires explicit approval).",
        "operationId": "CreateFieldSubscription",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "fieldId": "string",
                "maxSyncs": 0,
                "subscriberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "subscriberType": "string",
                "syncType": "string",
                "validFrom": "2026-01-01T00:00:00.0000000+00:00",
                "validTo": "2026-01-01T00:00:00.0000000+00:00"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateFieldSubscriptionCommand"
              }
            },
            "application/json": {
              "example": {
                "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "fieldId": "string",
                "maxSyncs": 0,
                "subscriberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "subscriberType": "string",
                "syncType": "string",
                "validFrom": "2026-01-01T00:00:00.0000000+00:00",
                "validTo": "2026-01-01T00:00:00.0000000+00:00"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateFieldSubscriptionCommand"
              }
            },
            "text/json": {
              "example": {
                "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "fieldId": "string",
                "maxSyncs": 0,
                "subscriberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "subscriberType": "string",
                "syncType": "string",
                "validFrom": "2026-01-01T00:00:00.0000000+00:00",
                "validTo": "2026-01-01T00:00:00.0000000+00:00"
              },
              "schema": {
                "$ref": "#/components/schemas/CreateFieldSubscriptionCommand"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "consentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "fieldId": "string",
                  "maxSyncs": 0,
                  "remainingSyncs": 0,
                  "status": "string",
                  "subscriberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "subscriberType": "string",
                  "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "syncType": "string",
                  "syncsUsed": 0,
                  "validFrom": "2026-01-01T00:00:00.0000000+00:00",
                  "validTo": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/FieldSubscriptionDto"
                }
              }
            },
            "description": "Field subscription created successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The referenced document was not found."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "An active subscription already exists for this field/subscriber combination."
          }
        },
        "summary": "Create a field subscription",
        "tags": [
          "Field Subscriptions"
        ]
      }
    },
    "/api/v1/field-subscriptions/sync": {
      "post": {
        "description": "Invoked by the field owner's client AFTER the changed field's encrypted value has been written (FR-02.032 ordering). Delivers the supplied per-subscriber re-encrypted envelope to every deliverable subscriber, records the sync against each subscription's allowance/lifecycle, and writes the Rule 29 subscriber-access audit record. Paused, out-of-window, per-sync-consent-denied and envelope-less subscriptions are suppressed. Zero-knowledge: wrapped keys and the value hash are opaque.",
        "operationId": "SyncSubscribedField",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "fieldId": "string",
                "newValueHash": "string",
                "subscriberEnvelopes": []
              },
              "schema": {
                "$ref": "#/components/schemas/SyncSubscribedFieldRequestDto"
              }
            },
            "application/json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "fieldId": "string",
                "newValueHash": "string",
                "subscriberEnvelopes": []
              },
              "schema": {
                "$ref": "#/components/schemas/SyncSubscribedFieldRequestDto"
              }
            },
            "text/json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "fieldId": "string",
                "newValueHash": "string",
                "subscriberEnvelopes": []
              },
              "schema": {
                "$ref": "#/components/schemas/SyncSubscribedFieldRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "deliveredCount": 0,
                  "deliveredSubscriptionIds": [],
                  "exhaustedCount": 0,
                  "heldCount": 0,
                  "suppressedCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionSyncResult"
                }
              }
            },
            "description": "Fan-out complete; returns delivered/suppressed/exhausted counts."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not the vault owner of the document."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The referenced document was not found."
          }
        },
        "summary": "Sync a changed field to its subscribers",
        "tags": [
          "Field Subscriptions"
        ]
      }
    },
    "/api/v1/field-subscriptions/{id}": {
      "delete": {
        "description": "Cancels a field subscription, stopping future synced updates from being delivered.",
        "operationId": "CancelFieldSubscription",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Field subscription cancelled successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not the subscriber."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Field subscription not found."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The subscription is already cancelled, expired, or exhausted."
          }
        },
        "summary": "Cancel a field subscription",
        "tags": [
          "Field Subscriptions"
        ]
      }
    },
    "/api/v1/held-subjects": {
      "get": {
        "operationId": "ListHeldSubjects",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/HeldSubjectDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The animals the caller holds, by name."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "List the animals you hold",
        "tags": [
          "Held-Subjects"
        ]
      },
      "post": {
        "operationId": "RegisterHeldSubject",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "kind": "string",
                "name": "string",
                "species": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterHeldSubjectRequest"
              }
            },
            "application/json": {
              "example": {
                "kind": "string",
                "name": "string",
                "species": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterHeldSubjectRequest"
              }
            },
            "text/json": {
              "example": {
                "kind": "string",
                "name": "string",
                "species": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterHeldSubjectRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "acquiredByKeeperChangeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "heldSince": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "kind": "string",
                  "name": "string",
                  "species": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/HeldSubjectDto"
                }
              }
            },
            "description": "The animal, with its server-minted id."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Missing name, unknown kind, or a value too long."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Register an animal you hold",
        "tags": [
          "Held-Subjects"
        ]
      }
    },
    "/api/v1/held-subjects/{id}": {
      "get": {
        "operationId": "GetHeldSubject",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "acquiredByKeeperChangeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "heldSince": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "kind": "string",
                  "name": "string",
                  "species": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/HeldSubjectDto"
                }
              }
            },
            "description": "The animal."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No animal with that id is held by the caller."
          }
        },
        "summary": "Get an animal you hold",
        "tags": [
          "Held-Subjects"
        ]
      }
    },
    "/api/v1/household/address-book/containers": {
      "post": {
        "description": "Opens the co-owned, client-encrypted container the shared address book anchors to. Idempotent per household.",
        "operationId": "ProvisionHouseholdContainer",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionHouseholdContainerRequestDto"
              }
            },
            "application/json": {
              "example": {
                "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionHouseholdContainerRequestDto"
              }
            },
            "text/json": {
              "example": {
                "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionHouseholdContainerRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "activeContactCount": 0,
                  "containerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/HouseholdContactVaultContainerDto"
                }
              }
            },
            "description": "Container provisioned."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not a participant of the existing container."
          },
          "503": {
            "description": "Entitlement/quota authority unavailable (fail-closed)."
          }
        },
        "summary": "Provision a household contact-vault container",
        "tags": [
          "Household Contact Vault"
        ]
      }
    },
    "/api/v1/household/address-book/{householdId}/contacts": {
      "get": {
        "operationId": "ListHouseholdContacts",
        "parameters": [
          {
            "in": "path",
            "name": "householdId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/HouseholdContactVaultEntryDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The pooled contacts."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not a participant of this container."
          }
        },
        "summary": "List pooled household contacts",
        "tags": [
          "Household Contact Vault"
        ]
      },
      "post": {
        "description": "Stores a per-contributor AES-256-GCM ciphertext envelope in the household container. Zero-knowledge — sealed on the contributor's device.",
        "operationId": "PoolHouseholdContact",
        "parameters": [
          {
            "in": "path",
            "name": "householdId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "authenticationTag": "string",
                "ciphertext": "string",
                "contactRef": "string",
                "initializationVector": "string",
                "keyId": "string",
                "poolMode": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/PoolHouseholdContactRequestDto"
              }
            },
            "application/json": {
              "example": {
                "authenticationTag": "string",
                "ciphertext": "string",
                "contactRef": "string",
                "initializationVector": "string",
                "keyId": "string",
                "poolMode": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/PoolHouseholdContactRequestDto"
              }
            },
            "text/json": {
              "example": {
                "authenticationTag": "string",
                "ciphertext": "string",
                "contactRef": "string",
                "initializationVector": "string",
                "keyId": "string",
                "poolMode": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/PoolHouseholdContactRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "addedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "authenticationTag": "string",
                  "ciphertext": "string",
                  "contactRef": "string",
                  "containerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contributorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "entryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "initializationVector": "string",
                  "keyId": "string",
                  "poolMode": "string",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/HouseholdContactVaultEntryDto"
                }
              }
            },
            "description": "Contact pooled."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not a participant of this container."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No container exists for this household yet."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The container is closed."
          },
          "503": {
            "description": "Entitlement/quota authority unavailable (fail-closed)."
          }
        },
        "summary": "Pool a contact into the shared household book",
        "tags": [
          "Household Contact Vault"
        ]
      }
    },
    "/api/v1/household/address-book/{householdId}/container": {
      "get": {
        "operationId": "GetHouseholdContainer",
        "parameters": [
          {
            "in": "path",
            "name": "householdId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "activeContactCount": 0,
                  "containerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/HouseholdContactVaultContainerDto"
                }
              }
            },
            "description": "The container."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not a participant of this container."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No container exists for this household yet."
          }
        },
        "summary": "Get a household contact-vault container",
        "tags": [
          "Household Contact Vault"
        ]
      }
    },
    "/api/v1/keeper-changes": {
      "get": {
        "description": "The new keeper had no way to find out they had been asked: nothing consumed the\r\ninitiation event, so no notification was raised, and the acceptance surface was\r\nreachable only from a link. A handover whose email was lost or filtered was therefore\r\nundiscoverable forever, while the sender polled \"pending acceptance\" indefinitely.\r\nEmail-invited handovers are deliberately excluded — those are decided through the\r\ntoken that proves control of the invited address, never through a session.",
        "operationId": "GetKeeperChangeStanding",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "awaitingMyDecision": [],
                  "sent": []
                },
                "schema": {
                  "$ref": "#/components/schemas/KeeperChangeStandingDto"
                }
              }
            },
            "description": "The caller's rehoming standing."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "My rehoming standing (sent + awaiting my decision)",
        "tags": [
          "Keeper-Change"
        ]
      },
      "post": {
        "description": "Creates a pending-acceptance handover of the subject's record sets to a new keeper.",
        "operationId": "InitiateKeeperChange",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "newKeeperHandle": "string",
                "newKeeperName": "string",
                "passingRecordSetIds": [],
                "recipientKind": "string",
                "recordSets": [],
                "retention": "string",
                "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "subjectName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/InitiateKeeperChangeRequest"
              }
            },
            "application/json": {
              "example": {
                "newKeeperHandle": "string",
                "newKeeperName": "string",
                "passingRecordSetIds": [],
                "recipientKind": "string",
                "recordSets": [],
                "retention": "string",
                "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "subjectName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/InitiateKeeperChangeRequest"
              }
            },
            "text/json": {
              "example": {
                "newKeeperHandle": "string",
                "newKeeperName": "string",
                "passingRecordSetIds": [],
                "recipientKind": "string",
                "recordSets": [],
                "retention": "string",
                "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "subjectName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/InitiateKeeperChangeRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "inviteVerified": false,
                  "newKeeperName": "string",
                  "priorKeeperName": "string",
                  "recipientKind": "string",
                  "status": "string",
                  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "subjectName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/KeeperChangeDto"
                }
              }
            },
            "description": "Keeper change created (pending the new keeper's acceptance)."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request (missing subject, new keeper handle, or record sets)."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Initiate a keeper change",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/keeper-changes/inbox": {
      "get": {
        "operationId": "GetKeeperChangeInbox",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/KeeperChangeDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Handovers awaiting the caller's decision."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "List handovers awaiting my decision",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/keeper-changes/policy": {
      "get": {
        "description": "Static per deployment and carries no user data, so it is cacheable and needs no\r\nresource authorization beyond being signed in. It exists so the figures a keeper is\r\nshown BEFORE they authorise are the same ones the aggregate binds AFTER they do.",
        "operationId": "GetKeeperChangePolicy",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "recommendedSetIds": [],
                  "recordSets": [],
                  "retention": "string",
                  "retentionReviewMonths": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/KeeperChangePolicyDto"
                }
              }
            },
            "description": "The handover policy."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Get the keeper-change handover policy",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/keeper-changes/{id}": {
      "get": {
        "operationId": "GetKeeperChange",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "inviteVerified": false,
                  "newKeeperName": "string",
                  "priorKeeperName": "string",
                  "recipientKind": "string",
                  "status": "string",
                  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "subjectName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/KeeperChangeDto"
                }
              }
            },
            "description": "The keeper change."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No keeper change with that id is visible to the caller."
          }
        },
        "summary": "Get a keeper change",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/keeper-changes/{id}/accept": {
      "post": {
        "operationId": "AcceptKeeperChange",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "inviteVerified": false,
                  "newKeeperName": "string",
                  "priorKeeperName": "string",
                  "recipientKind": "string",
                  "status": "string",
                  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "subjectName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/KeeperChangeDto"
                }
              }
            },
            "description": "The accepted keeper change."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The prior keeper cannot accept their own handover, or it is an email invite."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No keeper change with that id."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The handover has already been accepted, declined or cancelled."
          }
        },
        "summary": "Accept a keeper change",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/keeper-changes/{id}/decline": {
      "post": {
        "operationId": "DeclineKeeperChange",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "inviteVerified": false,
                  "newKeeperName": "string",
                  "priorKeeperName": "string",
                  "recipientKind": "string",
                  "status": "string",
                  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "subjectName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/KeeperChangeDto"
                }
              }
            },
            "description": "The declined keeper change."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The prior keeper cannot decline their own handover, or it is an email invite."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No keeper change with that id."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The handover has already been accepted, declined or cancelled."
          }
        },
        "summary": "Decline a keeper change",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/keeper-changes/{id}/invite/accept": {
      "post": {
        "operationId": "AcceptKeeperChangeByInvite",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "email": "string",
                "inviteToken": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/KeeperChangeInviteRequest"
              }
            },
            "application/json": {
              "example": {
                "email": "string",
                "inviteToken": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/KeeperChangeInviteRequest"
              }
            },
            "text/json": {
              "example": {
                "email": "string",
                "inviteToken": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/KeeperChangeInviteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "inviteVerified": false,
                  "newKeeperName": "string",
                  "priorKeeperName": "string",
                  "recipientKind": "string",
                  "status": "string",
                  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "subjectName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/KeeperChangeDto"
                }
              }
            },
            "description": "The accepted keeper change."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The invite did not verify (uniform response)."
          }
        },
        "summary": "Accept a keeper change from an emailed invite",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/keeper-changes/{id}/invite/decline": {
      "post": {
        "operationId": "DeclineKeeperChangeByInvite",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "email": "string",
                "inviteToken": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/KeeperChangeInviteRequest"
              }
            },
            "application/json": {
              "example": {
                "email": "string",
                "inviteToken": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/KeeperChangeInviteRequest"
              }
            },
            "text/json": {
              "example": {
                "email": "string",
                "inviteToken": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/KeeperChangeInviteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "inviteVerified": false,
                  "newKeeperName": "string",
                  "priorKeeperName": "string",
                  "recipientKind": "string",
                  "status": "string",
                  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "subjectName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/KeeperChangeDto"
                }
              }
            },
            "description": "The declined keeper change."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The invite did not verify (uniform response)."
          }
        },
        "summary": "Decline a keeper change from an emailed invite",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/keeper-changes/{id}/invite/verify": {
      "post": {
        "description": "Proves control of the invited address before the handover is described. Answers a uniform 404 for an unknown handover, a wrong token, a wrong address or an expired invite.",
        "operationId": "VerifyKeeperChangeInvite",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "email": "string",
                "inviteToken": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/KeeperChangeInviteRequest"
              }
            },
            "application/json": {
              "example": {
                "email": "string",
                "inviteToken": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/KeeperChangeInviteRequest"
              }
            },
            "text/json": {
              "example": {
                "email": "string",
                "inviteToken": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/KeeperChangeInviteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "inviteVerified": false,
                  "newKeeperName": "string",
                  "priorKeeperName": "string",
                  "recipientKind": "string",
                  "status": "string",
                  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "subjectName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/KeeperChangeDto"
                }
              }
            },
            "description": "The invite verified; the keeper change is returned."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The invite did not verify (uniform response — reason is never disclosed)."
          }
        },
        "summary": "Verify an emailed keeper-change invite",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/keeper-changes/{id}/receipt": {
      "get": {
        "operationId": "GetKeeperChangeReceipt",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "forwardResponsibilityFrom": "2026-01-01",
                  "liabilityEndsOn": "2026-01-01",
                  "newKeeperName": "string",
                  "priorKeeperName": "string",
                  "subjectName": "string",
                  "transferredOn": "2026-01-01",
                  "verdict": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/HandoverReceiptDto"
                }
              }
            },
            "description": "The handover receipt."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No accepted keeper change with that id is visible to the caller."
          }
        },
        "summary": "Get the handover receipt",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/keeper-changes/{id}/withdraw": {
      "post": {
        "operationId": "WithdrawKeeperChange",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "inviteVerified": false,
                  "newKeeperName": "string",
                  "priorKeeperName": "string",
                  "recipientKind": "string",
                  "status": "string",
                  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "subjectName": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/KeeperChangeDto"
                }
              }
            },
            "description": "The withdrawn keeper change."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No pending keeper change with that id belongs to the caller."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The handover has already been decided and can no longer be withdrawn."
          }
        },
        "summary": "Withdraw a pending keeper change",
        "tags": [
          "Keeper-Change"
        ]
      }
    },
    "/api/v1/organizations/grant-certificates": {
      "post": {
        "description": "\n\r\n  <b>[Authorize], not anonymous</b> — and the distinction from the enrolment endpoint matters.\r\n            There, the caller is a machine with no credential and the code is the proof. Here the caller\r\n            is a PERSON who has already signed in to their own organisation's instance, and the\r\n            certificate says which person Essence authorised. Both must hold: a valid certificate\r\n            presented by somebody else must not make THEM the founder, which is checked in the handler\r\n            against the authenticated subject.\r\n            \r\n\n\r\n            Rate-limited: the certificate is a bearer artifact and this endpoint decides who founds an\r\n            organisation.\r\n            ",
        "operationId": "OrganizationGrantCertificate_Redeem",
        "parameters": [
          {
            "in": "header",
            "name": "X-Api-Version",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "certificate": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RedeemGrantCertificateRequest"
              }
            },
            "application/json": {
              "example": {
                "certificate": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RedeemGrantCertificateRequest"
              }
            },
            "text/json": {
              "example": {
                "certificate": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RedeemGrantCertificateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/RedeemGrantCertificateResponse"
                }
              }
            },
            "description": "The grant is written. The claimant may now provision the keypair."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The certificate did not verify, or does not name the caller."
          }
        },
        "summary": "Redeems a grant certificate, writing the founder grant on this instance.",
        "tags": [
          "OrganizationGrantCertificate"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/sensitivity-label-downgrades": {
      "get": {
        "description": "Status only, for every record alike: the record, the member's vault, this sponsor's own item id, both labels\r\nand when the member asked. Nothing that says what the record is, so a `sensitive` record's queue entry\r\ndiscloses no more than its label.",
        "operationId": "ListSensitivityLabelDowngrades",
        "parameters": [
          {
            "description": "The sponsor organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "items": [],
                  "limit": 0,
                  "truncated": false
                },
                "schema": {
                  "$ref": "#/components/schemas/SensitivityLabelDowngradeQueueDto"
                }
              }
            },
            "description": "The waiting requests (possibly none); `truncated` when more wait than were returned."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer the organisation."
          }
        },
        "summary": "The sponsor's reviewer queue (EPIC 92 FR-OBP.076, #21163): the records this organisation loaded whose members\r\nasked for a lower sensitivity label, waiting for a reviewer here. Oldest request first.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/sensitivity-label-downgrades/{documentId}/approve": {
      "post": {
        "operationId": "ApproveSensitivityLabelDowngrade",
        "parameters": [
          {
            "description": "The sponsor organisation (must be the caller's, and must have loaded the record).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The record.",
            "in": "path",
            "name": "documentId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "decidedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "decidedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "decision": "string",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "fromLabel": "string",
                  "requestedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "requestedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requestedLabel": "string",
                  "sensitivityLabel": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/SensitivityLabelDowngradeDecisionDto"
                }
              }
            },
            "description": "Approved: the record now carries the lower label."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer the organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such record, or this organisation did not load it."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Nothing is waiting (`sensitivity-label-downgrade-not-pending`), or the caller is the member who asked (`sensitivity-label-downgrade-self-review`)."
          }
        },
        "summary": "A reviewer of the sponsor approves a member's request to lower the sensitivity label of a record this\r\norganisation loaded (EPIC 92 FR-OBP.076, #21163): the lower label applies, and the record keeps who asked\r\nand who approved, with the times.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/sensitivity-label-downgrades/{documentId}/reject": {
      "post": {
        "operationId": "RejectSensitivityLabelDowngrade",
        "parameters": [
          {
            "description": "The sponsor organisation (must be the caller's, and must have loaded the record).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The record.",
            "in": "path",
            "name": "documentId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "decidedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "decidedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "decision": "string",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "fromLabel": "string",
                  "requestedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "requestedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "requestedLabel": "string",
                  "sensitivityLabel": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/SensitivityLabelDowngradeDecisionDto"
                }
              }
            },
            "description": "Rejected: the record keeps its label."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer the organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such record, or this organisation did not load it."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Nothing is waiting, or the caller is the member who asked."
          }
        },
        "summary": "A reviewer of the sponsor rejects a member's request to lower the sensitivity label of a record this\r\norganisation loaded (EPIC 92 FR-OBP.076, #21163): the record keeps its label, and the request stays on it with\r\nthe reviewer and the time.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/custodial-key": {
      "put": {
        "description": "Several sponsors may hold custody of one member's vault. Each registers a key that no other sponsor's\r\ncustody names and that is not the member's own, so no sponsor's custody opens another sponsor's records.\r\nOnly the key id is kept. A retry with the same key is idempotent.",
        "operationId": "RegisterCustodialKey",
        "parameters": [
          {
            "description": "The custodian organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterCustodialKeyRequestDto"
              }
            },
            "application/json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterCustodialKeyRequestDto"
              }
            },
            "text/json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterCustodialKeyRequestDto"
              }
            }
          },
          "description": "The custodial public key."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "custodialKeyId": "string",
                  "programmeMemberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodialKeyDto"
                }
              }
            },
            "description": "Registered, or this exact key was already registered."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer an organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the organisation is not its custodian."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Custody is no longer held, a different key is registered, or the key is not this sponsor's alone."
          }
        },
        "summary": "The custodian organisation registers its own custodial key for the member's vault: the key every record\r\nit loads for that member is sealed to while it holds custody (FR-OBP.088).",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/custody-destruction": {
      "post": {
        "operationId": "ConfirmCustodyDestruction",
        "parameters": [
          {
            "description": "The custodian organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "evidenceDigest": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ConfirmCustodyDestructionRequestDto"
              }
            },
            "application/json": {
              "example": {
                "evidenceDigest": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ConfirmCustodyDestructionRequestDto"
              }
            },
            "text/json": {
              "example": {
                "evidenceDigest": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ConfirmCustodyDestructionRequestDto"
              }
            }
          },
          "description": "The SHA-256 of the destruction attestation."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "evidenceDigest": "string",
                  "handedOverAt": "2026-01-01T00:00:00.0000000+00:00",
                  "programmeMemberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "securedDocumentCount": 0,
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodyHandedOverDto"
                }
              }
            },
            "description": "Custody ended; or this exact confirmation was already recorded."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The digest is not 64 hexadecimal characters."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer an organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the organisation is not its custodian."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The member has not taken ownership, a record is not yet secured, or custody already ended with different evidence."
          }
        },
        "summary": "The custodian organisation records that it destroyed its custody of the member's vault, which ends\r\ncustody. Refused until every record is measured secured to the member's own account.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/custody-key-deposits": {
      "put": {
        "description": "Accepted only while custody is pending hand-over, only for this custody's custodial or sensitive-role key, and only\r\nsealed to the member organisation's currently published key. Essence stores the envelope and cannot open it. A\r\nretry with the same envelope changes nothing; a new one replaces it. Withdrawn when custody ends.",
        "operationId": "DepositCustodialKey",
        "parameters": [
          {
            "description": "The custodian organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "custodyKeyId": "string",
                "sealedKey": "string",
                "sealedToKeyId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/DepositCustodialKeyRequestDto"
              }
            },
            "application/json": {
              "example": {
                "custodyKeyId": "string",
                "sealedKey": "string",
                "sealedToKeyId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/DepositCustodialKeyRequestDto"
              }
            },
            "text/json": {
              "example": {
                "custodyKeyId": "string",
                "sealedKey": "string",
                "sealedToKeyId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/DepositCustodialKeyRequestDto"
              }
            }
          },
          "description": "The custody key id, the member key id it is sealed to, and the envelope."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "custodyKeyId": "string",
                  "depositedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "sealedToKeyId": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodialKeyDepositDto"
                }
              }
            },
            "description": "Delivered, or this exact envelope already stood."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer an organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the organisation is not its custodian."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Custody is not pending hand-over, or the member has not published its own key yet."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The key is not this custody's, the envelope is not sealed to the member's current key, or it is not a well-formed envelope."
          }
        },
        "summary": "The custodian organisation delivers one of its custody keys for the member's vault, sealed in its processing zone\r\nto the member organisation's own published key.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/delivered-custodial-key": {
      "put": {
        "operationId": "DeliverSponsorCustodialKey",
        "parameters": [
          {
            "description": "The sponsor organisation, as the zone's enrolment names it.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterCustodialKeyRequestDto"
              }
            },
            "application/json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterCustodialKeyRequestDto"
              }
            },
            "text/json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterCustodialKeyRequestDto"
              }
            }
          },
          "description": "The sponsor's custodial public key for this member."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "custodialKeyId": "string",
                  "programmeMemberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodialKeyDto"
                }
              }
            },
            "description": "Registered, or this exact key was already registered."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the sponsor is not its custodian."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Custody is no longer held, a different key is registered, or the key is not this sponsor's alone."
          }
        },
        "summary": "Register a sponsor's custodial key from its processing zone",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/delivered-records": {
      "post": {
        "operationId": "DeliverSponsorRecord",
        "parameters": [
          {
            "description": "The sponsor organisation whose ingestion delivers the record.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "encryptedContent": "string",
                "fileName": "string",
                "keyId": "string",
                "mimeType": "string",
                "sensitivityLabel": "string",
                "sourceItemId": "string",
                "supersedesSourceItemIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/ImportCustodialRecordRequestDto"
              }
            },
            "application/json": {
              "example": {
                "encryptedContent": "string",
                "fileName": "string",
                "keyId": "string",
                "mimeType": "string",
                "sensitivityLabel": "string",
                "sourceItemId": "string",
                "supersedesSourceItemIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/ImportCustodialRecordRequestDto"
              }
            },
            "text/json": {
              "example": {
                "encryptedContent": "string",
                "fileName": "string",
                "keyId": "string",
                "mimeType": "string",
                "sensitivityLabel": "string",
                "sourceItemId": "string",
                "supersedesSourceItemIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/ImportCustodialRecordRequestDto"
              }
            }
          },
          "description": "The sealed record."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "created": false,
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodialRecordImportResultDto"
                }
              }
            },
            "description": "This sponsor already delivered the item; nothing stored or charged."
          },
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "created": false,
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodialRecordImportResultDto"
                }
              }
            },
            "description": "Stored as a new document."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the sponsor neither holds custody of it nor has a programme member established into it."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Custody is no longer held, no custodial key is registered yet, the member's objection was purged, the member organisation publishes no key, or the item was delivered into another vault. Once the member has cut over (FR-OBP.078), the problem `type` is `…/problems/sponsor-record-member-migrated`: its legacy record is frozen."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The record is not sealed to the key the sponsor must seal to, or is not a well-formed envelope."
          }
        },
        "summary": "Deliver one sponsor-sealed record into a member's vault",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/delivered-records/withdrawals": {
      "post": {
        "description": "The sponsor's ingestion calls this when a newer version of a source document it delivered here was placed with a\r\ndifferent member: the copy here no longer belongs to this member. It is recorded withdrawn with the reason and\r\narchived, never deleted. Only this sponsor's own record for the item, in this vault, is reached.",
        "operationId": "WithdrawSponsorRecord",
        "parameters": [
          {
            "description": "The sponsor organisation that delivered the record.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "reasonCode": "string",
                "sourceItemId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/WithdrawSponsorRecordRequestDto"
              }
            },
            "application/json": {
              "example": {
                "reasonCode": "string",
                "sourceItemId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/WithdrawSponsorRecordRequestDto"
              }
            },
            "text/json": {
              "example": {
                "reasonCode": "string",
                "sourceItemId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/WithdrawSponsorRecordRequestDto"
              }
            }
          },
          "description": "The item and the reason."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "withdrawn": false
                },
                "schema": {
                  "$ref": "#/components/schemas/SponsorRecordWithdrawalResultDto"
                }
              }
            },
            "description": "Withdrawn (now or before), or nothing to withdraw (`withdrawn: false`)."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed or the reason is not a known code."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "This sponsor delivered the item into another vault."
          }
        },
        "summary": "Withdraw one record a sponsor delivered into a member's vault",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/delivered-sealing-key": {
      "get": {
        "operationId": "DeliverSponsorSealingKey",
        "parameters": [
          {
            "description": "The sponsor organisation, as the zone's enrolment names it.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The label the record will carry (`sensitive` selects the sensitive-role key under custody).",
            "in": "query",
            "name": "sensitivityLabel",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "keyId": "string",
                  "publicKey": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SponsorSealingKeyDto"
                }
              }
            },
            "description": "The key id and public key to seal to."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the sponsor neither holds custody of it nor has a programme member established into it."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The key is not registered yet, custody is no longer held, the member's objection was purged, the member cut over, or the member organisation publishes no key."
          }
        },
        "summary": "The key a sponsor's processing zone must seal to",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/records": {
      "post": {
        "description": "The record is refused unless it is sealed to exactly this sponsor's custodial key: not the member's, not\r\nanother sponsor's. The document records which sponsor brought it and under which source item. A re-run\r\nnaming an item this sponsor already loaded stores and charges nothing and answers with the same document.\r\nThe load is metered to the sponsor (FR-OBP.099). No content or field value is accepted (AGT-006).",
        "operationId": "ImportCustodialRecord",
        "parameters": [
          {
            "description": "The custodian organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "encryptedContent": "string",
                "fileName": "string",
                "keyId": "string",
                "mimeType": "string",
                "sensitivityLabel": "string",
                "sourceItemId": "string",
                "supersedesSourceItemIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/ImportCustodialRecordRequestDto"
              }
            },
            "application/json": {
              "example": {
                "encryptedContent": "string",
                "fileName": "string",
                "keyId": "string",
                "mimeType": "string",
                "sensitivityLabel": "string",
                "sourceItemId": "string",
                "supersedesSourceItemIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/ImportCustodialRecordRequestDto"
              }
            },
            "text/json": {
              "example": {
                "encryptedContent": "string",
                "fileName": "string",
                "keyId": "string",
                "mimeType": "string",
                "sensitivityLabel": "string",
                "sourceItemId": "string",
                "supersedesSourceItemIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/ImportCustodialRecordRequestDto"
              }
            }
          },
          "description": "The sealed record."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "created": false,
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodialRecordImportResultDto"
                }
              }
            },
            "description": "This sponsor already loaded the item; nothing stored or charged."
          },
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "created": false,
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodialRecordImportResultDto"
                }
              }
            },
            "description": "Stored as a new document."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer an organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the organisation neither holds custody of it nor has a programme member established into it."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Custody is no longer held, no custodial key (or, for a `sensitive` record, no sensitive-role key) is registered yet, the member's objection was purged, the member organisation publishes no key, or the item was loaded into another vault."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The record is not sealed to the key the sponsor must seal to (its custodial key, its sensitive-role key for a `sensitive` record, or the member organisation's published key for an owned vault), or is not a well-formed envelope."
          }
        },
        "summary": "The custodian organisation loads one record into the member's custodial vault, sealed to its own registered\r\ncustodial key, naming the source item it came from (FR-OBP.088). A later sponsor whose programme member was\r\nestablished after the member organisation engaged loads into the organisation's owned vault instead, sealed\r\nto the organisation's own published key.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/sealing-key": {
      "get": {
        "description": "Resolved by the same rules `POST …/records` loads by, so a record sealed to the answer is accepted and every\r\nrefusal here is the one that load would get. The answer has one shape whichever key it is, a key id and a public\r\nkey, and is only ever derived from this organisation's own custody or membership: never another sponsor's key.",
        "operationId": "GetSponsorSealingKey",
        "parameters": [
          {
            "description": "The sponsor organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The label the record will carry (`sensitive` selects the sensitive-role key under custody).",
            "in": "query",
            "name": "sensitivityLabel",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "keyId": "string",
                  "publicKey": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SponsorSealingKeyDto"
                }
              }
            },
            "description": "The key id and public key to seal to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer an organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the organisation neither holds custody of it nor has a programme member established into it."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The key is not registered yet (`sponsor-custodial-key-not-registered` / `sponsor-sensitive-role-key-not-registered`), custody is no longer held, the member's objection was purged, the member cut over (`member-migrated`), or the member organisation publishes no key."
          }
        },
        "summary": "The key the organisation's processing zone must seal its next record for the member's vault to (FR-OBP.088,\r\n#21134): its own registered custodial key (its sensitive-role key for a `sensitive` record) while it holds\r\ncustody, or the member organisation's own published key once a later programme member of this organisation was\r\nestablished into the organisation's owned vault.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/sensitive-role-key": {
      "put": {
        "description": "The sensitive-role key is held only by the sponsor's named sensitive-role holders, so a member of sponsor staff\r\nwho holds the custodial key cannot open a sensitive record, whatever a screen shows. It must differ from this\r\ncustody's custodial key, from the member's own key and from every key another sponsor's custody names. Only the\r\nkey id is kept; the key pair and its holders stay in the sponsor's HSM. A retry with the same key is idempotent.",
        "operationId": "RegisterSensitiveRoleKey",
        "parameters": [
          {
            "description": "The custodian organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterSensitiveRoleKeyRequestDto"
              }
            },
            "application/json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterSensitiveRoleKeyRequestDto"
              }
            },
            "text/json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterSensitiveRoleKeyRequestDto"
              }
            }
          },
          "description": "The sensitive-role public key."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "programmeMemberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "sensitiveRoleKeyId": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SensitiveRoleKeyDto"
                }
              }
            },
            "description": "Registered, or this exact key was already registered."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer an organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the organisation is not its custodian."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Custody is no longer held, a different sensitive-role key is registered, the key is the custodial key, or it is not this sponsor's alone."
          }
        },
        "summary": "The custodian organisation registers its separate sensitive-role key for the member's vault: the key every\r\nrecord labelled `sensitive` it loads for that member is sealed to while it holds custody (FR-OBP.076).",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/sensitive-role-key/rotation": {
      "get": {
        "description": "Measured from the key id the Vault stored for each of this organisation's records. `remainingSourceItemIds`\r\nis the next batch of records still sealed to the retiring key, by this organisation's own item id; each drops out\r\nonce re-sealed, so asking again returns the next batch.",
        "operationId": "GetSensitiveRoleKeyRotation",
        "parameters": [
          {
            "description": "The custodian organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "At most this many remaining item ids (default 100, at most 500).",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 100,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "programmeMemberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "recordsSealedToRetiringKey": 0,
                  "remainingSourceItemIds": [],
                  "retirements": [],
                  "retiringKeyId": "string",
                  "rotatedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "sensitiveRoleKeyId": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SensitiveRoleKeyRotationDto"
                }
              }
            },
            "description": "The current and retiring keys, the records still to re-seal, and the retired keys."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer an organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the organisation is not its custodian."
          }
        },
        "summary": "How the custodian organisation's sensitive-role key rotation for the member's vault stands (FR-OBP.076, #21266).",
        "tags": [
          "CustodyHandOver"
        ]
      },
      "post": {
        "description": "The next key becomes the key every new `sensitive` record is sealed to. The current key starts retiring: it\r\nstill counts as a custody key for the hand-over and the FR-OBP.088 invariant until every record sealed to it has\r\nbeen re-sealed (`PUT …/rotation/records`) and it is retired (`POST …/rotation/retire`). The next key must\r\ndiffer from the current key, the custodial key, the member's key, every key another sponsor's custody names and\r\nevery key this custody has retired. A retry with the same next key is idempotent. Only the key id is kept.",
        "operationId": "RotateSensitiveRoleKey",
        "parameters": [
          {
            "description": "The custodian organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RotateSensitiveRoleKeyRequestDto"
              }
            },
            "application/json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RotateSensitiveRoleKeyRequestDto"
              }
            },
            "text/json": {
              "example": {
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RotateSensitiveRoleKeyRequestDto"
              }
            }
          },
          "description": "The next sensitive-role public key."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "programmeMemberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "recordsSealedToRetiringKey": 0,
                  "remainingSourceItemIds": [],
                  "retirements": [],
                  "retiringKeyId": "string",
                  "rotatedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "sensitiveRoleKeyId": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SensitiveRoleKeyRotationDto"
                }
              }
            },
            "description": "The rotation is open (now, or already with this key); how it stands."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer an organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the organisation is not its custodian."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Custody is no longer held, no sensitive-role key is registered, another rotation is open, or the key cannot be this custody's."
          }
        },
        "summary": "The custodian organisation begins replacing its sensitive-role key for the member's vault, when a named holder is\r\nrevoked or the key is compromised (FR-OBP.076, #21266).",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/sensitive-role-key/rotation/records": {
      "put": {
        "description": "The record is named by this organisation's own item id. It must be sealed now to the retiring key, the key id must\r\nname the current key, and the envelope must keep the stored ciphertext, nonce and tag: only the wrapped content\r\nkey may change. The prior envelope is kept as a restorable version. A retry for a record already\r\nre-sealed answers with `resealed: false` and changes nothing.",
        "operationId": "ResealSensitiveRecord",
        "parameters": [
          {
            "description": "The custodian organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "encryptedContent": "string",
                "keyId": "string",
                "sourceItemId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ResealSensitiveRecordRequestDto"
              }
            },
            "application/json": {
              "example": {
                "encryptedContent": "string",
                "keyId": "string",
                "sourceItemId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ResealSensitiveRecordRequestDto"
              }
            },
            "text/json": {
              "example": {
                "encryptedContent": "string",
                "keyId": "string",
                "sourceItemId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ResealSensitiveRecordRequestDto"
              }
            }
          },
          "description": "The item id, the current key id and the re-sealed envelope."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "keyId": "string",
                  "recordsSealedToRetiringKey": 0,
                  "resealed": false,
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SensitiveRecordResealedDto"
                }
              }
            },
            "description": "Re-sealed (or already re-sealed); how many records are still sealed to the retiring key."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer an organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, the organisation is not its custodian, or it loaded no such item into it."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No rotation is open."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The record is not sealed to the retiring key, the key id is not the current key, the envelope is malformed, or it changes more than the wrapped key."
          }
        },
        "summary": "The custodian organisation writes back one record it loaded, re-sealed in its processing zone from the retiring\r\nsensitive-role key to the current one (FR-OBP.076, #21266).",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/custodial-vaults/{vaultId}/sensitive-role-key/rotation/retire": {
      "post": {
        "description": "Refused while any of this organisation's records in the vault is still sealed to the retiring key. Otherwise the\r\nkey stops counting as a custody key, and its retirement is recorded: the key, its replacement, when the rotation\r\nbegan and ended, who ended it, and how many records were sealed to the replacement. A retired key can never be\r\nthis custody's sensitive-role key again.",
        "operationId": "RetireSensitiveRoleKey",
        "parameters": [
          {
            "description": "The custodian organisation (must be the caller's).",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "recordsSealedToReplacement": 0,
                  "replacedByKeyId": "string",
                  "retiredAt": "2026-01-01T00:00:00.0000000+00:00",
                  "retiredKeyId": "string",
                  "rotatedAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/SensitiveRoleKeyRetirementDto"
                }
              }
            },
            "description": "The retirement record."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not administer an organisation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, or the organisation is not its custodian."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No rotation is open, or a record is still sealed to the retiring key."
          }
        },
        "summary": "The custodian organisation retires the sensitive-role key its open rotation replaced (FR-OBP.076, #21266).",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair": {
      "post": {
        "description": "The declared 403 covers both causes deliberately indistinguishably: no founder grant\r\nauthorises the caller, and the keypair exists but the caller is not one of its key-holders.\r\nSeparating them would tell an attacker probing organisation ids which orgs are unclaimed.",
        "operationId": "OrganizationKeyPair_Provision",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "algorithm": "string",
                "founderWrappedMasterKey": "string",
                "founderWrappedPrivateKey": "string",
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionOrganizationKeyPairRequest"
              }
            },
            "application/json": {
              "example": {
                "algorithm": "string",
                "founderWrappedMasterKey": "string",
                "founderWrappedPrivateKey": "string",
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionOrganizationKeyPairRequest"
              }
            },
            "text/json": {
              "example": {
                "algorithm": "string",
                "founderWrappedMasterKey": "string",
                "founderWrappedPrivateKey": "string",
                "publicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionOrganizationKeyPairRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "activeKeyHolderCount": 0,
                  "algorithm": "string",
                  "hasMasterKey": false,
                  "masterKeyGeneration": 0,
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationKeyPairSummaryDto"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Provisions the organisation keypair from client-generated material (idempotent).",
        "tags": [
          "OrganizationKeyPair"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair/holders": {
      "get": {
        "operationId": "OrganizationKeyPair_GetKeyHolders",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "holderUserIds": [],
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationKeyHoldersDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Lists the organisation's active key-holder user ids (metadata; used by the rotation flow).",
        "tags": [
          "OrganizationKeyPair"
        ]
      },
      "post": {
        "operationId": "OrganizationKeyPair_AddKeyHolder",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "newHolderUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AddOrganizationKeyHolderRequest"
              }
            },
            "application/json": {
              "example": {
                "newHolderUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AddOrganizationKeyHolderRequest"
              }
            },
            "text/json": {
              "example": {
                "newHolderUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AddOrganizationKeyHolderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "activeKeyHolderCount": 0,
                  "algorithm": "string",
                  "hasMasterKey": false,
                  "masterKeyGeneration": 0,
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationKeyPairSummaryDto"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Adds a key-holder (the authenticated caller must be an existing active holder).",
        "tags": [
          "OrganizationKeyPair"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair/holders/me": {
      "get": {
        "operationId": "OrganizationKeyPair_GetMyEnvelope",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "holderUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string",
                  "wrappedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "wrappedMasterKey": "string",
                  "wrappedPrivateKey": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationKeyHolderEnvelopeDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Returns the calling key-holder's own wrapped copy of the org private key (read-as-org).",
        "tags": [
          "OrganizationKeyPair"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair/holders/{holderUserId}": {
      "delete": {
        "operationId": "OrganizationKeyPair_RevokeKeyHolder",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "holderUserId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "activeKeyHolderCount": 0,
                  "algorithm": "string",
                  "hasMasterKey": false,
                  "masterKeyGeneration": 0,
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationKeyPairSummaryDto"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Revokes a key-holder (refuses the last active holder — rotate first).",
        "tags": [
          "OrganizationKeyPair"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair/master-key": {
      "post": {
        "description": "The one-time backfill. The caller — an existing ACTIVE key-holder — generates the key\r\nclient-side and supplies it wrapped to every active holder's public key in this request.\r\nThe server never sees the plaintext key and cannot mint one, which is why this is a\r\nclient-initiated backfill rather than a data migration.",
        "operationId": "OrganizationKeyPair_EnrolMasterKey",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "holderEnvelopes": []
              },
              "schema": {
                "$ref": "#/components/schemas/EnrolOrganizationMasterKeyRequest"
              }
            },
            "application/json": {
              "example": {
                "holderEnvelopes": []
              },
              "schema": {
                "$ref": "#/components/schemas/EnrolOrganizationMasterKeyRequest"
              }
            },
            "text/json": {
              "example": {
                "holderEnvelopes": []
              },
              "schema": {
                "$ref": "#/components/schemas/EnrolOrganizationMasterKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "activeKeyHolderCount": 0,
                  "algorithm": "string",
                  "hasMasterKey": false,
                  "masterKeyGeneration": 0,
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationKeyPairSummaryDto"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Enrols an Organisation Master Key on an organisation provisioned before they existed (#4710).",
        "tags": [
          "OrganizationKeyPair"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair/recovery": {
      "delete": {
        "operationId": "WithdrawOrganizationRecoveryKit",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "callerIsKeyHolder": false,
                  "enroledAt": "2026-01-01T00:00:00.0000000+00:00",
                  "enroledByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "enrolled": false,
                  "lastClaimedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "lastClaimedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "masterKeyGeneration": 0,
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "scheme": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRecoveryKitStatusDto"
                }
              }
            },
            "description": "Withdrawn, or there was none."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not an active key-holder."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The organisation has no keypair."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Withdraws the recovery kit (the caller must be an active key-holder). Idempotent.",
        "tags": [
          "OrganizationKeyRecovery"
        ]
      },
      "get": {
        "operationId": "GetOrganizationRecoveryKitStatus",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "callerIsKeyHolder": false,
                  "enroledAt": "2026-01-01T00:00:00.0000000+00:00",
                  "enroledByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "enrolled": false,
                  "lastClaimedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "lastClaimedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "masterKeyGeneration": 0,
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "scheme": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRecoveryKitStatusDto"
                }
              }
            },
            "description": "The status. Enrolment and claim provenance are filled for key-holders only."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The organisation has no keypair."
          }
        },
        "summary": "Whether the organisation has a current recovery kit. Never returns key material.",
        "tags": [
          "OrganizationKeyRecovery"
        ]
      },
      "put": {
        "operationId": "EnrolOrganizationRecoveryKit",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "scheme": "string",
                "verifier": "string",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/EnrolOrganizationRecoveryKitRequest"
              }
            },
            "application/json": {
              "example": {
                "scheme": "string",
                "verifier": "string",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/EnrolOrganizationRecoveryKitRequest"
              }
            },
            "text/json": {
              "example": {
                "scheme": "string",
                "verifier": "string",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/EnrolOrganizationRecoveryKitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "callerIsKeyHolder": false,
                  "enroledAt": "2026-01-01T00:00:00.0000000+00:00",
                  "enroledByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "enrolled": false,
                  "lastClaimedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "lastClaimedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "masterKeyGeneration": 0,
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "scheme": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRecoveryKitStatusDto"
                }
              }
            },
            "description": "Enrolled. Any previous kit stops working."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "An envelope or scheme is missing, or the verifier is shorter than 32 bytes."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not an active key-holder."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The organisation has no keypair."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The keypair is not Active, or the organisation holds a master key and none was wrapped."
          }
        },
        "summary": "Enrols or replaces the recovery kit (the caller must be an active key-holder).",
        "tags": [
          "OrganizationKeyRecovery"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair/recovery/claim": {
      "post": {
        "operationId": "ClaimOrganizationKeyHolderByRecoveryKit",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "verifier": "string",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ClaimOrganizationKeyHolderByRecoveryKitRequest"
              }
            },
            "application/json": {
              "example": {
                "verifier": "string",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ClaimOrganizationKeyHolderByRecoveryKitRequest"
              }
            },
            "text/json": {
              "example": {
                "verifier": "string",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ClaimOrganizationKeyHolderByRecoveryKitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "activeKeyHolderCount": 0,
                  "algorithm": "string",
                  "hasMasterKey": false,
                  "masterKeyGeneration": 0,
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationKeyPairSummaryDto"
                }
              }
            },
            "description": "The caller is a key-holder (already was, or now is)."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The verifier or the re-wrapped envelope is missing."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The verifier does not match the organisation's kit."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The organisation has no keypair."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No current kit, the keypair is not Active, or the master-key envelope is missing."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Too Many Requests"
          }
        },
        "summary": "The caller becomes an active key-holder through the kit — no incumbent holder is needed.",
        "tags": [
          "OrganizationKeyRecovery"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair/recovery/unlock": {
      "post": {
        "operationId": "UnlockOrganizationRecoveryKit",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "verifier": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/UnlockOrganizationRecoveryKitRequest"
              }
            },
            "application/json": {
              "example": {
                "verifier": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/UnlockOrganizationRecoveryKitRequest"
              }
            },
            "text/json": {
              "example": {
                "verifier": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/UnlockOrganizationRecoveryKitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "algorithm": "string",
                  "masterKeyGeneration": 0,
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "publicKey": "string",
                  "scheme": "string",
                  "wrappedMasterKey": "string",
                  "wrappedPrivateKey": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRecoveryKitEnvelopeDto"
                }
              }
            },
            "description": "The envelopes (ciphertext only; the server cannot open them)."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The verifier is missing."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The verifier does not match the organisation's kit."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The organisation has no keypair."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The organisation has no current kit."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Too Many Requests"
          }
        },
        "summary": "Proves possession of the kit and returns its opaque envelopes, for the client to unwrap.",
        "tags": [
          "OrganizationKeyRecovery"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair/rotate": {
      "post": {
        "operationId": "OrganizationKeyPair_Rotate",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "holderEnvelopes": [],
                "newPublicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RotateOrganizationKeyPairRequest"
              }
            },
            "application/json": {
              "example": {
                "holderEnvelopes": [],
                "newPublicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RotateOrganizationKeyPairRequest"
              }
            },
            "text/json": {
              "example": {
                "holderEnvelopes": [],
                "newPublicKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RotateOrganizationKeyPairRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "activeKeyHolderCount": 0,
                  "algorithm": "string",
                  "hasMasterKey": false,
                  "masterKeyGeneration": 0,
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationKeyPairSummaryDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Rotates the org keypair (revoke-and-rotate): new keypair re-sealed to the remaining holders.",
        "tags": [
          "OrganizationKeyPair"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair/rotation/documents": {
      "get": {
        "operationId": "ListOrganizationSealedDocuments",
        "parameters": [
          {
            "description": "The organisation.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The previous page's `nextCursor`; omit for the first page.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page size (default 100, at most 200).",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 100,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "hasMore": false,
                  "items": [],
                  "nextCursor": "string",
                  "pageSize": 0,
                  "previousCursor": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSealedDocumentDtoCursorResult"
                }
              }
            },
            "description": "The page."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not an active key-holder, or the organisation has no keypair."
          }
        },
        "summary": "One keyset page of the documents sealed to the organisation's key, across ALL of its\r\norganisation vaults. Metadata only.",
        "tags": [
          "OrganizationKeyRotation"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/key-pair/rotation/documents/{documentId}/content": {
      "get": {
        "operationId": "GetOrganizationSealedDocumentContent",
        "parameters": [
          {
            "description": "The organisation.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The document.",
            "in": "path",
            "name": "documentId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "ciphertext": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "keyId": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSealedDocumentContentDto"
                }
              }
            },
            "description": "The ciphertext (Base64)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Absent, not sealed to this organisation's key, or the caller is not an active key-holder."
          }
        },
        "summary": "The stored ciphertext of one organisation-sealed document, to re-wrap.",
        "tags": [
          "OrganizationKeyRotation"
        ]
      },
      "put": {
        "operationId": "RewrapOrganizationSealedDocument",
        "parameters": [
          {
            "description": "The organisation.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The document.",
            "in": "path",
            "name": "documentId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "encryptedContent": "string",
                "keyId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RewrapOrganizationSealedDocumentRequestDto"
              }
            },
            "application/json": {
              "example": {
                "encryptedContent": "string",
                "keyId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RewrapOrganizationSealedDocumentRequestDto"
              }
            },
            "text/json": {
              "example": {
                "encryptedContent": "string",
                "keyId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RewrapOrganizationSealedDocumentRequestDto"
              }
            }
          },
          "description": "The re-wrapped bytes and the current key id."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Re-wrapped; the prior bytes are kept as a restorable version."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Absent, not sealed to this organisation's key, or the caller is not an active key-holder."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The key id is not the organisation's current key, the document is already on it, or the envelope length changed."
          }
        },
        "summary": "Write back one organisation-sealed document re-wrapped to the organisation's CURRENT key, as a\r\nnew version.",
        "tags": [
          "OrganizationKeyRotation"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/migration-documents": {
      "post": {
        "operationId": "AddMigrationDocument",
        "parameters": [
          {
            "description": "The organisation the record belongs to.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "encryptedContent": "string",
                "fileName": "string",
                "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keyId": "string",
                "mimeType": "string",
                "recordKey": "string",
                "sensitivityLabel": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/MigrationDocumentLoadRequestDto"
              }
            },
            "application/json": {
              "example": {
                "encryptedContent": "string",
                "fileName": "string",
                "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keyId": "string",
                "mimeType": "string",
                "recordKey": "string",
                "sensitivityLabel": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/MigrationDocumentLoadRequestDto"
              }
            },
            "text/json": {
              "example": {
                "encryptedContent": "string",
                "fileName": "string",
                "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keyId": "string",
                "mimeType": "string",
                "recordKey": "string",
                "sensitivityLabel": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/MigrationDocumentLoadRequestDto"
              }
            }
          },
          "description": "The sealed record."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "created": false,
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/MigrationDocumentLoadResultDto"
                }
              }
            },
            "description": "Already stored by an earlier load of the same record; nothing stored or charged."
          },
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "created": false,
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/MigrationDocumentLoadResultDto"
                }
              }
            },
            "description": "Stored as a new document."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The organisation cannot receive it: no single active default vault, or no active key."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "It is not sealed to the organisation's active key, or is not a well-formed envelope."
          }
        },
        "summary": "Store one migrated, organisation-sealed record as a document",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/module-exports": {
      "post": {
        "operationId": "MeasureModuleRecordExport",
        "parameters": [
          {
            "description": "The organisation.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "moduleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "schemaRefs": [],
                "switchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/MeasureModuleRecordExportRequestDto"
              }
            },
            "application/json": {
              "example": {
                "moduleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "schemaRefs": [],
                "switchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/MeasureModuleRecordExportRequestDto"
              }
            },
            "text/json": {
              "example": {
                "moduleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "schemaRefs": [],
                "switchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/MeasureModuleRecordExportRequestDto"
              }
            }
          },
          "description": "The module and the schema ids it declares."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "documentSetDigest": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "listedCount": 0,
                  "measuredAt": "2026-01-01T00:00:00.0000000+00:00",
                  "moduleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "recordCount": 0,
                  "requestedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "schemaRefs": [],
                  "switchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "unreachableCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/ModuleRecordExportDto"
                }
              }
            },
            "description": "The recorded export: counts, digest, and the records the caller can move."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No module, or no or malformed schema ids."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not an active key-holder of the organisation."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The module holds more records than one export can hold."
          }
        },
        "summary": "Measure the records a module holds for the organisation",
        "tags": [
          "ModuleExports"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/module-exports/{exportId}": {
      "get": {
        "operationId": "GetModuleRecordExport",
        "parameters": [
          {
            "description": "The organisation.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The export.",
            "in": "path",
            "name": "exportId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "documentSetDigest": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "listedCount": 0,
                  "measuredAt": "2026-01-01T00:00:00.0000000+00:00",
                  "moduleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "recordCount": 0,
                  "requestedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "schemaRefs": [],
                  "switchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "unreachableCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/ModuleRecordExportDto"
                }
              }
            },
            "description": "The export."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such export for this organisation, or the caller is not an active key-holder."
          }
        },
        "summary": "A recorded export: the stored counts and digest, never re-measured.",
        "tags": [
          "ModuleExports"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/module-exports/{exportId}/items": {
      "get": {
        "operationId": "ListModuleRecordExportItems",
        "parameters": [
          {
            "description": "The organisation.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The export.",
            "in": "path",
            "name": "exportId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The previous page's `nextCursor`; omit for the first page.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page size (default 100, at most 500).",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 100,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "hasMore": false,
                  "items": [],
                  "nextCursor": "string",
                  "pageSize": 0,
                  "previousCursor": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ModuleRecordExportItemDtoCursorResult"
                }
              }
            },
            "description": "The page."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such export for this organisation, or the caller is not an active key-holder."
          }
        },
        "summary": "One keyset page of the records the export lists. Metadata only.",
        "tags": [
          "ModuleExports"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/module-exports/{exportId}/items/{documentId}/content": {
      "get": {
        "operationId": "GetModuleRecordExportItemContent",
        "parameters": [
          {
            "description": "The organisation.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The export.",
            "in": "path",
            "name": "exportId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The record.",
            "in": "path",
            "name": "documentId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "ciphertext": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "keyId": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSealedDocumentContentDto"
                }
              }
            },
            "description": "The ciphertext (Base64)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The export does not list it, it is no longer sealed to the organisation, or the caller is not an active key-holder."
          }
        },
        "summary": "The stored ciphertext of one record the export lists, for the client-side transform.",
        "tags": [
          "ModuleExports"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/public-key": {
      "get": {
        "description": "404 covers \"no keypair\" and \"you have no relationship with this organisation\" identically.\r\n503 means the relationship could not be checked, never that the key is absent.",
        "operationId": "OrganizationPublicKey_GetPublicKey",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "algorithm": "string",
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "publicKey": "string",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationPublicKeyDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "503": {
            "description": "Service Unavailable"
          }
        },
        "summary": "Serves the organisation's published public key (the grantor wrap target).",
        "tags": [
          "OrganizationPublicKey"
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/vault-statistics/vault-count": {
      "get": {
        "description": "Answers 404 rather than 403 on a tenancy mismatch, so one organisation's existence cannot\r\nbe probed from another's token — the same rule the platform's other org-scoped reads hold.\r\nA platform admin may ask about any organisation.",
        "operationId": "OrganizationVaultStatistics_GetVaultCount",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/OrganizationVaultCountDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "How many active vaults this organisation holds.",
        "tags": [
          "OrganizationVaultStatistics"
        ]
      }
    },
    "/api/v1/programme-records/hand-over": {
      "get": {
        "operationId": "GetProgrammeRecordsHandOver",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "message": "string",
                  "recordsSecured": 0,
                  "recordsTotal": 0,
                  "stage": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProgrammeRecordsHandOverDto"
                }
              }
            },
            "description": "The stage, the records sealed to the caller so far, and the member-facing message."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No programme record was held for the caller."
          },
          "503": {
            "description": "A sovereign could not be asked; nothing is known, not \"nothing there\"."
          }
        },
        "summary": "Where the caller's programme records stand, in words the member is shown.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/self-exclusion": {
      "post": {
        "description": "Creates an immediately-active, time-bound self-exclusion. Requires the explicit hard-commitment confirmation.",
        "operationId": "CreateSelfExclusion",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "confirmedSelfExclude": false,
                "durationDays": 0,
                "jurisdiction": "string",
                "permanent": false
              },
              "schema": {
                "$ref": "#/components/schemas/CreateSelfExclusionRequest"
              }
            },
            "application/json": {
              "example": {
                "confirmedSelfExclude": false,
                "durationDays": 0,
                "jurisdiction": "string",
                "permanent": false
              },
              "schema": {
                "$ref": "#/components/schemas/CreateSelfExclusionRequest"
              }
            },
            "text/json": {
              "example": {
                "confirmedSelfExclude": false,
                "durationDays": 0,
                "jurisdiction": "string",
                "permanent": false
              },
              "schema": {
                "$ref": "#/components/schemas/CreateSelfExclusionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "blockedActivities": [],
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "jurisdiction": "string",
                  "permanent": false,
                  "scheme": "string",
                  "startedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string",
                  "validUntil": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/SelfExclusionDto"
                }
              }
            },
            "description": "Self-exclusion created (or the already-active exclusion returned)."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request (missing confirmation, out-of-range duration, or missing jurisdiction)."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Create a self-exclusion",
        "tags": [
          "Self-Exclusion"
        ]
      }
    },
    "/api/v1/self-exclusion/current": {
      "get": {
        "description": "Returns the user's active self-exclusion, or 204 No Content when the user has no active exclusion.",
        "operationId": "GetCurrentSelfExclusion",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "blockedActivities": [],
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "jurisdiction": "string",
                  "permanent": false,
                  "scheme": "string",
                  "startedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string",
                  "validUntil": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/SelfExclusionDto"
                }
              }
            },
            "description": "The user's active self-exclusion."
          },
          "204": {
            "description": "The user has no active self-exclusion."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Get current self-exclusion",
        "tags": [
          "Self-Exclusion"
        ]
      }
    },
    "/api/v1/shared-blobs": {
      "post": {
        "operationId": "SharedBlobs_Create",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "encoding": {
                "contentType": {
                  "style": "form"
                },
                "expiresAt": {
                  "style": "form"
                },
                "file": {
                  "style": "form"
                }
              },
              "schema": {
                "properties": {
                  "contentType": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "file": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "blobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "uri": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/SharedBlobCreatedDto"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Uploads a client-encrypted shared blob and returns its absolute capability URI.",
        "tags": [
          "SharedBlobs"
        ]
      }
    },
    "/api/v1/shared-blobs/{token}": {
      "delete": {
        "description": "\n\r\n            This is the purge counterpart of M:Essence.Core.Vault.Api.Controllers.SharedBlobsController.Create(Microsoft.AspNetCore.Http.IFormFile,System.String,System.Nullable{System.DateTime},System.Threading.CancellationToken) (debt-2026-08-27-182). Until it existed,\r\n            every consumer that had to \"purge\" a shared payload could only drop its reference: EPIC 6's\r\n            revocation and EPIC 89's issuance purge transitions both made the bytes UNREACHABLE while\r\n            leaving them on disk. Under a retention obligation those are different facts, and only this\r\n            route makes the second one true.\r\n            \r\n\n\r\n  <b>Why the ServiceProvisioning scheme and not the capability token.</b> The GET below is\r\n            deliberately anonymous because possession of the token yields only ciphertext — the content is\r\n            E2E-encrypted, so a leaked URI discloses nothing. That argument does not extend to destruction.\r\n            The GRANTEE also holds the token, so a token-authorised DELETE would let a recipient destroy the\r\n            grantor's shared payload, and an intercepted URI would buy an attacker deletion rather than\r\n            unreadable bytes. Nor can this be the ordinary user scheme: the callers are background purge\r\n            paths (EPIC 89's hold-expiry reaper, EPIC 6's revocation) that run long after the session that\r\n            created the blob has gone. So it takes the same separately-signed service credential the\r\n            cross-instance provision/erase endpoints use, which the default user scheme rejects and which\r\n            is unusable on an instance that configures no service secret.\r\n            \r\n\n\r\n  <b>Scoped, and the scope is checked.</b> That scheme also guards cross-instance vault\r\n            provision and erase, so naming the scheme alone would hand every shared-blob purger authority\r\n            to erase entire vaults (debt-2026-08-27-213). The policy below additionally requires\r\n            `scope=vault:shared-blob:delete` — the value the purge callers already mint — so a\r\n            credential issued for this route reaches only this route, and one issued elsewhere is refused\r\n            here with a 403.\r\n            \r\n\n\r\n  <b>Idempotent.</b> An unknown, malformed, already-purged or expired token all return 204. A\r\n            purge reaper retries, and a retry after a partial failure must not read as an error; the uniform\r\n            response also denies a caller any existence oracle over the token space.\r\n            ",
        "operationId": "SharedBlobs_Delete",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        },
        "summary": "Destroys a shared blob's ciphertext by its capability token. Service-to-service only.",
        "tags": [
          "SharedBlobs"
        ]
      },
      "get": {
        "operationId": "SharedBlobs_Get",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves a shared blob's ciphertext by its capability token (anonymous + rate-limited).",
        "tags": [
          "SharedBlobs"
        ]
      }
    },
    "/api/v1/shared-blobs/{token}/withdraw": {
      "post": {
        "description": "A share uploads the ciphertext before the grant, because the grant carries the URI. When the\r\ngrant is refused, this is how the grantor's session takes the capability back, so a refused\r\nshare leaves nothing that answers to its URI and no consent record governs. Authorised by the\r\nsigned-in user being the blob's CREATOR — never by the token, which the grantee also holds\r\n(the reason the purge M:Essence.Core.Vault.Api.Controllers.SharedBlobsController.Delete(System.String,System.Threading.CancellationToken) above is service-only). Idempotent: an unknown,\r\nmalformed or already-withdrawn token returns 204; someone else's blob returns 403.",
        "operationId": "SharedBlobs_Withdraw",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Withdraws a shared blob its creator uploaded for a grant that was never recorded (#10262).",
        "tags": [
          "SharedBlobs"
        ]
      }
    },
    "/api/v1/shared-with-me": {
      "get": {
        "description": "Retrieves active field shares where the current user is the recipient, paginated.",
        "operationId": "GetSharedWithMe",
        "parameters": [
          {
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "items": [],
                  "pageNumber": 0,
                  "pageSize": 0,
                  "totalCount": 0,
                  "totalPages": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/SharedWithMeFieldShareDtoPagedResultDto"
                }
              }
            },
            "description": "Shared fields retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid pagination parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "List fields shared with me",
        "tags": [
          "Field Shares"
        ]
      }
    },
    "/api/v1/subject-export/scope": {
      "get": {
        "description": "Returns the record count and estimated payload for each Art.15 category this service sources, without materialising any of it. The counts are produced by the same predicate the collect endpoint applies, so a manifest built from them cannot disagree with the bundle that follows.",
        "operationId": "GetSubjectExportScope",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "categories": [],
                  "measuredAt": "2026-01-01T00:00:00.0000000+00:00",
                  "storedContentBytes": 0,
                  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/SubjectExportScopeDto"
                }
              }
            },
            "description": "Scope measured."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          }
        },
        "summary": "Measure the subject's export scope",
        "tags": [
          "Subject Export"
        ]
      }
    },
    "/api/v1/subject-export/{category}": {
      "get": {
        "description": "Returns one page of the requested category as machine-readable JSON, ordered oldest-first by a total order so repeated paging can neither drop nor duplicate a record. Content is not disclosed: the platform stores it client-side encrypted and cannot read it, which the response states in plain language.",
        "operationId": "GetSubjectExportPage",
        "parameters": [
          {
            "description": "`documents` or `field-metadata`.",
            "in": "path",
            "name": "category",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Records to skip. Defaults to 0.",
            "in": "query",
            "name": "skip",
            "schema": {
              "default": 0,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "Page size. Defaults to 100, capped at 200.",
            "in": "query",
            "name": "take",
            "schema": {
              "default": 100,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "capturedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "category": "string",
                  "entries": [],
                  "hasMore": false,
                  "skip": 0,
                  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "take": 0,
                  "totalCount": 0,
                  "zeroKnowledgeNotice": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/SubjectExportPageDto"
                }
              }
            },
            "description": "Page returned."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unknown category, or paging parameters out of range."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          }
        },
        "summary": "Collect a page of the subject's export category",
        "tags": [
          "Subject Export"
        ]
      }
    },
    "/api/v1/users/{userId}/issued-credentials": {
      "post": {
        "operationId": "DepositIssuedCredential",
        "parameters": [
          {
            "description": "The holder: the credential's subject.",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "credentialId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "encryptedContent": "string",
                "issuerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keyId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/IssuedCredentialDepositRequestDto"
              }
            },
            "application/json": {
              "example": {
                "credentialId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "encryptedContent": "string",
                "issuerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keyId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/IssuedCredentialDepositRequestDto"
              }
            },
            "text/json": {
              "example": {
                "credentialId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "encryptedContent": "string",
                "issuerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keyId": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/IssuedCredentialDepositRequestDto"
              }
            }
          },
          "description": "The sealed credential."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "created": false,
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/IssuedCredentialDepositResultDto"
                }
              }
            },
            "description": "This credential was already deposited; nothing stored or charged."
          },
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "created": false,
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/IssuedCredentialDepositResultDto"
                }
              }
            },
            "description": "Stored as a new document."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The holder has no active personal vault on this instance."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The holder has more than one default personal vault."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The credential is not sealed to one of the holder's keys, or is not a well-formed envelope."
          }
        },
        "summary": "Deposit an issued credential into the holder's vault",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/vault/access-reconstruction": {
      "get": {
        "description": "Returns the per-document/field serve events recorded under the caller's account within [startedAt, endedAt]. Metadata only (zero-knowledge). Never fabricates events.",
        "operationId": "GetAccessReconstruction",
        "parameters": [
          {
            "description": "Window start (inclusive), UTC.",
            "in": "query",
            "name": "startedAt",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Window end (inclusive), UTC.",
            "in": "query",
            "name": "endedAt",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "actorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "endedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "eventCount": 0,
                  "events": [],
                  "startedAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/AccessReconstructionDto"
                }
              }
            },
            "description": "Reconstruction retrieved successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The reconstruction window is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not authenticated."
          }
        },
        "summary": "Reconstruct windowed decrypt-access",
        "tags": [
          "Access Reconstruction"
        ]
      }
    },
    "/api/v1/vault/derived-shares/preview": {
      "get": {
        "description": "Returns the derived shares and cached copies that revoking the given consent grants would tear down.",
        "operationId": "PreviewDerivedSharesTeardown",
        "parameters": [
          {
            "description": "Comma-separated consent identifiers (GUIDs).",
            "in": "query",
            "name": "consentIds",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "cachedCopyCount": 0,
                  "derivedShareCount": 0,
                  "perConsent": [],
                  "totalTeardownCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DerivedSharesPreviewDto"
                }
              }
            },
            "description": "Preview computed."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid or missing consentIds."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Preview vault teardown for a consent revocation",
        "tags": [
          "Derived Shares"
        ]
      }
    },
    "/api/v1/vault/derived-shares/reconciliation": {
      "get": {
        "description": "Returns confirmed vs pending teardown counts for the batch, driven by the FieldShareRevoked cascade.",
        "operationId": "ReconcileDerivedShareBatch",
        "parameters": [
          {
            "description": "The batch identifier returned by registration.",
            "in": "query",
            "name": "batchId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "batchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "complete": false,
                  "consentCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DerivedShareReconciliationDto"
                }
              }
            },
            "description": "Reconciliation computed."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Missing or invalid batchId."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such batch for this user."
          }
        },
        "summary": "Reconcile a bulk-revocation batch's teardown",
        "tags": [
          "Derived Shares"
        ]
      }
    },
    "/api/v1/vault/derived-shares/revocation-batch": {
      "post": {
        "description": "Creates a durable correlation record so a subsequent reconciliation call can resolve the batch by id.",
        "operationId": "RegisterDerivedShareRevocationBatch",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "batchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "consentIds": [],
                "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterDerivedShareRevocationBatchCommand"
              }
            },
            "application/json": {
              "example": {
                "batchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "consentIds": [],
                "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterDerivedShareRevocationBatchCommand"
              }
            },
            "text/json": {
              "example": {
                "batchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "consentIds": [],
                "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterDerivedShareRevocationBatchCommand"
              }
            }
          },
          "description": "The batch to register (batchId optional; consentIds required)."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "batchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "consentCount": 0,
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expectedShareCount": 0,
                  "expectedSubscriptionCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/DerivedShareRevocationBatchDto"
                }
              }
            },
            "description": "Batch registered."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The batchId already exists and is owned by another user."
          }
        },
        "summary": "Register a bulk consent-revocation batch",
        "tags": [
          "Derived Shares"
        ]
      }
    },
    "/api/v1/vault/estates/{estateId}/bequeathed-documents": {
      "get": {
        "description": "Projects only the items the deceased bequeathed to the authenticated executor, each with its release-tier availability. Authorised by the verified estate release, not a consent grant.",
        "operationId": "GetBequeathedDocuments",
        "parameters": [
          {
            "description": "The estate to project bequeathed documents for.",
            "in": "path",
            "name": "estateId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BequeathedDocumentDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The bequeathed-documents projection (empty until the estate is released)."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "List documents left to you",
        "tags": [
          "Estate Bequests"
        ]
      }
    },
    "/api/v1/vault/estates/{estateId}/bequests": {
      "post": {
        "description": "Records that a document is left to a named executor, opening the estate's bequest set on first use.",
        "operationId": "DeclareBequest",
        "parameters": [
          {
            "description": "The estate the bequest belongs to.",
            "in": "path",
            "name": "estateId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "delayHours": 0,
                "documentRef": "string",
                "executorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "tier": "string",
                "title": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/DeclareBequestRequestDto"
              }
            },
            "application/json": {
              "example": {
                "delayHours": 0,
                "documentRef": "string",
                "executorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "tier": "string",
                "title": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/DeclareBequestRequestDto"
              }
            },
            "text/json": {
              "example": {
                "delayHours": 0,
                "documentRef": "string",
                "executorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "tier": "string",
                "title": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/DeclareBequestRequestDto"
              }
            }
          },
          "description": "Bequest details. The owner is bound from the token, never the body."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "estateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "itemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/BequestDeclaredResponseDto"
                }
              }
            },
            "description": "The bequest was declared; the created item id is returned."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The estate's bequest set belongs to another owner."
          }
        },
        "summary": "Declare a bequeathed document",
        "tags": [
          "Estate Bequests"
        ]
      }
    },
    "/api/v1/vault/estates/{estateId}/release-authorization": {
      "post": {
        "description": "Records the posthumous authorisation that unlocks the bequest projection for the estate's executors. Restricted to the upstream verified-release seam: recording a release is an attestation that the owner has died, so neither a named executor nor the owner's own credential may perform it.",
        "operationId": "AuthorizeEstateRelease",
        "parameters": [
          {
            "description": "The estate whose release is being authorised.",
            "in": "path",
            "name": "estateId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "probateGranted": false
              },
              "schema": {
                "$ref": "#/components/schemas/AuthorizeEstateReleaseRequestDto"
              }
            },
            "application/json": {
              "example": {
                "probateGranted": false
              },
              "schema": {
                "$ref": "#/components/schemas/AuthorizeEstateReleaseRequestDto"
              }
            },
            "text/json": {
              "example": {
                "probateGranted": false
              },
              "schema": {
                "$ref": "#/components/schemas/AuthorizeEstateReleaseRequestDto"
              }
            }
          },
          "description": "Release details (whether probate is confirmed)."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "changed": false,
                  "estateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "probateGranted": false,
                  "releaseAuthorizedAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/EstateReleaseAuthorizationResultDto"
                }
              }
            },
            "description": "The release was recorded (or was already recorded — idempotent)."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not hold the estate-release authority."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No bequest set exists for the estate."
          }
        },
        "summary": "Authorise a verified estate release",
        "tags": [
          "Estate Bequests"
        ]
      }
    },
    "/api/v1/vault/imports": {
      "post": {
        "description": "Attests that an imported batch's records were AES-256-GCM sealed on-device before storage. Zero-knowledge — algorithm label, encrypted-record count and an opaque seal hash only.",
        "operationId": "RecordImportSeal",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "algorithmLabel": "string",
                "encryptedRecordCount": 0,
                "sealReceiptHash": "string",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RecordImportSealRequestDto"
              }
            },
            "application/json": {
              "example": {
                "algorithmLabel": "string",
                "encryptedRecordCount": 0,
                "sealReceiptHash": "string",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RecordImportSealRequestDto"
              }
            },
            "text/json": {
              "example": {
                "algorithmLabel": "string",
                "encryptedRecordCount": 0,
                "sealReceiptHash": "string",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/RecordImportSealRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "algorithmLabel": "string",
                  "encryptedRecordCount": 0,
                  "importBatchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "importedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "sealReceiptHash": "string",
                  "sealedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultImportSealReceiptDto"
                }
              }
            },
            "description": "Seal receipt recorded."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "503": {
            "description": "Entitlement/quota authority unavailable (fail-closed)."
          }
        },
        "summary": "Record an import-batch encrypted-store seal receipt",
        "tags": [
          "Vault Imports"
        ]
      }
    },
    "/api/v1/vault/imports/{id}/encrypted-store-receipt": {
      "get": {
        "description": "Replays the client-attested proof that the imported records were sealed on-device before storage. Scoped to the importing user.",
        "operationId": "GetEncryptedStoreReceipt",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "algorithmLabel": "string",
                  "encryptedRecordCount": 0,
                  "importBatchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "importedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "sealReceiptHash": "string",
                  "sealedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultImportSealReceiptDto"
                }
              }
            },
            "description": "The seal receipt."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No receipt for this id owned by the caller."
          }
        },
        "summary": "Get an import-batch encrypted-store seal receipt",
        "tags": [
          "Vault Imports"
        ]
      }
    },
    "/api/v1/vault/mediated-access/descriptors": {
      "post": {
        "description": "POST, not GET, despite being a read. The decision proof is a bearer secret the store\r\ncompares constant-time, and a query string is written down everywhere a request goes —\r\naccess logs, proxy logs, traces, `Referer` headers. Carrying it in the body keeps it\r\nout of all of them. Since the reference became subject-scoped a leaked proof authorises\r\nthat subject's credentials specifically, so it is worth more than it was.",
        "operationId": "MediatedAccess_GetDescriptors",
        "parameters": [
          {
            "in": "header",
            "name": "X-Api-Version",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "decisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "proofBase64": "string",
                "subjectRef": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/MediatedDescriptorsRequestDto"
              }
            },
            "application/json": {
              "example": {
                "decisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "proofBase64": "string",
                "subjectRef": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/MediatedDescriptorsRequestDto"
              }
            },
            "text/json": {
              "example": {
                "decisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "proofBase64": "string",
                "subjectRef": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/MediatedDescriptorsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MediatedCredentialDescriptorDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Enumerates the subject's credential descriptors — refs, types and claim NAMES\r\nonly, never a body or a value (FR-PMD.003).",
        "tags": [
          "MediatedAccess"
        ]
      }
    },
    "/api/v1/vault/mediated-access/open": {
      "post": {
        "operationId": "MediatedAccess_OpenCredential",
        "parameters": [
          {
            "in": "header",
            "name": "X-Api-Version",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "credentialRef": "string",
                "decisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "proofBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/OpenMediatedCredentialRequestDto"
              }
            },
            "application/json": {
              "example": {
                "credentialRef": "string",
                "decisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "proofBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/OpenMediatedCredentialRequestDto"
              }
            },
            "text/json": {
              "example": {
                "credentialRef": "string",
                "decisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "proofBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/OpenMediatedCredentialRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "credentialRef": "string",
                  "payloadBase64": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/MediatedCredentialBodyDto"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Opens exactly one credential body under a decision reference. The payload is the\r\nclient-sealed ciphertext — the server never held the plaintext (zero-knowledge).",
        "tags": [
          "MediatedAccess"
        ]
      }
    },
    "/api/v1/vault/mediated-access/signing": {
      "post": {
        "operationId": "MediatedAccess_RequestSigning",
        "parameters": [
          {
            "in": "header",
            "name": "X-Api-Version",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "decisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keyRef": "string",
                "payloadBase64": "string",
                "proofBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/MediatedSigningRequestDto"
              }
            },
            "application/json": {
              "example": {
                "decisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keyRef": "string",
                "payloadBase64": "string",
                "proofBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/MediatedSigningRequestDto"
              }
            },
            "text/json": {
              "example": {
                "decisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "keyRef": "string",
                "payloadBase64": "string",
                "proofBase64": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/MediatedSigningRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "dispatched": false,
                  "failureReason": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/MediatedSigningDispatchDto"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Requests on-device signing. The vault store has no device channel, so the honest\r\nanswer is always a non-dispatched result the mediator maps to a typed refusal\r\n(FR-PMD.006) — but the decision reference is still validated first.",
        "tags": [
          "MediatedAccess"
        ]
      }
    },
    "/api/v1/vault/name-change/{changeId}/credentials/{credentialId}/reissue": {
      "post": {
        "description": "Standard credentials reissue directly; regulated credentials run a KYC re-verification. Binds the deed-poll evidence and an EPIC 4 audit anchor. Owner-only.",
        "operationId": "ReissueNameChangeCredential",
        "parameters": [
          {
            "in": "path",
            "name": "changeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "credentialId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "auditAnchor": "string",
                  "credentialClass": "string",
                  "credentialId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "detail": "string",
                  "evidenceDeedPollDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "kycResult": "string",
                  "label": "string",
                  "oldStillValid": false,
                  "reissuedAtIso": "string",
                  "state": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/CredentialReissueDto"
                }
              }
            },
            "description": "The credential's reissue state."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No cascade exists for this change (or the caller does not own it)."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The credential is not part of this cascade."
          }
        },
        "summary": "Reissue a credential under the new name",
        "tags": [
          "Name-Change Reissue"
        ]
      }
    },
    "/api/v1/vault/name-change/{changeId}/evidence-chain": {
      "get": {
        "description": "Returns the deed-poll → re-attestation → per-credential-reissue chain, each link citing the deed-poll document id and carrying its EPIC 4 audit anchor. Owner-only.",
        "operationId": "GetNameChangeEvidenceChain",
        "parameters": [
          {
            "in": "path",
            "name": "changeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "bound": false,
                  "changeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "deedPollDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "links": []
                },
                "schema": {
                  "$ref": "#/components/schemas/EvidenceChainDto"
                }
              }
            },
            "description": "The evidence chain."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No cascade exists for this change (or the caller does not own it)."
          }
        },
        "summary": "Get a name change's deed-poll evidence chain",
        "tags": [
          "Name-Change Reissue"
        ]
      }
    },
    "/api/v1/vault/name-change/{changeId}/status": {
      "get": {
        "description": "Returns the per-credential reissue feed (state, class, KYC result, evidence, audit anchor) and relying-party coverage. Owner-only.",
        "operationId": "GetNameChangeCascadeStatus",
        "parameters": [
          {
            "in": "path",
            "name": "changeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "changeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "credentials": [],
                  "reattestation": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/CascadeStatusDto"
                }
              }
            },
            "description": "The cascade status."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No cascade exists for this change (or the caller does not own it)."
          }
        },
        "summary": "Get a name-change reissue cascade's status",
        "tags": [
          "Name-Change Reissue"
        ]
      }
    },
    "/api/v1/vault/sponsored-entitlements": {
      "get": {
        "description": "Returns the caller's durable in-vault sponsored plan-upgrade offers.",
        "operationId": "ListSponsoredEntitlements",
        "parameters": [
          {
            "description": "When `true`, only currently actionable (pending, unexpired) offers are returned.",
            "in": "query",
            "name": "actionableOnly",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PendingSponsoredEntitlementDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Offers listed."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "List sponsored-entitlement offers",
        "tags": [
          "Sponsored Entitlements"
        ]
      },
      "post": {
        "description": "Creates a durable in-vault plan-upgrade offer for the named user, surfaced to them as an accept/decline item. Admitted only to a sponsoring service principal.",
        "operationId": "RegisterSponsoredEntitlement",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "currentPlan": "string",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "offeredPlan": "string",
                "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sponsorDisplayName": "string",
                "sponsorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sponsorReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterPendingSponsoredEntitlementCommand"
              }
            },
            "application/json": {
              "example": {
                "currentPlan": "string",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "offeredPlan": "string",
                "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sponsorDisplayName": "string",
                "sponsorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sponsorReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterPendingSponsoredEntitlementCommand"
              }
            },
            "text/json": {
              "example": {
                "currentPlan": "string",
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "offeredPlan": "string",
                "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sponsorDisplayName": "string",
                "sponsorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sponsorReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RegisterPendingSponsoredEntitlementCommand"
              }
            }
          },
          "description": "The offer to register; the owner is named in the body because the caller is a service, not the person."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "currentPlan": "string",
                  "decidedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActionable": false,
                  "offeredPlan": "string",
                  "sponsorDisplayName": "string",
                  "sponsorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "sponsorReference": "string",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/PendingSponsoredEntitlementDto"
                }
              }
            },
            "description": "Offer registered (or existing idempotent offer returned)."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not a service principal holding the registration scope."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The sponsor reference already exists for this user under a different sponsor."
          }
        },
        "summary": "Register a sponsored-entitlement offer (service-to-service)",
        "tags": [
          "Sponsored Entitlements"
        ]
      }
    },
    "/api/v1/vault/sponsored-entitlements/plan-status": {
      "get": {
        "description": "Returns the effective plan and, while an offer is pending, the proposed plan change.",
        "operationId": "GetSponsoredPlanStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "currentPlan": "string",
                  "hasPendingOffer": false,
                  "pendingOfferCount": 0,
                  "pendingOfferId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "proposedPlan": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/SponsoredPlanStatusDto"
                }
              }
            },
            "description": "Plan-status projected."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          }
        },
        "summary": "Project sponsored plan-status",
        "tags": [
          "Sponsored Entitlements"
        ]
      }
    },
    "/api/v1/vault/sponsored-entitlements/{id}/accept": {
      "post": {
        "description": "Accepts the offer; the offered plan becomes the user's effective sponsored plan.",
        "operationId": "AcceptSponsoredEntitlement",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "currentPlan": "string",
                  "decidedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActionable": false,
                  "offeredPlan": "string",
                  "sponsorDisplayName": "string",
                  "sponsorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "sponsorReference": "string",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/PendingSponsoredEntitlementDto"
                }
              }
            },
            "description": "Offer accepted."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such offer for this user."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The offer is no longer actionable."
          }
        },
        "summary": "Accept a sponsored-entitlement offer",
        "tags": [
          "Sponsored Entitlements"
        ]
      }
    },
    "/api/v1/vault/sponsored-entitlements/{id}/decline": {
      "post": {
        "description": "Declines the offer; no plan change occurs.",
        "operationId": "DeclineSponsoredEntitlement",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "currentPlan": "string",
                  "decidedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActionable": false,
                  "offeredPlan": "string",
                  "sponsorDisplayName": "string",
                  "sponsorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "sponsorReference": "string",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/PendingSponsoredEntitlementDto"
                }
              }
            },
            "description": "Offer declined."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such offer for this user."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The offer is no longer actionable."
          }
        },
        "summary": "Decline a sponsored-entitlement offer",
        "tags": [
          "Sponsored Entitlements"
        ]
      }
    },
    "/api/v1/vault/wallet-credentials": {
      "get": {
        "description": "Returns the credentials the vault references as held in the user's physical wallet, for the stolen-wallet reissue journey.",
        "operationId": "ListWalletCredentials",
        "parameters": [
          {
            "description": "Vault to list wallet credentials for (must be owned by the caller).",
            "in": "query",
            "name": "vaultId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WalletCredentialDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Wallet credentials for the vault."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vaultId query parameter is missing or empty."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault not found or not owned by the caller."
          }
        },
        "summary": "List wallet credentials",
        "tags": [
          "Stolen Wallet"
        ]
      }
    },
    "/api/v1/vault/wallet-reissue/fan-out": {
      "post": {
        "description": "Emits per-credential reissue requests (and, when consented, mark-compromised requests) for the selected wallet credentials. Idempotent by IdempotencyKey.",
        "operationId": "FanOutWalletReissue",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "consentToMarkCompromised": false,
                "credentialIds": [],
                "idempotencyKey": "string",
                "includeSensitive": false,
                "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/WalletReissueFanOutCommand"
              }
            },
            "application/json": {
              "example": {
                "consentToMarkCompromised": false,
                "credentialIds": [],
                "idempotencyKey": "string",
                "includeSensitive": false,
                "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/WalletReissueFanOutCommand"
              }
            },
            "text/json": {
              "example": {
                "consentToMarkCompromised": false,
                "credentialIds": [],
                "idempotencyKey": "string",
                "includeSensitive": false,
                "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/WalletReissueFanOutCommand"
              }
            }
          },
          "description": "Fan-out request. VaultId/OwnerUserId are set from route/token."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "heldCount": 0,
                  "idempotencyKey": "string",
                  "markedCompromisedCount": 0,
                  "outcomes": [],
                  "reissueRequestedCount": 0,
                  "totalCredentials": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/WalletReissueFanOutResultDto"
                }
              }
            },
            "description": "Per-credential fan-out outcomes."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault not found or not owned by the caller."
          }
        },
        "summary": "Fan out wallet credential reissue",
        "tags": [
          "Stolen Wallet"
        ]
      }
    },
    "/api/v1/vaults/children/{childId}/shared-space": {
      "get": {
        "description": "Returns the co-custodian roster (both parents) with their capabilities. Custodian-only access.",
        "operationId": "GetChildSharedSpace",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "childId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "custodians": [],
                  "provisionedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "spaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ChildSharedRecordsSpaceDto"
                }
              }
            },
            "description": "The shared-records space."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not a custodian of this child."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No shared-records space exists for this child yet."
          }
        },
        "summary": "Get a child's co-custodianship shared-records space",
        "tags": [
          "Child Shared Records Space"
        ]
      }
    },
    "/api/v1/vaults/erasure-attestations/{linkId}": {
      "get": {
        "operationId": "GetContactErasureAttestation",
        "parameters": [
          {
            "in": "path",
            "name": "linkId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "auditAnchorRef": "string",
                  "contactLinkId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentDigest": "string",
                  "erasedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "handoverRecordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/ContactErasureAttestationDto"
                }
              }
            },
            "description": "The erasure attestation."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The contact has not been erased."
          }
        },
        "summary": "Get a contact erasure attestation",
        "tags": [
          "Contact Handover"
        ]
      }
    },
    "/api/v1/vaults/family-members": {
      "post": {
        "description": "Creates a family member's own independent, client-encrypted vault billed to the authenticated sponsor's family plan. Idempotent on (member, family-plan).",
        "operationId": "ProvisionFamilyMemberVault",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "authenticationTag": "string",
                "familyPlanReference": "string",
                "initializationVector": "string",
                "keyId": "string",
                "maxStorageSizeBytes": 0,
                "memberUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "vaultName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionFamilyMemberVaultRequestDto"
              }
            },
            "application/json": {
              "example": {
                "authenticationTag": "string",
                "familyPlanReference": "string",
                "initializationVector": "string",
                "keyId": "string",
                "maxStorageSizeBytes": 0,
                "memberUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "vaultName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionFamilyMemberVaultRequestDto"
              }
            },
            "text/json": {
              "example": {
                "authenticationTag": "string",
                "familyPlanReference": "string",
                "initializationVector": "string",
                "keyId": "string",
                "maxStorageSizeBytes": 0,
                "memberUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "vaultName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionFamilyMemberVaultRequestDto"
              }
            }
          },
          "description": "The member, family-plan reference, vault name and the member's client-side encryption material."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "familyPlanReference": "string",
                  "memberUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "provisioningId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "sponsorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/FamilyMemberVaultProvisionedDto"
                }
              }
            },
            "description": "Member vault provisioned."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The member cannot be the sponsor."
          },
          "503": {
            "description": "Entitlement/quota authority unavailable (fail-closed)."
          }
        },
        "summary": "Provision a family-member vault",
        "tags": [
          "Family Member Vaults"
        ]
      }
    },
    "/api/v1/vaults/handover/contacts": {
      "post": {
        "description": "Records a keep-a-copy retention or a purge into the Trash / Recently-Deleted store. Zero-knowledge — a content digest only, never plaintext.",
        "operationId": "HandOverContact",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "closureContext": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contactLinkId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contentDigest": "string",
                "disposition": "string",
                "recoveryWindowDays": 0,
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/HandOverContactRequestDto"
              }
            },
            "application/json": {
              "example": {
                "closureContext": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contactLinkId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contentDigest": "string",
                "disposition": "string",
                "recoveryWindowDays": 0,
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/HandOverContactRequestDto"
              }
            },
            "text/json": {
              "example": {
                "closureContext": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contactLinkId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "contentDigest": "string",
                "disposition": "string",
                "recoveryWindowDays": 0,
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/HandOverContactRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "closureContext": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contactLinkId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "disposition": "string",
                  "handedOverAt": "2026-01-01T00:00:00.0000000+00:00",
                  "handoverRecordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "recoveryWindowExpiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/ContactHandoverRecordDto"
                }
              }
            },
            "description": "Handover recorded."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          }
        },
        "summary": "Hand over a contact on account closure",
        "tags": [
          "Contact Handover"
        ]
      }
    },
    "/api/v1/vaults/merge/preview": {
      "post": {
        "description": "Classifies the source vault's holdings against the target vault (metadata only) and returns the side-by-side breakdown. Commits nothing.",
        "operationId": "PreviewVaultMerge",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "sourceVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "targetVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/PreviewVaultMergeRequestDto"
              }
            },
            "application/json": {
              "example": {
                "sourceVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "targetVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/PreviewVaultMergeRequestDto"
              }
            },
            "text/json": {
              "example": {
                "sourceVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "targetVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/PreviewVaultMergeRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "conflictCount": 0,
                  "criticalConflictCount": 0,
                  "duplicateRetainedCount": 0,
                  "keptCount": 0,
                  "mergeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "previewedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "sourceHoldingCount": 0,
                  "sourceVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string",
                  "targetHoldingCount": 0,
                  "targetVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultMergePreviewDto"
                }
              }
            },
            "description": "The merge preview."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request (same vault, missing ids)."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not own both vaults."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "One of the vaults does not exist."
          }
        },
        "summary": "Preview an account merge",
        "tags": [
          "VaultMerge"
        ]
      }
    },
    "/api/v1/vaults/merge/{mergeId}/apply": {
      "post": {
        "description": "Commits the merge, recording an outcome for every item — including unreadable documents (never dropped) — and returns the receipt.",
        "operationId": "ApplyVaultMerge",
        "parameters": [
          {
            "in": "path",
            "name": "mergeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "appliedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "items": [],
                  "mergeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "mergedCount": 0,
                  "skippedCount": 0,
                  "status": "string",
                  "unreadableCount": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultMergeReceiptDto"
                }
              }
            },
            "description": "The reconciliation receipt (per-item outcomes)."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not own the merge."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The merge does not exist."
          }
        },
        "summary": "Apply an account merge",
        "tags": [
          "VaultMerge"
        ]
      }
    },
    "/api/v1/vaults/merge/{mergeId}/conflicts": {
      "get": {
        "description": "Returns the critical (needs-human) and auto-resolvable conflicts for the given holding domain.",
        "operationId": "GetVaultMergeConflicts",
        "parameters": [
          {
            "in": "path",
            "name": "mergeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "domain",
            "schema": {
              "default": "documents",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "autoResolved": [],
                  "critical": [],
                  "domain": "string",
                  "mergeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/MergeConflictsDto"
                }
              }
            },
            "description": "The conflict split (critical vs auto-resolved)."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not own the merge."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The merge does not exist."
          }
        },
        "summary": "List merge conflicts",
        "tags": [
          "VaultMerge"
        ]
      }
    },
    "/api/v1/vaults/merge/{mergeId}/conflicts/stage": {
      "post": {
        "description": "Records the caller's resolution choice for each named conflict. Commits nothing to the vaults.",
        "operationId": "StageVaultMergeConflicts",
        "parameters": [
          {
            "in": "path",
            "name": "mergeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "resolutions": []
              },
              "schema": {
                "$ref": "#/components/schemas/StageMergeConflictsRequestDto"
              }
            },
            "application/json": {
              "example": {
                "resolutions": []
              },
              "schema": {
                "$ref": "#/components/schemas/StageMergeConflictsRequestDto"
              }
            },
            "text/json": {
              "example": {
                "resolutions": []
              },
              "schema": {
                "$ref": "#/components/schemas/StageMergeConflictsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "autoResolved": [],
                  "critical": [],
                  "domain": "string",
                  "mergeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/MergeConflictsDto"
                }
              }
            },
            "description": "The refreshed conflict list."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid resolution payload."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller does not own the merge."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The merge does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "A resolution targets a non-conflict item or an already-applied merge."
          }
        },
        "summary": "Stage merge conflict resolutions",
        "tags": [
          "VaultMerge"
        ]
      }
    },
    "/api/v1/vaults/newborn/by-vault/{vaultId}": {
      "get": {
        "description": "The provisioning status and seed manifest for a newborn vault, addressed by the vault.",
        "operationId": "GetNewbornVaultProvisioningByVault",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "episodeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "graduationDate": "2026-01-01",
                  "inheritedShareCount": 0,
                  "inheritedSharesVerifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "jurisdiction": "string",
                  "motherUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "newbornUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "provisioningAuditReference": "string",
                  "seedRecords": [],
                  "status": "string",
                  "supervisedProvisioningId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/NewbornVaultProvisioningDto"
                }
              }
            },
            "description": "The provisioning."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault was not provisioned from a maternity finalisation, <em>or</em> the caller is neither\r\nthe mother nor the newborn — the same status for both."
          }
        },
        "summary": "Get the newborn-vault provisioning that produced a vault",
        "tags": [
          "NewbornVaults"
        ]
      }
    },
    "/api/v1/vaults/newborn/{episodeId}": {
      "get": {
        "description": "The provisioning status, seed manifest, verified inherited-share count and audit reference for a finalised maternity episode.",
        "operationId": "GetNewbornVaultProvisioning",
        "parameters": [
          {
            "in": "path",
            "name": "episodeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "episodeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "graduationDate": "2026-01-01",
                  "inheritedShareCount": 0,
                  "inheritedSharesVerifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "jurisdiction": "string",
                  "motherUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "newbornUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "provisioningAuditReference": "string",
                  "seedRecords": [],
                  "status": "string",
                  "supervisedProvisioningId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/NewbornVaultProvisioningDto"
                }
              }
            },
            "description": "The provisioning."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No provisioning for that episode, <em>or</em> the caller is neither the mother nor the\r\nnewborn — the same status for both."
          }
        },
        "summary": "Get a newborn-vault provisioning",
        "tags": [
          "NewbornVaults"
        ]
      },
      "post": {
        "description": "Creates the newborn's own client-encrypted vault under guardian supervision, with zero shares inherited from the mother's maternity record.",
        "operationId": "ProvisionNewbornVault",
        "parameters": [
          {
            "in": "path",
            "name": "episodeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "authenticationTag": "string",
                "graduationDate": "2026-01-01",
                "initializationVector": "string",
                "jurisdiction": "string",
                "keyId": "string",
                "salt": "string",
                "vaultName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionNewbornVaultRequestDto"
              }
            },
            "application/json": {
              "example": {
                "authenticationTag": "string",
                "graduationDate": "2026-01-01",
                "initializationVector": "string",
                "jurisdiction": "string",
                "keyId": "string",
                "salt": "string",
                "vaultName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionNewbornVaultRequestDto"
              }
            },
            "text/json": {
              "example": {
                "authenticationTag": "string",
                "graduationDate": "2026-01-01",
                "initializationVector": "string",
                "jurisdiction": "string",
                "keyId": "string",
                "salt": "string",
                "vaultName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionNewbornVaultRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "episodeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "graduationDate": "2026-01-01",
                  "inheritedShareCount": 0,
                  "inheritedSharesVerifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "jurisdiction": "string",
                  "motherUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "newbornUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "provisioningAuditReference": "string",
                  "seedRecords": [],
                  "status": "string",
                  "supervisedProvisioningId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/NewbornVaultProvisioningDto"
                }
              }
            },
            "description": "The newborn's vault was provisioned."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No finalised maternity episode is available to the caller — deliberately the same status\r\nwhether the episode does not exist or belongs to somebody else, so the route is not an\r\nexistence oracle for whether a given person has given birth."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The episode has already provisioned a newborn vault, or the newborn already holds one."
          },
          "503": {
            "description": "The entitlement service could not be reached; the write fails closed."
          }
        },
        "summary": "Provision a newborn's vault from a finalised maternity episode",
        "tags": [
          "NewbornVaults"
        ]
      }
    },
    "/api/v1/vaults/newborn/{episodeId}/seed-records/{sourceRecordId}": {
      "put": {
        "description": "Binds the newborn-vault document the client wrote for one nominated maternity record.",
        "operationId": "AttachNewbornSeedRecord",
        "parameters": [
          {
            "in": "path",
            "name": "episodeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "sourceRecordId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/AttachNewbornSeedRecordRequestDto"
              }
            },
            "application/json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/AttachNewbornSeedRecordRequestDto"
              }
            },
            "text/json": {
              "example": {
                "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/AttachNewbornSeedRecordRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "episodeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "graduationDate": "2026-01-01",
                  "inheritedShareCount": 0,
                  "inheritedSharesVerifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "jurisdiction": "string",
                  "motherUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "newbornUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "provisioningAuditReference": "string",
                  "seedRecords": [],
                  "status": "string",
                  "supervisedProvisioningId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/NewbornVaultProvisioningDto"
                }
              }
            },
            "description": "The updated provisioning."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The provisioning is not available to the caller, the source record was not nominated, or the\r\ndocument does not exist in the newborn's own vault."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault is not provisioned yet, or the record is already seeded by a different document."
          }
        },
        "summary": "Attach a seeded document to a nominated record",
        "tags": [
          "NewbornVaults"
        ]
      }
    },
    "/api/v1/vaults/rectification-notices": {
      "get": {
        "operationId": "RectificationNotices_GetMine",
        "parameters": [
          {
            "description": "Also return completed tasks.",
            "in": "query",
            "name": "includeCompleted",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RectificationNoticeDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "The caller's rectification tasks on this instance.",
        "tags": [
          "RectificationNotices"
        ]
      }
    },
    "/api/v1/vaults/rectification-notices/{id}/complete": {
      "post": {
        "operationId": "RectificationNotices_Complete",
        "parameters": [
          {
            "description": "The notice.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "committedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "completedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "receivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "recipientCompleteness": "string",
                  "recipientCount": 0,
                  "recordHeldHere": false,
                  "recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "rectificationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/RectificationNoticeDto"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "The caller's client reports a correction applied: the record re-encrypted, and re-shared\r\nwith any Art.19 recipients. Idempotent.",
        "tags": [
          "RectificationNotices"
        ]
      }
    },
    "/api/v1/vaults/returning-national/reconciliation/disputes": {
      "get": {
        "description": "Identifiers, stage, reason code, the user's own narrative and the disposition counts at stake — never vault content.",
        "operationId": "ListOpenReturningNationalReconciliationDisputes",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 100,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReconciliationDisputeQueueItemDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The open-dispute queue."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller does not hold the dispute-reviewer role."
          }
        },
        "summary": "List open returning-national reconciliation disputes (operator queue)",
        "tags": [
          "Returning-National Reconciliation"
        ]
      }
    },
    "/api/v1/vaults/returning-national/{intakeId}/reconciliation": {
      "get": {
        "description": "Replays the match decision and per-item disposition (and, once confirmed, the disposition log). Scoped to the owning user.",
        "operationId": "GetReturningNationalReconciliation",
        "parameters": [
          {
            "in": "path",
            "name": "intakeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "bootstrapDecisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "carryOverCount": 0,
                  "confirmedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deduplicatedCount": 0,
                  "disputeWindowClosesAt": "2026-01-01T00:00:00.0000000+00:00",
                  "disputeWindowHours": 0,
                  "disputes": [],
                  "homeVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "intakeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "items": [],
                  "leftBehindCount": 0,
                  "matchDecision": "string",
                  "originJurisdiction": "string",
                  "preparedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "reconciliationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "returningUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ReturningNationalReconciliationDto"
                }
              }
            },
            "description": "The reconciliation."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No reconciliation for this intake owned by the caller."
          }
        },
        "summary": "Get a returning-national reconciliation",
        "tags": [
          "Returning-National Reconciliation"
        ]
      },
      "post": {
        "description": "Computes the per-item disposition (carry-over / already-here-by-content-hash / stays-in-origin-by-residency-lock) from the client-submitted candidate manifest. Zero-knowledge — content hashes + classifications only.",
        "operationId": "PrepareReturningNationalReconciliation",
        "parameters": [
          {
            "in": "path",
            "name": "intakeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "candidates": [],
                "matchDecision": "string",
                "originJurisdiction": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/PrepareReconciliationRequestDto"
              }
            },
            "application/json": {
              "example": {
                "candidates": [],
                "matchDecision": "string",
                "originJurisdiction": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/PrepareReconciliationRequestDto"
              }
            },
            "text/json": {
              "example": {
                "candidates": [],
                "matchDecision": "string",
                "originJurisdiction": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/PrepareReconciliationRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "bootstrapDecisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "carryOverCount": 0,
                  "confirmedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deduplicatedCount": 0,
                  "disputeWindowClosesAt": "2026-01-01T00:00:00.0000000+00:00",
                  "disputeWindowHours": 0,
                  "disputes": [],
                  "homeVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "intakeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "items": [],
                  "leftBehindCount": 0,
                  "matchDecision": "string",
                  "originJurisdiction": "string",
                  "preparedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "reconciliationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "returningUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ReturningNationalReconciliationDto"
                }
              }
            },
            "description": "Reconciliation proposal prepared."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "A reconciliation already exists for this intake."
          },
          "503": {
            "description": "Entitlement/quota authority unavailable (fail-closed)."
          }
        },
        "summary": "Prepare a returning-national reconciliation proposal",
        "tags": [
          "Returning-National Reconciliation"
        ]
      }
    },
    "/api/v1/vaults/returning-national/{intakeId}/reconciliation/confirm": {
      "post": {
        "description": "Finalises the merge under explicit consent: provisions the home vault, records the disposition log (carried / deduplicated / left-behind) and chains to the EPIC 9 bootstrap decision for the EPIC 4/12 audit anchor.",
        "operationId": "ConfirmReturningNationalReconciliation",
        "parameters": [
          {
            "in": "path",
            "name": "intakeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "bootstrapDecisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "homeVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sameMeConsent": false
              },
              "schema": {
                "$ref": "#/components/schemas/ConfirmReconciliationRequestDto"
              }
            },
            "application/json": {
              "example": {
                "bootstrapDecisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "homeVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sameMeConsent": false
              },
              "schema": {
                "$ref": "#/components/schemas/ConfirmReconciliationRequestDto"
              }
            },
            "text/json": {
              "example": {
                "bootstrapDecisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "homeVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "sameMeConsent": false
              },
              "schema": {
                "$ref": "#/components/schemas/ConfirmReconciliationRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "bootstrapDecisionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "carryOverCount": 0,
                  "confirmedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deduplicatedCount": 0,
                  "disputeWindowClosesAt": "2026-01-01T00:00:00.0000000+00:00",
                  "disputeWindowHours": 0,
                  "disputes": [],
                  "homeVaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "intakeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "items": [],
                  "leftBehindCount": 0,
                  "matchDecision": "string",
                  "originJurisdiction": "string",
                  "preparedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "reconciliationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "returningUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ReturningNationalReconciliationDto"
                }
              }
            },
            "description": "Reconciliation confirmed."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No reconciliation for this intake owned by the caller."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Consent absent, or already confirmed."
          },
          "503": {
            "description": "Entitlement/quota authority unavailable (fail-closed)."
          }
        },
        "summary": "Confirm a returning-national reconciliation merge",
        "tags": [
          "Returning-National Reconciliation"
        ]
      }
    },
    "/api/v1/vaults/returning-national/{intakeId}/reconciliation/dispute": {
      "post": {
        "description": "'This isn't my vault'. A before-merge dispute halts the merge and queues the case for review; an after-merge dispute opens a reversal review inside the operator's stated window. Zero-knowledge — a reason code plus the user's own free text.",
        "operationId": "RaiseReturningNationalReconciliationDispute",
        "parameters": [
          {
            "in": "path",
            "name": "intakeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "detail": "string",
                "reason": "string",
                "stage": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RaiseReconciliationDisputeRequestDto"
              }
            },
            "application/json": {
              "example": {
                "detail": "string",
                "reason": "string",
                "stage": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RaiseReconciliationDisputeRequestDto"
              }
            },
            "text/json": {
              "example": {
                "detail": "string",
                "reason": "string",
                "stage": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/RaiseReconciliationDisputeRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "caseRef": "string",
                  "chainedToSignatureValue": "string",
                  "disposedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "dispositionNote": "string",
                  "intakeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "nextStep": "string",
                  "raisedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "reason": "string",
                  "reconciliationStatus": "string",
                  "stage": "string",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationDisputeDto"
                }
              }
            },
            "description": "Dispute recorded."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No reconciliation for this intake owned by the caller."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Dispute already open, wrong stage for the current state, or window closed."
          }
        },
        "summary": "Raise a dispute against a returning-national reconciliation",
        "tags": [
          "Returning-National Reconciliation"
        ]
      }
    },
    "/api/v1/vaults/returning-national/{intakeId}/reconciliation/dispute/disposition": {
      "post": {
        "description": "Uphold / reverse / decline. A reversal writes a compensating disposition log chained to the original confirmation rather than deleting it.",
        "operationId": "DisposeReturningNationalReconciliationDispute",
        "parameters": [
          {
            "in": "path",
            "name": "intakeId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "disposition": "string",
                "disputeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "note": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/DisposeReconciliationDisputeRequestDto"
              }
            },
            "application/json": {
              "example": {
                "disposition": "string",
                "disputeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "note": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/DisposeReconciliationDisputeRequestDto"
              }
            },
            "text/json": {
              "example": {
                "disposition": "string",
                "disputeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "note": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/DisposeReconciliationDisputeRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "caseRef": "string",
                  "chainedToSignatureValue": "string",
                  "disposedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "dispositionNote": "string",
                  "intakeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "nextStep": "string",
                  "raisedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "reason": "string",
                  "reconciliationStatus": "string",
                  "stage": "string",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationDisputeDto"
                }
              }
            },
            "description": "Disposition recorded."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller does not hold the dispute-reviewer role."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No reconciliation for this intake."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such open dispute, or inadmissible disposition for its stage."
          }
        },
        "summary": "Dispose of a returning-national reconciliation dispute (operator)",
        "tags": [
          "Returning-National Reconciliation"
        ]
      }
    },
    "/api/v1/vaults/search": {
      "post": {
        "description": "Cross-vault search over unencrypted document metadata. Resolves the caller's readable scope (owned vaults, vault-level grants and per-document consents) server-side and returns ranked hits plus category/access/date/schema/tag/vault facet counts (FR-05.027).",
        "operationId": "SearchAcrossVaults",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "access": [],
                "categories": [],
                "dateRange": "string",
                "page": 0,
                "pageSize": 0,
                "query": "string",
                "schemas": [],
                "tags": [],
                "vaultIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/CrossVaultSearchRequest"
              }
            },
            "application/json": {
              "example": {
                "access": [],
                "categories": [],
                "dateRange": "string",
                "page": 0,
                "pageSize": 0,
                "query": "string",
                "schemas": [],
                "tags": [],
                "vaultIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/CrossVaultSearchRequest"
              }
            },
            "text/json": {
              "example": {
                "access": [],
                "categories": [],
                "dateRange": "string",
                "page": 0,
                "pageSize": 0,
                "query": "string",
                "schemas": [],
                "tags": [],
                "vaultIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/CrossVaultSearchRequest"
              }
            }
          },
          "description": "Query, filters and paging."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "engine": "string",
                  "facetsWithheld": "string",
                  "instancesSearched": [],
                  "page": 0,
                  "pageSize": 0,
                  "query": "string",
                  "results": [],
                  "total": 0
                },
                "schema": {
                  "$ref": "#/components/schemas/CrossVaultSearchResponse"
                }
              }
            },
            "description": "Search completed successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid search parameters."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "A facet filter was sent and the caller's plan does not include faceted search, or the caller is under an administrative vault-access lock."
          },
          "503": {
            "description": "A facet filter was sent and the caller's entitlement could not be checked."
          }
        },
        "summary": "Search documents across every vault the caller can read",
        "tags": [
          "Cross-vault search"
        ]
      }
    },
    "/api/v1/vaults/search/scope": {
      "get": {
        "description": "Returns the ids of every vault the authenticated caller can search: owned vaults, vaults granted to them, and vaults holding a document shared directly with them.",
        "operationId": "GetSearchableVaultIds",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Searchable vault ids retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is under an administrative vault-access lock."
          }
        },
        "summary": "List the vaults the caller may search",
        "tags": [
          "Cross-vault search"
        ]
      }
    },
    "/api/v1/vaults/split-rebinds/{splitId}": {
      "get": {
        "description": "Viewer-relative: allocated/rebound/outstanding are resolved against the calling party. Visible only to the two parties to the split.",
        "operationId": "GetVaultSplitRebind",
        "parameters": [
          {
            "in": "path",
            "name": "splitId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "allocatedToCounterpart": 0,
                  "allocatedToYou": 0,
                  "committedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "completedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "containers": [],
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "itemCount": 0,
                  "manifestHash": "string",
                  "outstandingToCounterpart": 0,
                  "outstandingToYou": 0,
                  "reboundToCounterpart": 0,
                  "reboundToYou": 0,
                  "retainedShared": 0,
                  "splitId": "string",
                  "status": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultSplitRebindDto"
                }
              }
            },
            "description": "The rebind account."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such split, or the caller is not a party to it."
          }
        },
        "summary": "Read a partition's ownership-rebind account",
        "tags": [
          "Vault Split Rebind"
        ]
      }
    },
    "/api/v1/vaults/split-rebinds/{splitId}/containers": {
      "post": {
        "description": "Moves sole ownership of each named container the caller owns to the other party to the split and revokes the caller's container-level access. Bounded by the sealed manifest's per-party allocation counts.",
        "operationId": "RebindSplitContainers",
        "parameters": [
          {
            "in": "path",
            "name": "splitId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "containerIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/RebindSplitContainersRequestDto"
              }
            },
            "application/json": {
              "example": {
                "containerIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/RebindSplitContainersRequestDto"
              }
            },
            "text/json": {
              "example": {
                "containerIds": []
              },
              "schema": {
                "$ref": "#/components/schemas/RebindSplitContainersRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "outcomes": []
                },
                "schema": {
                  "$ref": "#/components/schemas/RebindSplitContainersResultDto"
                }
              }
            },
            "description": "Batch processed."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such split, or the caller is not a party to it."
          }
        },
        "summary": "Hand over containers under a committed partition",
        "tags": [
          "Vault Split Rebind"
        ]
      }
    },
    "/api/v1/vaults/supervised": {
      "post": {
        "description": "Places the minor's vault under guardian supervision bound to a graduation schedule, with the initial per-guardian role set.",
        "operationId": "SeedSupervisedVault",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "custodyOrderReference": "string",
                "graduationDate": "2026-01-01",
                "guardians": [],
                "jurisdiction": "string",
                "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/SeedSupervisedVaultRequestDto"
              }
            },
            "application/json": {
              "example": {
                "custodyOrderReference": "string",
                "graduationDate": "2026-01-01",
                "guardians": [],
                "jurisdiction": "string",
                "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/SeedSupervisedVaultRequestDto"
              }
            },
            "text/json": {
              "example": {
                "custodyOrderReference": "string",
                "graduationDate": "2026-01-01",
                "guardians": [],
                "jurisdiction": "string",
                "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/SeedSupervisedVaultRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "custodyOrderReference": "string",
                  "graduationDate": "2026-01-01",
                  "guardians": [],
                  "jurisdiction": "string",
                  "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisioningId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "reboundAt": "2026-01-01T00:00:00.0000000+00:00",
                  "reboundToAdultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "reboundTransitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SupervisedVaultDto"
                }
              }
            },
            "description": "The supervised vault was seeded."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not among the guardians they are assigning, <em>or</em> no active identity\r\nguardianship for the minor names the caller as a guardian (debt-2026-08-13-203)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The target vault does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault is already supervised, or is not owned by the minor."
          },
          "503": {
            "description": "The identity service could not be consulted to corroborate the guardianship. No supervision\r\nwas seeded, and this is deliberately NOT reported as a 403 — it says nothing about whether\r\nthe caller is a guardian. Carries `Retry-After`."
          }
        },
        "summary": "Seed a supervised (minor) vault",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supervised/minor": {
      "post": {
        "description": "Creates the minor's own client-encrypted vault and places it under guardian supervision bound to a graduation schedule, in one unit of work.",
        "operationId": "ProvisionMinorVault",
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "authenticationTag": "string",
                "custodyOrderReference": "string",
                "graduationDate": "2026-01-01",
                "guardians": [],
                "initializationVector": "string",
                "jurisdiction": "string",
                "keyId": "string",
                "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "vaultName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionMinorVaultRequestDto"
              }
            },
            "application/json": {
              "example": {
                "authenticationTag": "string",
                "custodyOrderReference": "string",
                "graduationDate": "2026-01-01",
                "guardians": [],
                "initializationVector": "string",
                "jurisdiction": "string",
                "keyId": "string",
                "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "vaultName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionMinorVaultRequestDto"
              }
            },
            "text/json": {
              "example": {
                "authenticationTag": "string",
                "custodyOrderReference": "string",
                "graduationDate": "2026-01-01",
                "guardians": [],
                "initializationVector": "string",
                "jurisdiction": "string",
                "keyId": "string",
                "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "salt": "string",
                "vaultName": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/ProvisionMinorVaultRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "custodyOrderReference": "string",
                  "graduationDate": "2026-01-01",
                  "guardians": [],
                  "jurisdiction": "string",
                  "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisioningId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "reboundAt": "2026-01-01T00:00:00.0000000+00:00",
                  "reboundToAdultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "reboundTransitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SupervisedVaultDto"
                }
              }
            },
            "description": "The minor's vault was provisioned and placed under supervision (also returned, unchanged, for a repeat of the same request)."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not among the guardians they are assigning, <em>or</em> no active identity\r\nguardianship for the minor names the caller as a guardian."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The minor already has a vault; supervise that one rather than creating a second."
          },
          "503": {
            "description": "The identity service could not be consulted to corroborate the guardianship. Nothing was\r\nprovisioned, and this is deliberately NOT reported as a 403 — it says nothing about whether\r\nthe caller is a guardian. Carries `Retry-After`."
          }
        },
        "summary": "Provision a minor's supervised vault",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supervised/proxy-exclusions": {
      "get": {
        "description": "What the caller has withheld, and from whom — their own record of the decision. Never visible to a guardian.",
        "operationId": "GetMyProxyExclusions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProxyExclusionDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The caller's elections (empty when they have made none)."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is the subject of no supervised vault."
          }
        },
        "summary": "List the caller's confidential elections (subject only)",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supervised/proxy-exclusions/{itemRef}": {
      "delete": {
        "description": "Stops withholding one item from a guardian's standing proxy.",
        "operationId": "RevokeProxyExclusion",
        "parameters": [
          {
            "in": "path",
            "name": "itemRef",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "guardianActorId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The election was revoked."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such election."
          }
        },
        "summary": "Revoke a confidential election (subject only)",
        "tags": [
          "SupervisedVaults"
        ]
      },
      "put": {
        "description": "Records the caller's confidential election over one item in their own supervised vault.",
        "operationId": "ElectProxyExclusion",
        "parameters": [
          {
            "in": "path",
            "name": "itemRef",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "guardianActorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ElectProxyExclusionRequestDto"
              }
            },
            "application/json": {
              "example": {
                "guardianActorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ElectProxyExclusionRequestDto"
              }
            },
            "text/json": {
              "example": {
                "guardianActorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/ElectProxyExclusionRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "electedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "exclusionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "guardianActorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "itemRef": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProxyExclusionDto"
                }
              }
            },
            "description": "The election (existing or newly recorded)."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller has no supervised vault, or the item is not in it."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The named principal holds no standing proxy over the vault."
          }
        },
        "summary": "Withhold an item from a guardian's proxy (subject only)",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supervised/proxy-preview/{guardianActorId}": {
      "get": {
        "description": "The rows a named guardian would be served, flagged with the caller's own confidential elections so the preview exercises the real projection.",
        "operationId": "GetGuardianProxyPreview",
        "parameters": [
          {
            "in": "path",
            "name": "guardianActorId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "guardianActorId": "string",
                  "items": [],
                  "notifications": [],
                  "subjectRef": "string",
                  "usage": []
                },
                "schema": {
                  "$ref": "#/components/schemas/GuardianProxyViewInputDto"
                }
              }
            },
            "description": "The flagged proxy input for that guardian."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is the subject of no supervised vault, or the named principal holds no standing\r\nproxy over it — one status for both, so this cannot be used as an oracle."
          }
        },
        "summary": "Preview a guardian's proxy view (subject only)",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supervised/{vaultId}": {
      "get": {
        "description": "The graduation schedule, per-guardian role set, and rebind status for a supervised vault.",
        "operationId": "GetSupervisedVault",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "custodyOrderReference": "string",
                  "graduationDate": "2026-01-01",
                  "guardians": [],
                  "jurisdiction": "string",
                  "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisioningId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "reboundAt": "2026-01-01T00:00:00.0000000+00:00",
                  "reboundToAdultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "reboundTransitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SupervisedVaultDto"
                }
              }
            },
            "description": "The supervised-vault provisioning."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault is not under supervision, <em>or</em> the caller is not a principal on the\r\nprovisioning. Deliberately the same status for both, so the route is not an existence\r\noracle for whether a vault belongs to a supervised child."
          }
        },
        "summary": "Get a supervised vault's provisioning",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supervised/{vaultId}/custody-transfer": {
      "post": {
        "description": "Records an evidenceable custody transfer: prior guardians and when their access ended, new custodians and their grant instant, the authoriser and the order reference.",
        "operationId": "TransferSupervisedVaultCustody",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "newCustodians": [],
                "orderReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/TransferCustodyRequestDto"
              }
            },
            "application/json": {
              "example": {
                "newCustodians": [],
                "orderReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/TransferCustodyRequestDto"
              }
            },
            "text/json": {
              "example": {
                "newCustodians": [],
                "orderReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/TransferCustodyRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "authorisedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "custodyTransferId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "newCustodians": [],
                  "orderReference": "string",
                  "priorGuardians": [],
                  "provisioningId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "revokedGuardianCount": 0,
                  "transferredAt": "2026-01-01T00:00:00.0000000+00:00",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodyTransferDto"
                }
              }
            },
            "description": "Custody was transferred and the record produced."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation (a missing order reference lands here)."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is on the provisioning but holds a subordinate guardian role; only the\r\nprovisioning parent or a Full guardian may transfer custody — deliberately the same\r\nauthority boundary as the guardian-roles route, so this is not a weaker door."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault is not under supervision, <em>or</em> the caller is not a principal on the\r\nprovisioning at all — the same status for both."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault has already rebound to the young adult; supervision has ended."
          }
        },
        "summary": "Transfer custody of a supervised vault",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supervised/{vaultId}/custody-transfers": {
      "get": {
        "description": "The vault's chain of custody, most recent first.",
        "operationId": "ListSupervisedVaultCustodyTransfers",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CustodyTransferDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The vault's custody history (empty when custody has never transferred)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault is not under supervision, <em>or</em> the caller is party to neither the\r\nprovisioning nor any of its transfers."
          }
        },
        "summary": "List a supervised vault's custody transfers",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supervised/{vaultId}/custody-transfers/{transferId}/certificate": {
      "get": {
        "description": "The custody-transfer record as a self-describing, exportable certificate.",
        "operationId": "GetSupervisedVaultCustodyTransferCertificate",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "transferId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "documentType": "string",
                  "documentVersion": "string",
                  "issuedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "jurisdiction": "string",
                  "supervisionStatus": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodyTransferCertificateDto"
                }
              }
            },
            "description": "The custody-transfer certificate."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The transfer does not exist, does not belong to the routed vault, or is not visible to the\r\ncaller — one status for all three, so the route cannot be probed."
          }
        },
        "summary": "Export a custody-transfer certificate",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supervised/{vaultId}/guardian-roles": {
      "put": {
        "description": "Replaces the per-guardian role set so co-guardians can hold distinct roles (full / contribute / view-only / emergency-only).",
        "operationId": "SetSupervisedVaultGuardianRoles",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "custodyOrderReference": "string",
                "guardians": []
              },
              "schema": {
                "$ref": "#/components/schemas/SetGuardianRolesRequestDto"
              }
            },
            "application/json": {
              "example": {
                "custodyOrderReference": "string",
                "guardians": []
              },
              "schema": {
                "$ref": "#/components/schemas/SetGuardianRolesRequestDto"
              }
            },
            "text/json": {
              "example": {
                "custodyOrderReference": "string",
                "guardians": []
              },
              "schema": {
                "$ref": "#/components/schemas/SetGuardianRolesRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "custodyOrderReference": "string",
                  "graduationDate": "2026-01-01",
                  "guardians": [],
                  "jurisdiction": "string",
                  "minorUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisionedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "provisioningId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "reboundAt": "2026-01-01T00:00:00.0000000+00:00",
                  "reboundToAdultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "reboundTransitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SupervisedVaultDto"
                }
              }
            },
            "description": "The guardian roles were reassigned."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is on the provisioning but holds a subordinate guardian role; only the\r\nprovisioning parent or a Full guardian may reassign the role set (debt-2026-08-13-201)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault is not under supervision, <em>or</em> the caller is not a principal on the\r\nprovisioning at all — the same status for both, so probing this route cannot reveal that a\r\nvault belongs to a supervised child."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault has already rebound to the young adult; supervision has ended."
          }
        },
        "summary": "Set per-guardian roles on a supervised vault",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supervised/{vaultId}/proxy-view": {
      "get": {
        "description": "The supervised vault as the authenticated guardian sees it, with every aggregate recomputed from the visible set.",
        "operationId": "GetGuardianProxyView",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "categories": [],
                  "guardianActorId": "string",
                  "itemCount": 0,
                  "items": [],
                  "notifications": [],
                  "subjectRef": "string",
                  "timeline": [],
                  "usage": []
                },
                "schema": {
                  "$ref": "#/components/schemas/GuardianProxyViewDto"
                }
              }
            },
            "description": "The projected view."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller holds no proven guardian seat over the vault."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The vault is not under supervision."
          }
        },
        "summary": "Read a guardian's projected proxy view",
        "tags": [
          "SupervisedVaults"
        ]
      }
    },
    "/api/v1/vaults/supplier-portal-upload-target": {
      "get": {
        "operationId": "GetSupplierPortalUploadTarget",
        "parameters": [
          {
            "description": "The signed upload-target request.",
            "in": "header",
            "name": "X-Upload-Authorization",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "algorithm": "string",
                  "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "publicKey": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/SupplierPortalUploadTargetDto"
                }
              }
            },
            "description": "The receiving vault and the key to seal to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request is missing, invalid or expired."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The buyer has no single active default organisation vault, or no active organisation key."
          }
        },
        "summary": "Resolve a supplier-portal upload's receiving vault and wrap key",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/vaults/trash/contacts": {
      "get": {
        "operationId": "ListTrashedContacts",
        "parameters": [
          {
            "in": "query",
            "name": "closure",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TrashedContactDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The recoverable trashed contacts."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          }
        },
        "summary": "List recoverable trashed contacts",
        "tags": [
          "Contact Handover"
        ]
      }
    },
    "/api/v1/vaults/trash/contacts/{linkId}/recover": {
      "post": {
        "operationId": "RecoverTrashedContact",
        "parameters": [
          {
            "in": "path",
            "name": "linkId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "closureContext": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contactLinkId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "disposition": "string",
                  "handedOverAt": "2026-01-01T00:00:00.0000000+00:00",
                  "handoverRecordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "ownerUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "recoveryWindowExpiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "status": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/ContactHandoverRecordDto"
                }
              }
            },
            "description": "The contact was recovered."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Caller is not authenticated."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No trashed contact with that link for this user."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The recovery window has already lapsed."
          }
        },
        "summary": "Recover a trashed contact",
        "tags": [
          "Contact Handover"
        ]
      }
    },
    "/api/v1/vaults/{vaultId}/access": {
      "get": {
        "description": "Retrieves all users with access to the vault. Requires at least Viewer access.",
        "operationId": "ListCollaborators",
        "parameters": [
          {
            "description": "The ID of the vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/VaultAccessDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Collaborators retrieved successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User does not have permission to view collaborators."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault not found."
          }
        },
        "summary": "List vault collaborators",
        "tags": [
          "Vault Access"
        ]
      },
      "post": {
        "description": "Grants access to a user with a specified role (Viewer, Editor, or Owner). Only vault owners can grant access.",
        "operationId": "GrantAccess",
        "parameters": [
          {
            "description": "The ID of the vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/GrantAccessRequest"
              }
            },
            "application/json": {
              "example": {
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/GrantAccessRequest"
              }
            },
            "text/json": {
              "example": {
                "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "schema": {
                "$ref": "#/components/schemas/GrantAccessRequest"
              }
            }
          },
          "description": "The grant access request."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "grantedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActive": false,
                  "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultAccessDto"
                }
              }
            },
            "description": "Access granted successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not the vault owner."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Vault not found."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User already has active access."
          }
        },
        "summary": "Grant vault access",
        "tags": [
          "Vault Access"
        ]
      }
    },
    "/api/v1/vaults/{vaultId}/access/{accessId}": {
      "delete": {
        "description": "Revokes a user's access to the vault. Only vault owners can revoke access. Owners cannot revoke their own access.",
        "operationId": "RevokeAccess",
        "parameters": [
          {
            "description": "The ID of the vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The ID of the access record to revoke.",
            "in": "path",
            "name": "accessId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Access revoked successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not the vault owner or attempting to revoke own access."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Access record not found."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Revoke rejected: would remove the last controlling Owner of the vault."
          }
        },
        "summary": "Revoke vault access",
        "tags": [
          "Vault Access"
        ]
      }
    },
    "/api/v1/vaults/{vaultId}/access/{accessId}/role": {
      "put": {
        "description": "Updates a user's role for the vault. Only vault owners can update roles. Owners cannot change their own role.",
        "operationId": "UpdateRole",
        "parameters": [
          {
            "description": "The ID of the vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The ID of the access record to update.",
            "in": "path",
            "name": "accessId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            }
          },
          "description": "The update role request."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "expiresAt": "2026-01-01T00:00:00.0000000+00:00",
                  "grantedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isActive": false,
                  "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/VaultAccessDto"
                }
              }
            },
            "description": "Role updated successfully."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request data."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not authenticated."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "User is not the vault owner or attempting invalid role change."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Access record not found."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Downgrade rejected: would remove the last controlling Owner of the vault."
          }
        },
        "summary": "Update user role",
        "tags": [
          "Vault Access"
        ]
      }
    },
    "/api/v1/vaults/{vaultId}/court-authority/documents/{documentId}": {
      "get": {
        "description": "Gates the read on EPIC 6's court-conferred-authority decision, evaluated per read. An ended, suspended or out-of-scope order is refused by the store, not merely logged.",
        "operationId": "ReadWardScopedDocument",
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "documentId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "authorityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "orderReference": "string",
                  "permittedActions": [],
                  "scopeCategory": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "wardId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CourtAuthorityScopedDocumentDto"
                }
              }
            },
            "description": "The document's authorising allocation, naming the order it was served under."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No court-conferred authority permits the access (every refusal reads alike)."
          },
          "503": {
            "description": "The Consent Service could not be consulted; retry after the advertised interval."
          }
        },
        "summary": "Read a ward's document under a court order",
        "tags": [
          "CourtAuthorityAccess"
        ]
      }
    },
    "/api/v1/vaults/{vaultId}/hand-over": {
      "get": {
        "operationId": "GetCustodyHandOverStatus",
        "parameters": [
          {
            "description": "The member organisation's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "completedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "memberOrganizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "message": "string",
                  "recordsSecured": 0,
                  "recordsTotal": 0,
                  "stage": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodyHandOverStatusDto"
                }
              }
            },
            "description": "The stage, the records secured so far, and the member-facing message."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, it was never custodial, or it is not the caller's."
          }
        },
        "summary": "Where the hand-over of the member's records stands, in words the member is shown.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/vaults/{vaultId}/hand-over/account-key": {
      "post": {
        "description": "Only the user the vault's ownership bound to at engagement. The organisation's key is provisioned when\r\nit has none, or taken over from custody when it still publishes the custodial key; a retry with the\r\nsame key is idempotent.",
        "operationId": "PublishMemberAccountKey",
        "parameters": [
          {
            "description": "The member organisation's custodial vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "algorithm": "string",
                "publicKey": "string",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/PublishMemberAccountKeyRequestDto"
              }
            },
            "application/json": {
              "example": {
                "algorithm": "string",
                "publicKey": "string",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/PublishMemberAccountKeyRequestDto"
              }
            },
            "text/json": {
              "example": {
                "algorithm": "string",
                "publicKey": "string",
                "wrappedMasterKey": "string",
                "wrappedPrivateKey": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/PublishMemberAccountKeyRequestDto"
              }
            }
          },
          "description": "The device-generated public key and the member's wrapped envelopes."
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "completedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "memberOrganizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "message": "string",
                  "recordsSecured": 0,
                  "recordsTotal": 0,
                  "stage": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/CustodyHandOverStatusDto"
                }
              }
            },
            "description": "Published; the hand-over status as now measured."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The body is malformed, or the key is the one the records were held in custody under."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, it was never custodial, or the caller is not the member it bound to."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Custody is not pending hand-over, or the organisation already publishes a key of its own."
          }
        },
        "summary": "The engaging member's device publishes the member organisation's own key and becomes its key-holder,\r\nwhich starts securing the records to the member's account.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/vaults/{vaultId}/hand-over/custody-keys": {
      "get": {
        "description": "Only the vault's bound owner who is an active holder of the member organisation's key. Each key reads\r\n`delivered` (with its envelope), `awaiting-delivery` or `sealed-to-replaced-key`; the whole reads\r\n`handed-over` once custody has ended and nothing is delivered any longer.",
        "operationId": "GetMemberCustodyKeys",
        "parameters": [
          {
            "description": "The member's vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "keys": [],
                  "memberOrganizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "state": "string",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/MemberCustodyKeysDto"
                }
              }
            },
            "description": "The custody keys and where each stands."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No such vault, it was never custodial, or the caller is not its member holding the organisation's key."
          }
        },
        "summary": "The member's device fetches the custody keys its records are still held under, each delivered by its sponsor\r\nsealed to the member organisation's own key, so it can open those records and re-wrap them to its account.",
        "tags": [
          "CustodyHandOver"
        ]
      }
    },
    "/api/v1/vaults/{vaultId}/supplier-portal-documents": {
      "post": {
        "operationId": "AddSupplierPortalDocument",
        "parameters": [
          {
            "description": "The buyer's organisation vault.",
            "in": "path",
            "name": "vaultId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The single-use upload authorisation.",
            "in": "header",
            "name": "X-Upload-Authorization",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "encryptedContent": "string",
                "fileName": "string",
                "initializationVector": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/SupplierPortalDocumentUploadRequestDto"
              }
            },
            "application/json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "encryptedContent": "string",
                "fileName": "string",
                "initializationVector": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/SupplierPortalDocumentUploadRequestDto"
              }
            },
            "text/json": {
              "example": {
                "algorithmVersion": 0,
                "authenticationTag": "string",
                "encryptedContent": "string",
                "fileName": "string",
                "initializationVector": "string",
                "keyGeneration": 0,
                "keyId": "string",
                "mimeType": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/SupplierPortalDocumentUploadRequestDto"
              }
            }
          },
          "description": "The sealed document."
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "archivedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentFormat": "string",
                  "contentHash": "string",
                  "createdAt": "2026-01-01T00:00:00.0000000+00:00",
                  "deletedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "description": "string",
                  "encryptionAlgorithm": "string",
                  "fields": [],
                  "fileName": "string",
                  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "isArchived": false,
                  "isDeleted": false,
                  "isSuperseded": false,
                  "keyId": "string",
                  "mimeType": "string",
                  "modifiedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "rowVersion": "string",
                  "schemaRef": "string",
                  "schemaVersion": "string",
                  "sensitivityLabel": "string",
                  "sensitivityLabelConfirmed": false,
                  "sensitivityLabelDowngradeRequested": "string",
                  "sizeBytes": 0,
                  "statusOnly": false,
                  "supersededAt": "2026-01-01T00:00:00.0000000+00:00",
                  "supersededByDocumentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "tags": [],
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "version": 0,
                  "withdrawalReasonCode": "string",
                  "withdrawnAt": "2026-01-01T00:00:00.0000000+00:00"
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentDto"
                }
              }
            },
            "description": "Stored."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The authorisation is missing, invalid, expired, or not bound to this vault and content."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The authorisation has already been used, or the vault refuses the write (duplicate content, inactive vault)."
          }
        },
        "summary": "Store a supplier-portal upload under a single-use authorisation",
        "tags": [
          "Documents"
        ]
      }
    },
    "/api/v1/wards/{childId}/accept-ownership": {
      "post": {
        "description": "The now-adult records their client-side UMK re-wrap, revoking any residual guardian access and confirming sole key-custody.",
        "operationId": "AcceptWardVaultOwnership",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "example": {
                "keyCustodyReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AcceptWardOwnershipRequestDto"
              }
            },
            "application/json": {
              "example": {
                "keyCustodyReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AcceptWardOwnershipRequestDto"
              }
            },
            "text/json": {
              "example": {
                "keyCustodyReference": "string"
              },
              "schema": {
                "$ref": "#/components/schemas/AcceptWardOwnershipRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "adultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "keyCustodyReference": "string",
                  "ownershipAcceptedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "residualGuardianViewsRevoked": 0,
                  "soleKeyCustodyConfirmed": false,
                  "transitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "verificationCode": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/WardOwnershipAcceptedDto"
                }
              }
            },
            "description": "Ownership accepted; sole key-custody confirmed."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The request failed validation (e.g. missing key-custody reference)."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The caller is not the young adult the vault was rebound to."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No completed majority handover exists for this ward."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Ownership was already accepted with a different key-custody reference (write-once)."
          }
        },
        "summary": "Accept ward vault ownership (UMK re-wrap)",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/wards/{childId}/handover-certificate": {
      "get": {
        "description": "Majority date, jurisdiction, revocation timestamp, records transferred, sole-key-custody and a verifiable code.",
        "operationId": "GetWardHandoverCertificate",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "adultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "guardianAccessRevokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "jurisdiction": "string",
                  "majorityDate": "2026-01-01",
                  "recordsByClass": [],
                  "recordsTransferred": 0,
                  "soleKeyCustodyConfirmed": false,
                  "transitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "verificationCode": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/HandoverCertificateDto"
                }
              }
            },
            "description": "The handover certificate."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No handover has completed for this ward."
          }
        },
        "summary": "Majority handover certificate",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/wards/{childId}/handover-confirmation": {
      "get": {
        "description": "Guardian-access-revocation date + the full former-guardian feed proving zero guardians remain.",
        "operationId": "GetWardHandoverConfirmation",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "adultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "formerGuardians": [],
                  "jurisdiction": "string",
                  "remainingGuardianCount": 0,
                  "revokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "transitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/HandoverConfirmationDto"
                }
              }
            },
            "description": "The handover confirmation."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No handover has completed for this ward."
          }
        },
        "summary": "Verified-majority handover confirmation",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/wards/{childId}/residual-visibility": {
      "get": {
        "description": "For each record category, whether a former guardian retains a view vs it is private to the young adult.",
        "operationId": "GetWardResidualVisibility",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "categories": [],
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/ResidualVisibilityDto"
                }
              }
            },
            "description": "The residual-visibility projection."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No handover has completed for this ward."
          }
        },
        "summary": "Per-category residual-guardian visibility",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/wards/{childId}/revocation-proof": {
      "get": {
        "description": "Ownership rebound + every guardian's access ended, with the transition reference the audit chain anchors.",
        "operationId": "GetWardRevocationProof",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "adultUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "guardianAccessRevokedAt": "2026-01-01T00:00:00.0000000+00:00",
                  "ownershipReboundAt": "2026-01-01T00:00:00.0000000+00:00",
                  "revokedGuardians": [],
                  "transitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "verificationCode": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/RevocationProofDto"
                }
              }
            },
            "description": "The revocation proof."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No handover has completed for this ward."
          }
        },
        "summary": "Verified-majority revocation proof",
        "tags": [
          "MinorTransitions"
        ]
      }
    },
    "/api/v1/wards/{childId}/transition-prep": {
      "get": {
        "description": "Live content groups (categories + counts) for the ward vault plus whether the handover has completed.",
        "operationId": "GetWardTransitionPrep",
        "parameters": [
          {
            "in": "path",
            "name": "childId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "childUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "contentGroups": [],
                  "handoverCompleted": false,
                  "totalDocuments": 0,
                  "vaultId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                },
                "schema": {
                  "$ref": "#/components/schemas/TransitionPrepDto"
                }
              }
            },
            "description": "The content-group summary."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "string",
                  "instance": "string",
                  "status": 0,
                  "title": "string",
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "The ward owns no vault."
          }
        },
        "summary": "Ward vault content-group summary",
        "tags": [
          "MinorTransitions"
        ]
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "tags": [
    {
      "description": "The Vault's EPIC 96 mediated store-capability surface (FR-PMD.003/.004): a thin HTTP\r\nwrapper over the store capability implementation, so the Presentation Mediator can\r\nenumerate descriptors, open one credential body, and request on-device signing —\r\neach ONLY under a mediator-issued disclosure-decision reference which the store\r\nvalidates against the issuing mediator itself, never the caller's word.",
      "name": "MediatedAccess"
    },
    {
      "description": "Windowed decrypt-access reconstruction — the EPIC 2 base capability the account-takeover recovery\r\njourney needs (journey: account-takeover-identity-compromise-recovery, debt-2026-07-06-010).",
      "name": "AccessReconstruction"
    },
    {
      "description": "Account-merge journey seam (journey: account-merge-consolidate-duplicate-identities,\r\ndebt-2026-07-07-070). Exposes the vault base capability the journey's Step-3\r\n`BulkConflictTriage` panel needs, at the route the panel calls:\r\n<list type=\"bullet\"><item>`GET /account/merge/{id}/conflicts` — the pre-confirm bulk conflict queue, with the\r\n  non-critical collisions already auto-resolved server-side and only the critical ones\r\n  surfaced for triage;</item><item>`POST /account/merge/{id}/resolutions` — accept the per-conflict resolution set the\r\n  user chose, ahead of the merge commit.</item></list>\r\nThis is a thin adapter over the existing `VaultMerge` reconciliation aggregate (the\r\nvault-to-vault surface at `/vaults/merge`); it reuses the same domain invariants and\r\nownership checks but projects the journey's flat conflict-queue shape. Zero-knowledge: only ids,\r\ncounts and metadata labels cross the wire — never plaintext content or field values.",
      "name": "AccountMerge"
    },
    {
      "description": "EPIC 2's half of the <b>EPIC 9 → EPIC 2 account-state → vault-access contract</b> (FR-02.043):\r\nwhen platform administration moves an account's administrative status, this is where the\r\nsubject's vault access moves with it.",
      "name": "AdministrativeVaultAccess"
    },
    {
      "description": "Vault-side base capability for power-of-attorney scoped vault access (journey:\r\npower-of-attorney-delegated-access, debt-2026-07-03-101 / 102 / 103). A donor provisions an\r\nattorney a time-boxed, field/document/category-scoped read authority derived from the donor's\r\nPoA authority record; the attorney's first-access landing states whose vault / which authority /\r\nwhat is in scope / what is permitted / the audit notice; and every scoped read is gated at the\r\nvault seam — in-scope reads return the authorising allocation and are logged, out-of-scope reads\r\nare withheld (403) and logged. This resolves the attorney's \"donors I represent + per-donor\r\nfield scope\" to real, authorised in-scope documents rather than \"just an email\".\r\n            \r\nThe caller is always bound from the authenticated principal, never the body: only a vault owner\r\n(donor) may provision/revoke a scope over their own vault and read its attorney-action audit\r\ntrail; only the named attorney may land on and read a scoped vault. Zero-knowledge: opaque\r\nfield-id tokens, category names, ids, decisions and timestamps only cross the wire.",
      "name": "AttorneyScope"
    },
    {
      "description": "EPIC 102 D11 — a care provider delivers signed, sealed child-health entries into a child's own vault,\r\non a live care link the child's guardian granted the provider's organisation.",
      "name": "CareLinkDeliveries"
    },
    {
      "description": "Controller for managing document categories within vaults.",
      "name": "Categories"
    },
    {
      "description": "Vault-side base capability for the `co-parenting-shared-child-records-and-consent` journey\r\n(debt-2026-07-04-087): the co-custodianship <b>shared-records space</b> that lists both custodial\r\nparents of a child with their capabilities. Seeded from the EPIC 30 family graph (seam 30→2,\r\n`Family.Child.CustodianshipLinkedEvent`) so co-custodianship is <em>visible</em> and neither\r\nparent's access is granted at the other's discretion.\r\n            \r\n\n\r\nThis surface exposes the read path the journey composes over. The roster is populated by the\r\nfamily-graph seam consumer, not by a client call — there is deliberately no \"add custodian\"\r\nendpoint here (custodianship is an EPIC 30 authority decision, mirrored into the vault). The read\r\nis guarded: only an active custodian of the child may see the space (IDOR guard). Zero-knowledge:\r\nidentifiers, roles and capability labels only — never plaintext child records.\r\n",
      "name": "ChildSharedSpace"
    },
    {
      "description": "Vault-side <b>contact-handover</b> primitives for the `contact-handover-on-account-closure`\r\njourney (EPIC 2 base capability, debt-2026-07-04-098). When a user closes their account they\r\ndecide, per contact, whether to <b>keep a copy</b> (retained under their ownership) or\r\n<b>purge</b> it into a Trash / Recently-Deleted store with a recovery window. A purged contact\r\nis recoverable until the window lapses; once it lapses the contact is erased and a timestamped\r\n<b>erasure attestation</b> (content digest) is produced — distinct from recoverable soft-delete.\r\n            \r\n\n\r\nZero-knowledge: the server holds only identifiers and a content digest (a SHA-256 hash of the\r\ncontact's ciphertext envelope) — never plaintext contact content or a key. Handover, recovery\r\nand erasure are rights the user exercises over their own data, so they are not entitlement-\r\ngated. Erasure is a soft state transition, never a hard delete (DAT-002).\r\n",
      "name": "ContactHandover"
    },
    {
      "description": "Vault-side enforcement of the <b>court-conferred authority</b> access basis — a Court of\r\nProtection deputy reading their ward's vault under a court order (journey\r\n`deputyship-court-of-protection-application`, gap G3; debt-2026-08-23-104).",
      "name": "CourtAuthorityAccess"
    },
    {
      "description": "EPIC 92 FR-OBP.073 / FR-OBP.012 (as amended) — the hand-over of a programme member's custodial vault:\r\nthe member watches its records being secured to its own account, and the custodian (sponsor)\r\norganisation records that it destroyed its custody once every record is.",
      "name": "CustodyHandOver"
    },
    {
      "description": "User dashboard read surface. Returns REAL aggregates over the authenticated user's own\r\nvault data (never fabricated) — the web dashboard's category tiles are driven by this.",
      "name": "Dashboard"
    },
    {
      "description": "Controller for FR-02.019 — organisation-initiated data requests.\r\nAn organisation requests specific fields from a user who reviews and approves\r\nfield-level sharing via QR code or the platform UI.",
      "name": "DataRequests"
    },
    {
      "description": "Vault-side base capability for on-behalf delegated writes (journey:\r\nexecutive-assistant-delegated-contact-management, debt-2026-07-03-143). Records the\r\n(delegate, principal) actor pair for each write a delegate makes on a principal's vault, so\r\nend-to-end non-repudiation holds — \"assistant X wrote this as delegate of executive Y\" — which\r\nthe platform's single-writer audit column alone cannot express. The principal reads back their\r\nown feed of who acted on their behalf.\r\n            \r\nThe delegate is bound from the authenticated request principal, never the body, so a caller\r\ncannot forge who performed the write. Zero-knowledge: only identifiers, an operation kind, a\r\nresource type/id, timestamps and an optional short justification cross the wire.",
      "name": "DelegatedWrites"
    },
    {
      "description": "Vault-side surface of the bulk consent-revocation cascade (FR-02.030, journey\r\n`bulk-consent-review-and-revocation`). Lets the consent-revocation UI:\r\n<list type=\"bullet\"><item>PREVIEW the derived shares / cached copies a set of consent revocations\r\nwould tear down, before the user commits (debt-2026-07-04-018);</item><item>REGISTER a durable revocation batch so teardown can be reconciled by id;</item><item>RECONCILE a batch — confirmed vs pending teardown counts as the async\r\ncascade completes (debt-2026-07-04-019).</item></list>\r\nAll surfaces are metadata-only and owner-scoped (zero-knowledge): a caller only\r\never sees teardown counts for their own consents and shares.",
      "name": "DerivedShares"
    },
    {
      "description": "Read surface for a document's server-observed access trail and its aggregate counters.",
      "name": "DocumentActivity"
    },
    {
      "description": "The service-only document-ownership check, split out of Essence.Core.Vault.Api.Controllers.DocumentsController (#17094)\r\nbecause that controller's class-level `[RequiresCapability(\"cap.vault\")]` would still gate a\r\nservice principal, and a capability exemption cannot sit under it (CAP-B).",
      "name": "DocumentOwnership"
    },
    {
      "description": "Controller for managing encrypted documents within vaults (CRUD + search).\r\nVersioning lives on Essence.Core.Vault.Api.Controllers.DocumentVersionsController, per-document\r\nshare management on Essence.Core.Vault.Api.Controllers.DocumentSharesController, and the public\r\nshare-token endpoint on Essence.Core.Vault.Api.Controllers.SharesController.",
      "name": "Documents"
    },
    {
      "description": "Controller for managing per-document shares (authenticated, vault-owner only).\r\nThe public share-token endpoint lives on Essence.Core.Vault.Api.Controllers.SharesController.\r\nRoutes are nested under `/api/v{version:apiVersion}/documents/{id}/shares`.",
      "name": "DocumentShares"
    },
    {
      "description": "Manage a document's tags — the searchable plaintext metadata of FR-02.022 / FR-02.033.",
      "name": "DocumentTags"
    },
    {
      "description": "Controller for document version history, snapshots, rollback, and comparison.\r\nRoutes are nested under `/api/v{version:apiVersion}/documents/{id}/versions`.",
      "name": "DocumentVersions"
    },
    {
      "description": "Bequest-scoped posthumous document read surface (debt-2026-07-06-041) — the base Vault capability\r\nthe `estate-vault-handover-to-executor-via-shamir` journey needs. An estate owner declares,\r\nwhile alive, which documents they leave to which executor; a verified estate release unlocks the\r\nexecutor's \"documents left to you\" projection. This is deliberately distinct from field-level\r\nsharing (FR-02.014/034), which requires a live owner's consent — here the lawful basis is the\r\nverified estate release, not a consent grant.",
      "name": "EstateBequests"
    },
    {
      "description": "Vault-side base capability for the family-plan-member-shared-documents journey\r\n(debt-2026-07-05-024). Lets an authenticated family-plan owner provision a family member's own\r\nindependent, client-encrypted vault under the owner's family plan — the endpoint the EPIC 30\r\n`FamilyMemberProvisioningScreen.onProvision` calls (until it lands the screen guards with a\r\ndisabled CTA).\r\n            \r\n\n\r\nZero-knowledge: the member supplies their own client-side encryption material; the server never\r\nsees plaintext or the member's key. \"Billed to the owner's family plan\" is realised by\r\nattributing the vault-creation usage event to the sponsor (EPIC 2 is non-billable telemetry\r\nonly, Decision D-1).\r\n",
      "name": "FamilyMemberVaults"
    },
    {
      "description": "Vault-side base capability for the guardian multi-ward roster (ESS-QA-009 debt 417). Serves the\r\nconsolidated ward list the Family (EPIC 30) guardian console composes\r\n(`minorTransitionApi.listWards` → `GET /api/v1/family/wards`): every ward the\r\nauthenticated guardian manages, with its supervised→adult lifecycle status, next-transition\r\n(graduation) date, per-guardian role set, and custody reference — all read from the EPIC-2\r\nEssence.Core.Vault.Application.Queries.FamilyWards.GetGuardianWardsQuery over the\r\n`SupervisedVaultProvisioning` aggregate, the authoritative home of the\r\nminor↔guardian↔vault↔graduation-schedule relationship.\r\n            \r\n\n\r\nThis controller is mounted at the `/family/wards` prefix the SPA calls; the per-ward\r\ntransition surfaces (transition-prep, revocation-proof, …) remain on\r\nEssence.Core.Vault.Api.Controllers.MinorTransitionsController at `/wards/{childId}`. The list is strictly scoped\r\nto the authenticated guardian — a guardian can never enumerate another guardian's wards (IDOR).\r\nZero-knowledge: only identifiers, roles, jurisdiction, a derived status and dates cross the wire;\r\nthe ward's display name and calendar age are EPIC-30-owned enrichment and are returned null here\r\n(never fabricated).\r\n",
      "name": "FamilyWards"
    },
    {
      "description": "Controller for field-level sharing — the core differentiator of Essence.\r\nUsers share individual fields within Documents, not entire documents.",
      "name": "FieldShares"
    },
    {
      "description": "Controller for subscription-based field sharing (FR-02.018).\r\nSubscribers receive synced updates whenever a subscribed field changes,\r\nenabling automatic propagation of field values to authorised recipients.",
      "name": "FieldSubscriptions"
    },
    {
      "description": "The animals a user holds, as first-class records (#12914, debt-2026-08-22-001) — the subject a\r\nkeeper change (Essence.Core.Vault.Api.Controllers.KeeperChangesController) hands on and a vet-practice transfer names.",
      "name": "HeldSubjects"
    },
    {
      "description": "Vault-side base capability for the `household-shared-address-book-governance` journey\r\n(debt-2026-07-05-013): the co-owned, client-encrypted <b>contact-vault container</b> the EPIC 19\r\nshared address book anchors to (`SharedAddressBook.vaultContainerRef`). Household members\r\nopen a container, bulk-pool client-encrypted contacts into it, and read the consent-scoped\r\nshared view.\r\n            \r\n\n\r\nZero-knowledge: each pooled contact is stored as a per-contributor AES-256-GCM ciphertext\r\nenvelope sealed on the contributor's device; the server never sees plaintext contact content or\r\na contributor's key. The household book is a shared <em>view</em>, not a plaintext copy.\r\n",
      "name": "HouseholdContainers"
    },
    {
      "description": "#21849 (EPIC 9 FR-09.050) — a credential issuer deposits a W3C credential it has just issued into the holder's\r\nown default personal vault, sealed to the holder's published key.",
      "name": "IssuedCredentialDeposits"
    },
    {
      "description": "Keeper-change capability (journey: pet-microchip-ownership-transfer-on-rehoming,\r\ndebt-2026-07-03-087). The EPIC 2 base capability the essence-web keeper-change\r\nsurface (KeeperChangePage) consumes.",
      "name": "KeeperChanges"
    },
    {
      "description": "Vault-side base capability for the minor→adult majority handover (FR-02 journey seam,\r\ndebt-2026-07-03-097/-120/-167/-157). Exposes the read surfaces the Family (EPIC 30) and\r\nIdentity (EPIC 9) gateways compose for the `minorTransitionApi` /\r\n`adulthoodHandoverApi` seams: pre-transition prep, post-transition revocation proof,\r\nwho-has-access handover confirmation, per-category residual visibility, and the handover\r\ncertificate. The state itself is produced by\r\nEssence.Core.Vault.Application.EventConsumers.MinorTransitionCompletedEventConsumer when the\r\nFamily child-transition-completed event is consumed.\r\n            \r\nEndpoints that read the post-transition snapshot return 404 until a handover has completed,\r\nso the seam client degrades honestly to \"pending base capability\". Zero-knowledge: only\r\nidentifiers, roles, category names, counts, timestamps and the verification code cross the\r\nwire — never plaintext content or display names.\r\n            \r\n<b>Authorization.</b> Every route here takes `{childId}` from the URL, so it is\r\nattacker-controlled and `[Authorize]` alone proves only that the caller is <em>some</em>\r\nauthenticated user. Each action therefore binds the routed ward to the authenticated principal\r\nvia Essence.Core.Vault.Application.Authorization.IWardTransitionAccessPolicy: the ward/young adult\r\nreads their own record, an active guardian reads only the pre-transition prep view for a ward\r\nthey are recorded against, and a guardian whose supervision has already rebound at majority\r\nreads nothing. A refusal returns the same 404 an absent record does, so these endpoints are not\r\nan existence oracle for whether an account is a supervised minor.",
      "name": "MinorTransitions"
    },
    {
      "description": "The module-scoped portable export (#14693 / debt-2026-08-20-010, journey\r\n`customer-switches-between-competing-marketplace-modules`): the vault-side measurement of\r\nexactly the records a named module holds for an organisation, with the record count a module\r\nswitch's reconciliation is measured AGAINST, rather than the target module's own count of what\r\nit received.",
      "name": "ModuleRecordExports"
    },
    {
      "description": "Vault-side base capability for the\r\n`deed-poll-legal-name-change-to-official-credential-reissue` journey (debt-2026-07-03-128):\r\nthe credential + regulated-KYC <b>reissue flow</b>. After the identity is re-attested under a new\r\nname (EPIC 9), this surface exposes, per name-change session: the cross-EPIC cascade status (the\r\nper-credential reissue feed + relying-party coverage the status tracker renders) and the reissue\r\ntrigger for each credential — standard credentials reissue directly, regulated credentials run a\r\nKYC re-verification whose result is recorded. Every reissue binds the deed-poll document id as\r\nevidence and carries an EPIC 4 audit anchor.\r\n            \r\n\n\r\nThe cascade is seeded by the EPIC 9 re-attestation seam (there is deliberately no client\r\n\"provision\" endpoint). Both reads and writes are owner-guarded: a missing cascade or a non-owner\r\ncaller returns 404 — collapsing the existence oracle over the high-entropy change id, and letting\r\nthe journey seam degrade honestly to a pending base capability. Zero-knowledge: identifiers,\r\nstates, the KYC result and audit anchors only — never plaintext credential content.\r\n",
      "name": "NameChangeReissue"
    },
    {
      "description": "Newborn (dependent) vault base capability — the EPIC 21 → EPIC 2 back half of the\r\n`antenatal-maternity-pathway-to-birth-registration` journey (debt-2026-08-13-074). The\r\nmaternity pathway surface composes it: complete the newborn's vault from a finalised maternity\r\nepisode, read the provisioning back, and record which nominated records have actually been\r\nseeded into it.\r\n            \r\n\n<b>There is no route that creates a provisioning from a request body.</b> Eligibility is written\r\nonly by consuming EPIC 21's `MaternityRecordFinalised`, so a caller can never assert whose\r\nchild a vault is for or which clinical records may seed it — see\r\nEssence.Core.Vault.Application.EventConsumers.MaternityRecordFinalisedEventConsumer.\r\n\r\n            \r\nZero-knowledge: identifiers, opaque record ids, a jurisdiction code, dates and client-generated\r\nencryption metadata only — never plaintext clinical content.",
      "name": "NewbornVaults"
    },
    {
      "description": "The claimant presents Essence's grant certificate to THEIR OWN instance (F1).\r\n            \r\n\n<b>This is the org-side half of the claim, and without it a self-hosted organisation can never\r\nmint its keys.</b> The founder grant — the only thing authorising an organisation's keypair — is\r\nwritten on Essence's estate by consuming an event from Essence's bus. A self-hosted stack has no\r\nbroker at all, so the grant never appears there and `Provision` refuses forever.\r\n\n<b>Essence pushes nothing; the claimant carries proof.</b> They present a certificate Essence\r\nsigned, this instance verifies it against Essence's PUBLIC key, and the grant is written locally.\r\nVerification needs no network — which is what makes an air-gapped instance work: the certificate\r\ncan arrive on media and still verify.\r\n",
      "name": "OrganizationGrantCertificate"
    },
    {
      "description": "The organisation keypair surface (org keypair design 2026-07-13, phase 2). An organisation's ZK\r\nidentity key: a founder provisions the keypair (client-generated; the server only stores the\r\npublic key + opaque per-holder wrapped-private-key envelopes), the public key is served so a\r\ngrantor client can wrap a document sharing-key to the org, and key-holders are added/revoked by\r\nexisting holders. Zero-knowledge: the platform never sees a plaintext org private key.",
      "name": "OrganizationKeyPair"
    },
    {
      "description": "The organisation recovery kit (#14331): how an organisation whose last key-holder is gone gets a\r\nkey-holder back without an incumbent to re-wrap, and without the server ever holding the key.",
      "name": "OrganizationKeyRecovery"
    },
    {
      "description": "The key-holder half of an organisation's revoke-and-rotate (#13096). Before this surface\r\nexisted, a key-holder who was not also the organisation vault's OWNER could neither list the\r\norganisation's vaults nor write back a re-wrapped document. Their rotation discarded the old\r\nprivate key and stranded every payslip and supplier document sealed to it.",
      "name": "OrganizationKeyRotation"
    },
    {
      "description": "#11203 — the vault half of an organisation's legacy-data migration: one sealed record becomes one\r\ndocument in the organisation's default vault.",
      "name": "OrganizationMigrationDocuments"
    },
    {
      "description": "Serves an organisation's published public key — the wrap target a grantor client uses to wrap\r\na document sharing-key to the organisation (org keypair design 2026-07-13). Public material only.",
      "name": "OrganizationPublicKey"
    },
    {
      "description": "Organisation-level vault statistics.",
      "name": "OrganizationVaultStatistics"
    },
    {
      "description": "EPIC 92 FR-OBP.073 (#20826) — a <b>person</b> programme member's \"Your records\": the records a sponsor held for\r\nthem before they joined, and how many are now sealed to their own account.",
      "name": "ProgrammeRecords"
    },
    {
      "description": "GDPR Art.16 / Art.19 corrections reaching the instance that holds the subject's records\r\n(DVS-8.4b, TF-12.7.e).",
      "name": "RectificationNotices"
    },
    {
      "description": "Vault-side base capability for the `returning-expat-domestic-identity-reestablishment`\r\njourney (debt-2026-07-04-003): <b>home-vault provisioning + prior-sovereign-vault\r\nreconciliation</b>. When an expatriate returns to their home jurisdiction they re-establish a\r\ndomestic identity without duplicating what already lives here and without illegally moving\r\nresidency-locked data. The client computes each candidate item's content hash, classification,\r\nresidency-lock and content-hash-dedup flags on-device; this surface computes each item's\r\ndisposition (carry-over / already-here-by-content-hash / stays-in-origin-by-residency-lock),\r\nexposes it for review, and — once the user consents ('same me — don't duplicate') — provisions\r\nthe home vault, records the disposition log and chains the outcome to the EPIC 9 bootstrap\r\ndecision (EPIC 4/12 audit anchor).\r\n            \r\n\n\r\nZero-knowledge: the server holds only identifiers, opaque content hashes, classifications, the\r\nresidency/dedup booleans and the computed dispositions — never prior-vault item plaintext or a\r\nkey. Re-wrapping of any carried item happens on the user's device.\r\n",
      "name": "ReturningNationalReconciliation"
    },
    {
      "description": "Controller for document search operations powered by Elasticsearch.",
      "name": "Search"
    },
    {
      "description": "Self-exclusion capability (journey:\r\ngambling-self-exclusion-credential-to-operators, debt-2026-07-03-054).",
      "name": "SelfExclusion"
    },
    {
      "description": "Capability-addressed, end-to-end-encrypted shared blobs backing consent grants' `SharedBlobReference`\r\n(design 2026-07-14). A grantor uploads a client-encrypted blob (the document re-encrypted under a\r\nfresh sharing key) and receives an absolute, capability-bearing URI; the grantee later fetches it by\r\nthat URI. The content is E2E-encrypted, so retrieval is token-capability (anonymous + rate-limited):\r\npossession of the URI yields only unreadable ciphertext without the recipient-wrapped sharing key.",
      "name": "SharedBlobs"
    },
    {
      "description": "Public share-token access endpoint (no authentication required).\r\nSits at the top-level `/api/v1/shares/{token}` route so external recipients\r\ncan resolve a share without holding a vault session.",
      "name": "Shares"
    },
    {
      "description": "EPIC 92 FR-OBP.088 × AGT-008 (#21098) — the sponsor's processing zone registers the sponsor's custodial key for a\r\nmember's vault, through the sponsor's ingestion control plane, with no administrator in the step.",
      "name": "SponsorCustodialKeyDeliveries"
    },
    {
      "description": "The service-only registration of a sponsored plan-upgrade offer, split out of\r\nEssence.Core.Vault.Api.Controllers.SponsoredEntitlementsController (#14444) because that controller's class-level\r\n`[RequiresCapability(\"cap.vault\")]` would still gate a service principal, and a capability\r\nexemption cannot sit under it (CAP-B). The recipient's own actions — list, accept, decline and\r\nplan-status — stay on Essence.Core.Vault.Api.Controllers.SponsoredEntitlementsController.",
      "name": "SponsoredEntitlementRegistration"
    },
    {
      "description": "Vault-side surface of the wholesale-premium-invitation journey for\r\nalready-authenticated existing users. Lets the vault surface a sponsored\r\nplan-upgrade offer as an accept/decline item, and lets the account/plan\r\npresenter reflect the *proposed* plan change until the user acts\r\n(debt-2026-07-03-232). The offer itself is registered only by a sponsoring\r\nservice, on Essence.Core.Vault.Api.Controllers.SponsoredEntitlementRegistrationController (#14444):\r\n<list type=\"bullet\"><item>LIST the caller's offers;</item><item>ACCEPT / DECLINE an actionable offer;</item><item>PROJECT the account plan-status (current + proposed).</item></list>\r\nAll surfaces are metadata-only and owner-scoped (zero-knowledge): a caller only\r\never sees and decides their own offers.",
      "name": "SponsoredEntitlements"
    },
    {
      "description": "EPIC 93 FR-LDI.089 (#20730) — cross-instance delivery: the sponsor's ingestion control plane loads one sealed\r\nrecord into a member's vault on the member's home sovereign.",
      "name": "SponsorRecordDeliveries"
    },
    {
      "description": "EPIC 92 FR-OBP.088 × AGT-008 (#21134) — the sponsor's processing zone reads the key its next record for a member's\r\nvault must be sealed to, through the sponsor's ingestion control plane, with no administrator in the step.",
      "name": "SponsorSealingKeyDeliveries"
    },
    {
      "description": "FR-02.068 — the subject-scoped source EPIC 11's Art.15 export compiler reads vault\r\ndocuments and their field metadata from.",
      "name": "SubjectExport"
    },
    {
      "description": "Supervised (minor) vault base capability (FR-02 journey seams:\r\nminor-supervised-account-provisioning-parental-controls, debt-2026-07-03-037; and\r\nper-guardian roles / minor-vault-guardian-to-adult-transition, debt-2026-07-03-098). The\r\nFamily (EPIC 30) supervised-account flow composes these surfaces: seed a minor's vault\r\nbound to a graduation schedule under guardian supervision, assign each co-guardian a\r\n<em>distinct</em> role (so co-guardians are no longer hard-coded to identical full control),\r\nand read the provisioning + rebind status. The rebind-at-majority itself is driven by the\r\nFamily child-transition-completed event, which\r\nEssence.Core.Vault.Application.EventConsumers.MinorTransitionCompletedEventConsumer consumes —\r\nmarking this provisioning rebound in the same unit of work as the ownership rebind.\r\n            \r\nZero-knowledge: only identifiers, role names, jurisdiction, a custody-order reference and\r\ndates cross the wire — never plaintext vault content or display names.",
      "name": "SupervisedVaults"
    },
    {
      "description": "FR-51.101 / #12517 — a supplier, signed in to a buyer's supplier portal, uploads a credential\r\ndocument into that buyer's organisation vault. Slice 1: the Vault's delegated-write primitive.",
      "name": "SupplierPortalDocuments"
    },
    {
      "description": "FR-51.101 / #12517 slice 2 — tells the Supplier service which of a buyer's vaults a supplier's\r\nupload goes to and which public key the supplier's browser must seal it to.",
      "name": "SupplierPortalUploadTarget"
    },
    {
      "description": "Controller for managing document templates.\r\nTemplates provide pre-configured document structures with multi-language support and field mappings.",
      "name": "Templates"
    },
    {
      "description": "Controller for managing chunked file uploads.\r\nSupports resumable uploads with automatic duplicate detection and virus scanning.",
      "name": "Uploads"
    },
    {
      "description": "Controller for managing vault access and collaboration (RBAC).\r\nHandles granting, revoking, and updating user permissions for vaults.",
      "name": "VaultAccess"
    },
    {
      "description": "Vault-side base capability for the `external-address-book-import-and-classify` journey\r\n(debt-2026-07-05-009): the <b>encrypted-store seal receipt</b> for an import batch. When a user\r\nimports an external address book, its records are AES-256-GCM sealed on the user's device before\r\nthey are written to the vault; this surface records that client attestation and replays it so the\r\njourney can prove \"your imported contacts were encrypted on your device before storage\".\r\n            \r\n\n\r\nZero-knowledge: the server holds only the target vault id, the algorithm label, the\r\nencrypted-record count and an opaque client-computed seal hash — never imported record plaintext\r\nor any key.\r\n",
      "name": "VaultImports"
    },
    {
      "description": "Account-merge base capability for the vault seam (journey:\r\naccount-merge-consolidate-duplicate-identities, debt-2026-07-03-047 / -048). Lets a user who\r\nowns two vaults — a duplicate/secondary and a primary — reconcile the duplicate's holdings into\r\nthe primary through a non-destructive, metadata-only pipeline:\r\n<list type=\"number\"><item>`POST /vaults/merge/preview` — compute the side-by-side preview + per-item\r\n  classification (kept / duplicate-retained / conflict) + estimated critical-conflict count,\r\n  committing nothing;</item><item>`GET /vaults/merge/{id}/conflicts?domain=documents` — the critical vs\r\n  auto-resolvable conflict split;</item><item>`POST /vaults/merge/{id}/conflicts/stage` — record the resolution choices;</item><item>`POST /vaults/merge/{id}/apply` — the commit-time apply that records\r\n  unreadable/skipped documents rather than dropping them, returning the receipt.</item></list>\r\nZero-knowledge: only ids, content hashes, counts and metadata cross the wire — never plaintext\r\ncontent. The actual content re-wrap to the target vault's key material is a client-side seam.",
      "name": "VaultMerge"
    },
    {
      "description": "Controller for managing vaults (zero-knowledge encrypted personal data vaults).",
      "name": "Vaults"
    },
    {
      "description": "Cross-vault document search (EPIC 5 — FR-05.026/027).\r\n            \r\n\n\r\nShares the `/api/v1/vaults` prefix with Essence.Core.Vault.Api.Controllers.VaultsController but is a separate\r\ncontroller: vault CRUD and search have different collaborators, different rate-limit\r\ncharacteristics and different authorisation shapes, and ASP.NET binds actions by template, not\r\nby controller, so two controllers may serve one prefix without ambiguity. Neither template\r\nhere collides with Essence.Core.Vault.Api.Controllers.VaultsController's (`POST /vaults/search` vs\r\n`POST /vaults`; `GET /vaults/search/scope` is two segments, so it cannot be captured\r\nby `GET /vaults/{id}`).\r\n\n\r\nThis is the cross-vault counterpart to `POST /api/v1/documents/search`, which requires a\r\n`vaultId` in its body and asserts `VaultRole.Owner` on it. That endpoint is\r\ndeliberately left untouched — loosening it to serve cross-vault queries would weaken its IDOR\r\nguard.\r\n\n\r\nZero-knowledge: the search selects over unencrypted metadata only (file name, description,\r\ntags, category name, timestamps). Document ciphertext is never read by this path.\r\n\n<b>What a plan changes here (#7385).</b> This is metadata search, available to every tier — it is\r\nnot the full-text surface FR-68.012a prices, because it has no body text to search. The one thing\r\non it FR-68.012a does price is the facet envelope (`search.faceted`), decided by the platform\r\ndecision point as Essence.Core.Vault.Api.Controllers.VaultSearchController.SearchFacetsCapability: a caller without it gets results and no\r\nfacets (Essence.Core.Vault.Application.DTOs.Search.CrossVault.CrossVaultSearchResponse.FacetsWithheld says why), and a facet filter in the\r\nbody is refused with the typed capability problem — 403 when the plan does not include it, 503\r\nwhen it could not be checked (EG-16: an outage is not a refusal).\r\n\n<b>Administrative vault-access lock (FR-02.043, #23336).</b> The search service is called\r\ndirectly rather than through MediatR, so Essence.Core.Vault.Application.Authorization.SubjectVaultAccessLockBehavior`2\r\nnever sees these actions. Both therefore consult Essence.Core.Vault.Application.Authorization.ISubjectVaultAccessLockGate themselves,\r\nbefore any scope is resolved, and refuse a locked caller with the same 403 every other vault route\r\ngives — whether or not they hold any vault.\r\n",
      "name": "VaultSearch"
    },
    {
      "description": "Vault-side <b>ownership rebind</b> for a committed two-party shared-vault partition (journey\r\n`family-separation-shared-vault-split`, EPIC 2 base capability, debt-2026-08-12-038).\r\n            \r\n\n\r\nEPIC 30 runs the partition: two partners allocate every shared item and the manifest is sealed.\r\nBefore this surface existed, that commit changed nothing the Vault believed — the containers kept\r\ntheir prior owner and the departing partner kept container-level access, so a partition both\r\npeople had agreed and signed off left the data exactly as jointly-held as it was before.\r\n\n<b>The authorisation model, because it is the design.</b> The sealed manifest bounds <em>how\r\nmany</em> containers may move to each party — that comes from the upstream event. It does not say\r\n<em>which</em> ones, and deliberately never will: the event is zero-knowledge and carries counts,\r\nnot a per-item mapping. So the specific mapping is authorised by the only party who can attest\r\nit without being taken at their word — the container's current owner, handing over what they\r\nhold. There is no recipient parameter anywhere on this surface. A caller can give away their own\r\ncontainers and can do nothing else.\r\n\n\r\nZero-knowledge: identifiers, counts, the upstream manifest hash and instants only — never\r\ndocument content and never either partner's PII. Dropping container-level access ends future\r\nauthorised reads; it does not re-key stored ciphertext (that is the client-side separation\r\nre-key, EPIC 1) and it cannot retract what the departing party already read or exported. A\r\nsurface rendering this MUST say so rather than implying the separation is complete.\r\n",
      "name": "VaultSplitRebinds"
    },
    {
      "description": "Stolen-wallet fan-out surface (debt-2026-07-02-045) — the base Vault capability the\r\n`stolen-wallet-bulk-credential-reissue-and-fraud-lockdown` journey needs.\r\nLists the credentials the vault references as held in the user's physical wallet and\r\nfans out a bulk credential-reissue (plus optional fraud lockdown) over them.",
      "name": "WalletCredentials"
    },
    {
      "description": "Reconstruct the decrypt-access trail served under the caller's account within a compromise window",
      "name": "AccessReconstruction"
    },
    {
      "description": "Account-merge journey: bulk conflict triage over the vault reconciliation",
      "name": "AccountMerge"
    },
    {
      "description": "Administrative vault-access lock / restore (EPIC 9 → EPIC 2 account-state contract)",
      "name": "AdministrativeVaultAccess"
    },
    {
      "description": "Power-of-attorney scoped-vault-access base capability",
      "name": "AttorneyScope"
    },
    {
      "description": "Manage hierarchical document categories within personal data vaults",
      "name": "Categories"
    },
    {
      "description": "Co-custodianship shared-records space for a child",
      "name": "ChildSharedSpace"
    },
    {
      "description": "Vault-side contact-handover primitives for account closure (keep-a-copy / trash / erasure)",
      "name": "ContactHandover"
    },
    {
      "description": "Court-conferred authority (deputyship) vault access",
      "name": "CourtAuthorityAccess"
    },
    {
      "description": "Custodial vault hand-over (EPIC 92): member status and custodian destruction evidence",
      "name": "CustodyHandOver"
    },
    {
      "description": "Manage organisation data requests for field-level user data sharing",
      "name": "DataRequests"
    },
    {
      "description": "On-behalf delegated-write attribution vault base capability",
      "name": "DelegatedWrites"
    },
    {
      "description": "Preview and reconcile the vault-side teardown of bulk consent revocations",
      "name": "DerivedShares"
    },
    {
      "description": "Read a document's server-observed access trail and aggregate counters",
      "name": "DocumentActivity"
    },
    {
      "description": "Manage encrypted documents within personal data vaults",
      "name": "DocumentOwnership"
    },
    {
      "description": "Manage encrypted documents within personal data vaults",
      "name": "Documents"
    },
    {
      "description": "Manage shares for documents within personal data vaults",
      "name": "DocumentShares"
    },
    {
      "description": "Manage the searchable tags on a vault document",
      "name": "DocumentTags"
    },
    {
      "description": "Manage document version history within personal data vaults",
      "name": "DocumentVersions"
    },
    {
      "description": "Estate bequests and posthumous executor document release",
      "name": "EstateBequests"
    },
    {
      "description": "Provision a family member's vault under the sponsor's family plan",
      "name": "FamilyMemberVaults"
    },
    {
      "description": "Guardian multi-ward roster vault base capability",
      "name": "FamilyWards"
    },
    {
      "description": "Manage field-level sharing of encrypted document fields",
      "name": "FieldShares"
    },
    {
      "description": "Manage subscription-based sharing of encrypted document fields",
      "name": "FieldSubscriptions"
    },
    {
      "description": "The animals a user holds — the subject of a keeper change",
      "name": "HeldSubjects"
    },
    {
      "description": "Household contact-vault container backing the shared address book",
      "name": "HouseholdContainers"
    },
    {
      "description": "Initiate, respond to, and read pet/dependent keeper-change handovers",
      "name": "KeeperChanges"
    },
    {
      "description": "Minor→adult majority-handover vault base capability",
      "name": "MinorTransitions"
    },
    {
      "description": "Module-scoped portable export: the measured record count a module switch is reconciled against (zero-knowledge)",
      "name": "ModuleRecordExports"
    },
    {
      "description": "Legal name-change credential + regulated-KYC reissue flow",
      "name": "NameChangeReissue"
    },
    {
      "description": "Newborn (dependent) vault base capability",
      "name": "NewbornVaults"
    },
    {
      "description": "Organisation keypair: provision and manage key-holders (zero-knowledge)",
      "name": "OrganizationKeyPair"
    },
    {
      "description": "Organisation recovery kit: regain key custody without an incumbent key-holder (zero-knowledge)",
      "name": "OrganizationKeyRecovery"
    },
    {
      "description": "Organisation key rotation: key-holder re-wrap of organisation-sealed documents (zero-knowledge)",
      "name": "OrganizationKeyRotation"
    },
    {
      "description": "Organisation public key: the grantor wrap target (zero-knowledge)",
      "name": "OrganizationPublicKey"
    },
    {
      "description": "Programme records hand-over (EPIC 92): a person member's records progress",
      "name": "ProgrammeRecords"
    },
    {
      "description": "Returning-national home-vault provisioning + prior-sovereign-vault reconciliation",
      "name": "ReturningNationalReconciliation"
    },
    {
      "description": "Advanced document search operations",
      "name": "Search"
    },
    {
      "description": "Create and read the user's gambling self-exclusion",
      "name": "SelfExclusion"
    },
    {
      "description": "End-to-end-encrypted shared blobs (capability-addressed) backing consent grants",
      "name": "SharedBlobs"
    },
    {
      "description": "Resolve a document share via its share token",
      "name": "Shares"
    },
    {
      "description": "Durable in-vault sponsored plan-upgrade offers and the account plan-status projection",
      "name": "SponsoredEntitlementRegistration"
    },
    {
      "description": "Durable in-vault sponsored plan-upgrade offers and the account plan-status projection",
      "name": "SponsoredEntitlements"
    },
    {
      "description": "GDPR Art.15 subject access export source for vault documents and metadata",
      "name": "SubjectExport"
    },
    {
      "description": "Supervised (minor) vault base capability",
      "name": "SupervisedVaults"
    },
    {
      "description": "Manage document templates with multi-language support and schema associations",
      "name": "Templates"
    },
    {
      "description": "Manage chunked file uploads with resumable capability",
      "name": "Uploads"
    },
    {
      "description": "Manage vault access control and collaboration",
      "name": "VaultAccess"
    },
    {
      "description": "Encrypted-store seal receipts for imported record batches",
      "name": "VaultImports"
    },
    {
      "description": "Consolidate a duplicate vault into a primary vault",
      "name": "VaultMerge"
    },
    {
      "description": "Manage encrypted personal data vaults",
      "name": "Vaults"
    },
    {
      "description": "Cross-vault document search",
      "name": "VaultSearch"
    },
    {
      "description": "Vault-side ownership rebind for a committed two-party shared-vault partition",
      "name": "VaultSplitRebinds"
    },
    {
      "description": "Stolen-wallet credential reissue and fraud lockdown",
      "name": "WalletCredentials"
    }
  ]
}
