{ "openapi": "3.0.3", "info": { "title": "libresign-full", "version": "0.0.1", "description": "Control document signing workflows inside Nextcloud", "license": { "name": "agpl" } }, "components": { "securitySchemes": { "basic_auth": { "type": "http", "scheme": "basic" }, "bearer_auth": { "type": "http", "scheme": "bearer" } }, "schemas": { "AccountCapabilitySettings": { "type": "object", "required": [ "canRequestSign", "hasSignatureFile", "isApprover" ], "properties": { "canRequestSign": { "type": "boolean" }, "hasSignatureFile": { "type": "boolean" }, "isApprover": { "type": "boolean" } } }, "AccountMeResponse": { "type": "object", "required": [ "account", "settings" ], "properties": { "account": { "type": "object", "required": [ "uid", "emailAddress", "displayName" ], "properties": { "uid": { "type": "string" }, "emailAddress": { "type": "string" }, "displayName": { "type": "string" } } }, "settings": { "type": "object", "required": [ "canRequestSign", "hasSignatureFile", "phoneNumber" ], "properties": { "canRequestSign": { "type": "boolean" }, "hasSignatureFile": { "type": "boolean" }, "phoneNumber": { "type": "string" } } } } }, "AccountSettingsUpdateResponse": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "object", "required": [ "userId", "phone", "message" ], "properties": { "userId": { "type": "string" }, "phone": { "type": "string" }, "message": { "type": "string" } } } } }, "ActionErrorResponse": { "type": "object", "required": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/ErrorItem" } }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/InfoMessage" } }, "message": { "type": "string" } } }, "ActionErrorWithCode": { "allOf": [ { "$ref": "#/components/schemas/ErrorItem" }, { "type": "object", "properties": { "code": { "type": "integer", "format": "int64" } } } ] }, "ActionMessageResponse": { "type": "object", "required": [ "action", "message" ], "properties": { "action": { "type": "integer", "format": "int64" }, "message": { "type": "string" } } }, "ActiveSigningItem": { "type": "object", "required": [ "id", "uuid", "name", "signerEmail", "signerDisplayName", "updatedAt" ], "properties": { "id": { "type": "integer", "format": "int64" }, "uuid": { "type": "string" }, "name": { "type": "string" }, "signerEmail": { "type": "string" }, "signerDisplayName": { "type": "string" }, "updatedAt": { "type": "integer", "format": "int64" } } }, "ActiveSigningsResponse": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ActiveSigningItem" } } } }, "AdminSignatureEngine": { "type": "string", "enum": [ "JSignPdf", "PhpNative" ] }, "AdminSignatureMethodSetting": { "type": "object", "required": [ "enabled", "label", "name" ], "properties": { "enabled": { "type": "boolean" }, "label": { "type": "string" }, "name": { "type": "string" } } }, "Capabilities": { "type": "object", "required": [ "features", "config", "version" ], "properties": { "features": { "type": "array", "items": { "type": "string" } }, "config": { "type": "object", "required": [ "show-confetti", "sign-elements", "envelope", "upload" ], "properties": { "show-confetti": { "type": "boolean" }, "sign-elements": { "type": "object", "required": [ "is-available", "can-create-signature", "full-signature-width", "full-signature-height", "signature-width", "signature-height" ], "properties": { "is-available": { "type": "boolean" }, "can-create-signature": { "type": "boolean" }, "full-signature-width": { "type": "number", "format": "double" }, "full-signature-height": { "type": "number", "format": "double" }, "signature-width": { "type": "number", "format": "double" }, "signature-height": { "type": "number", "format": "double" } } }, "envelope": { "type": "object", "required": [ "is-available" ], "properties": { "is-available": { "type": "boolean" } } }, "upload": { "type": "object", "required": [ "max-file-uploads" ], "properties": { "max-file-uploads": { "type": "integer", "format": "int64" } } } } }, "version": { "type": "string" } } }, "CertificateDataGenerated": { "allOf": [ { "$ref": "#/components/schemas/EngineHandler" }, { "type": "object", "required": [ "generated" ], "properties": { "generated": { "type": "boolean" } } } ] }, "CertificateEngineConfigResponse": { "type": "object", "required": [ "engine", "identify_methods" ], "properties": { "engine": { "type": "string", "enum": [ "cfssl", "none", "openssl" ] }, "identify_methods": { "type": "array", "items": { "$ref": "#/components/schemas/IdentifyMethodAdminSetting" } } } }, "CertificatePfxData": { "type": "object", "required": [ "name", "subject", "issuer", "extensions", "serialNumber", "serialNumberHex", "validate" ], "properties": { "name": { "type": "string" }, "subject": { "type": "string" }, "issuer": { "type": "string" }, "extensions": { "type": "string" }, "serialNumber": { "type": "string" }, "serialNumberHex": { "type": "string" }, "validate": { "type": "object", "required": [ "from", "to" ], "properties": { "from": { "type": "string" }, "to": { "type": "string" } } } } }, "CertificatePolicyResponse": { "type": "object", "required": [ "status", "CPS" ], "properties": { "status": { "type": "string", "enum": [ "success" ] }, "CPS": { "type": "string" } } }, "ConfigValueResponse": { "type": "object", "required": [ "key", "value" ], "properties": { "key": { "type": "string" }, "value": { "type": "string", "nullable": true } } }, "ConfigureCheck": { "type": "object", "required": [ "message", "resource", "status", "tip" ], "properties": { "message": { "type": "string" }, "resource": { "type": "string" }, "status": { "type": "string", "enum": [ "error", "info", "success" ] }, "tip": { "type": "string" } } }, "ConfigureChecksResponse": { "type": "array", "items": { "$ref": "#/components/schemas/ConfigureCheck" } }, "Coordinate": { "type": "object", "properties": { "page": { "type": "integer", "format": "int64" }, "urx": { "type": "integer", "format": "int64" }, "ury": { "type": "integer", "format": "int64" }, "llx": { "type": "integer", "format": "int64" }, "lly": { "type": "integer", "format": "int64" }, "top": { "type": "integer", "format": "int64" }, "left": { "type": "integer", "format": "int64" }, "width": { "type": "integer", "format": "int64" }, "height": { "type": "integer", "format": "int64" } } }, "CreateToSignPdfReference": { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string" } } }, "CreateToSignResponse": { "type": "object", "required": [ "action", "message" ], "properties": { "action": { "type": "integer", "format": "int64", "enum": [ 2000, 2500 ] }, "message": { "type": "string" }, "description": { "type": "string", "nullable": true }, "filename": { "type": "string" }, "pdf": { "$ref": "#/components/schemas/CreateToSignPdfReference" } } }, "CrlCertificateStatusResponse": { "type": "object", "required": [ "serial_number", "status", "checked_at" ], "properties": { "serial_number": { "type": "string" }, "status": { "type": "string", "enum": [ "valid", "revoked", "expired", "unknown" ] }, "checked_at": { "type": "string" }, "reason_code": { "type": "integer", "format": "int64", "nullable": true }, "revoked_at": { "type": "string" }, "valid_to": { "type": "string" } } }, "CrlErrorResponse": { "type": "object", "required": [ "error", "message" ], "properties": { "error": { "type": "string" }, "message": { "type": "string" } } }, "CrlListItem": { "type": "object", "required": [ "id", "serial_number", "owner", "status", "certificate_type", "engine", "instance_id", "generation", "issued_at", "valid_to", "revoked_at", "reason_code", "comment", "revoked_by", "invalidity_date", "crl_number" ], "properties": { "id": { "type": "integer", "format": "int64" }, "serial_number": { "type": "string" }, "owner": { "type": "string" }, "status": { "type": "string", "enum": [ "issued", "revoked" ] }, "certificate_type": { "type": "string" }, "engine": { "type": "string" }, "instance_id": { "type": "string", "nullable": true }, "generation": { "type": "integer", "format": "int64", "nullable": true }, "issued_at": { "type": "string", "nullable": true }, "valid_to": { "type": "string", "nullable": true }, "revoked_at": { "type": "string", "nullable": true }, "reason_code": { "type": "integer", "format": "int64", "nullable": true }, "comment": { "type": "string", "nullable": true }, "revoked_by": { "type": "string", "nullable": true }, "invalidity_date": { "type": "string", "nullable": true }, "crl_number": { "type": "integer", "format": "int64", "nullable": true } } }, "CrlListResponse": { "type": "object", "required": [ "data", "total", "page", "length" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/CrlListItem" } }, "total": { "type": "integer", "format": "int64" }, "page": { "type": "integer", "format": "int64" }, "length": { "type": "integer", "format": "int64" } } }, "CrlRevokeResponse": { "type": "object", "required": [ "success", "message" ], "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } } }, "DangerMessage": { "type": "object", "required": [ "type", "message" ], "properties": { "type": { "type": "string", "enum": [ "danger" ] }, "message": { "type": "string" } } }, "DangerMessagesResponse": { "type": "object", "required": [ "messages" ], "properties": { "messages": { "type": "array", "items": { "$ref": "#/components/schemas/DangerMessage" } } } }, "DetailedFile": { "type": "object", "required": [ "created_at", "files", "filesCount", "id", "nodeId", "uuid", "name", "status", "statusText", "nodeType", "metadata", "size", "docmdpLevel", "signatureFlow", "policySnapshotFrozen", "visibleElements", "signers", "signersCount", "requested_by" ], "properties": { "created_at": { "type": "string" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/FileListItem" } }, "filesCount": { "type": "integer", "format": "int64", "minimum": 0 }, "id": { "type": "integer", "format": "int64" }, "nodeId": { "type": "integer", "format": "int64" }, "uuid": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "integer", "format": "int64" }, "statusText": { "type": "string" }, "nodeType": { "type": "string", "enum": [ "file", "envelope" ] }, "metadata": { "$ref": "#/components/schemas/FileRuntimeMetadata" }, "size": { "type": "integer", "format": "int64", "minimum": 0 }, "docmdpLevel": { "type": "integer", "format": "int64" }, "signatureFlow": { "type": "string", "enum": [ "none", "parallel", "ordered_numeric" ] }, "policySnapshotFrozen": { "type": "boolean" }, "visibleElements": { "type": "array", "items": { "$ref": "#/components/schemas/VisibleElement" } }, "signers": { "type": "array", "items": { "$ref": "#/components/schemas/SignerDetail" } }, "signersCount": { "type": "integer", "format": "int64" }, "requested_by": { "$ref": "#/components/schemas/RequestedBy" } } }, "DetailedFileResponse": { "allOf": [ { "$ref": "#/components/schemas/DetailedFile" }, { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } ] }, "DocMdpConfig": { "type": "object", "required": [ "enabled", "defaultLevel", "availableLevels" ], "properties": { "enabled": { "type": "boolean" }, "defaultLevel": { "type": "integer", "format": "int64" }, "availableLevels": { "type": "array", "items": { "$ref": "#/components/schemas/DocMdpLevelOption" } } } }, "DocMdpLevelOption": { "type": "object", "required": [ "value", "label", "description" ], "properties": { "value": { "type": "integer", "format": "int64" }, "label": { "type": "string" }, "description": { "type": "string" } } }, "DynamicMetadataRecord": { "type": "object", "additionalProperties": { "type": "object" } }, "DynamicMetadataScalar": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "boolean" } ] }, "DynamicMetadataValue": { "type": "object" }, "EffectiveCompoundPolicyWriteResponse": { "allOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "type": "object", "required": [ "policies" ], "properties": { "policies": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/EffectivePolicyState" } } } } ] }, "EffectivePoliciesResponse": { "type": "object", "required": [ "policies" ], "properties": { "policies": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/EffectivePolicyState" } } } }, "EffectivePolicyMeta": { "type": "object", "properties": { "defaultSystemValue": { "$ref": "#/components/schemas/EffectivePolicyValue" }, "appConfigKey": { "type": "string" }, "userPreferenceKey": { "type": "string" }, "resolutionMode": { "type": "string" }, "supportsGroupAdminDelegation": { "type": "boolean" }, "canCreateDescendantRules": { "type": "boolean" }, "supportsUserPreference": { "type": "boolean" }, "supportedScopes": { "type": "array", "items": { "$ref": "#/components/schemas/PolicyScope" } }, "backendOnly": { "type": "boolean" }, "helper": { "type": "boolean" }, "parentPolicyKey": { "type": "string" }, "compositeChildren": { "type": "array", "items": { "type": "string" } }, "mailProviderAvailable": { "type": "boolean" }, "validationUrlIsPrivate": { "type": "boolean" }, "observerProfileEnabled": { "type": "boolean" } } }, "EffectivePolicyResponse": { "type": "object", "required": [ "policy" ], "properties": { "policy": { "$ref": "#/components/schemas/EffectivePolicyState" } } }, "EffectivePolicyState": { "type": "object", "required": [ "policyKey", "effectiveValue", "sourceScope", "visible", "editableByCurrentActor", "allowedValues", "canSaveAsUserDefault", "canUseAsRequestOverride", "preferenceWasCleared", "blockedBy", "groupCount", "userCount", "everyoneCount" ], "properties": { "policyKey": { "type": "string" }, "effectiveValue": { "$ref": "#/components/schemas/EffectivePolicyValue" }, "meta": { "$ref": "#/components/schemas/EffectivePolicyMeta" }, "sourceScope": { "type": "string" }, "visible": { "type": "boolean" }, "editableByCurrentActor": { "type": "boolean" }, "allowedValues": { "type": "array", "items": { "$ref": "#/components/schemas/EffectivePolicyValue" } }, "canSaveAsUserDefault": { "type": "boolean" }, "canUseAsRequestOverride": { "type": "boolean" }, "preferenceWasCleared": { "type": "boolean" }, "blockedBy": { "type": "string", "nullable": true }, "groupCount": { "type": "integer", "format": "int64", "minimum": 0 }, "userCount": { "type": "integer", "format": "int64", "minimum": 0 }, "everyoneCount": { "type": "integer", "format": "int64", "minimum": 0 } } }, "EffectivePolicyValue": { "nullable": true, "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] }, "EngineHandler": { "type": "object", "required": [ "configPath", "policySection", "rootCert" ], "properties": { "configPath": { "type": "string" }, "cfsslUri": { "type": "string" }, "policySection": { "type": "array", "items": { "$ref": "#/components/schemas/PolicySection" } }, "rootCert": { "$ref": "#/components/schemas/RootCertificate" } } }, "EngineHandlerResponse": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/EngineHandler" } } }, "ErrorItem": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } }, "ErrorResponse": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "string" } } }, "ErrorStatusResponse": { "type": "object", "required": [ "status", "message" ], "properties": { "status": { "type": "string", "enum": [ "error" ] }, "message": { "type": "string" } } }, "ErrorsResponse": { "type": "object", "required": [ "errors" ], "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/ErrorItem" } } } }, "FailureStatusResponse": { "type": "object", "required": [ "status", "message" ], "properties": { "status": { "type": "string", "enum": [ "failure" ] }, "message": { "type": "string" } } }, "File": { "type": "object", "required": [ "account", "file_type", "created_at", "file" ], "properties": { "account": { "type": "object", "required": [ "userId", "displayName" ], "properties": { "userId": { "type": "string" }, "displayName": { "type": "string" } } }, "file_type": { "type": "object", "required": [ "type", "name", "description" ], "properties": { "type": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true } } }, "created_at": { "type": "string" }, "file": { "type": "object", "required": [ "name", "status", "statusText", "created_at", "file", "callback", "uuid", "signers" ], "properties": { "name": { "type": "string" }, "status": { "type": "integer", "format": "int64", "enum": [ 0, 1, 2, 3, 4, 6 ] }, "statusText": { "type": "string" }, "created_at": { "type": "string" }, "file": { "type": "object", "required": [ "type", "nodeId", "signedNodeId", "url" ], "properties": { "type": { "type": "string" }, "nodeId": { "type": "integer", "format": "int64", "minimum": 0 }, "signedNodeId": { "type": "integer", "format": "int64", "minimum": 0 }, "url": { "type": "string" } } }, "callback": { "type": "string", "nullable": true }, "uuid": { "type": "string" }, "signers": { "type": "array", "items": { "$ref": "#/components/schemas/SignerDetail" } } } } } }, "FileElementIdResponse": { "type": "object", "required": [ "fileElementId" ], "properties": { "fileElementId": { "type": "integer", "format": "int64" } } }, "FileListItem": { "type": "object", "required": [ "fileId", "id", "nodeId", "uuid", "name", "status", "statusText", "docmdpLevel", "signersCount", "file", "metadata", "size", "signers" ], "properties": { "fileId": { "type": "integer", "format": "int64" }, "id": { "type": "integer", "format": "int64" }, "nodeId": { "type": "integer", "format": "int64", "nullable": true }, "uuid": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "integer", "format": "int64" }, "statusText": { "type": "string" }, "docmdpLevel": { "type": "integer", "format": "int64" }, "signersCount": { "type": "integer", "format": "int64" }, "file": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/FileRuntimeMetadata" }, "size": { "type": "integer", "format": "int64", "minimum": 0 }, "signers": { "type": "array", "items": { "$ref": "#/components/schemas/SignerSummary" } } } }, "FileListResponse": { "type": "object", "required": [ "pagination", "data" ], "properties": { "pagination": { "$ref": "#/components/schemas/Pagination" }, "data": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/FileSummary" }, { "$ref": "#/components/schemas/DetailedFile" } ] } }, "settings": { "$ref": "#/components/schemas/Settings" } } }, "FileRuntimeMetadata": { "anyOf": [ { "$ref": "#/components/schemas/ValidateMetadata" }, { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/DynamicMetadataValue" } } ] }, "FileSummary": { "type": "object", "required": [ "id", "nodeId", "uuid", "name", "status", "statusText", "nodeType", "created_at", "metadata", "docmdpLevel", "signatureFlow", "policySnapshotFrozen", "signersCount", "signers", "requested_by", "filesCount", "canSign" ], "properties": { "id": { "type": "integer", "format": "int64" }, "nodeId": { "type": "integer", "format": "int64", "nullable": true }, "uuid": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "integer", "format": "int64" }, "statusText": { "type": "string" }, "nodeType": { "type": "string", "enum": [ "file", "envelope" ] }, "created_at": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/FileRuntimeMetadata" }, "docmdpLevel": { "type": "integer", "format": "int64" }, "signatureFlow": { "type": "string", "enum": [ "none", "parallel", "ordered_numeric" ] }, "policySnapshotFrozen": { "type": "boolean" }, "signersCount": { "type": "integer", "format": "int64" }, "signers": { "type": "array", "items": { "$ref": "#/components/schemas/SignerSummary" } }, "requested_by": { "$ref": "#/components/schemas/RequestedBy" }, "filesCount": { "type": "integer", "format": "int64", "minimum": 0 }, "canSign": { "type": "boolean" } } }, "FileUuidReference": { "type": "object", "required": [ "uuid" ], "properties": { "uuid": { "type": "string" } } }, "FolderSettings": { "type": "object", "properties": { "folderName": { "type": "string" }, "path": { "type": "string" }, "separator": { "type": "string" }, "folderPatterns": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "setting": { "type": "string" } } }, "envelopeFolderId": { "type": "integer", "format": "int64" } } }, "FooterTemplateResponse": { "type": "object", "required": [ "template", "isDefault", "template_variables", "preview_width", "preview_height", "preview_zoom" ], "properties": { "template": { "type": "string" }, "isDefault": { "type": "boolean" }, "template_variables": { "type": "object", "additionalProperties": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string" }, "example": { "type": "string" }, "default": { "type": "string" } } } }, "preview_width": { "type": "integer", "format": "int64" }, "preview_height": { "type": "integer", "format": "int64" }, "preview_zoom": { "type": "integer", "format": "int64" } } }, "GeoIpConfig": { "type": "object", "required": [ "path", "status" ], "properties": { "path": { "type": "string", "nullable": true }, "status": { "$ref": "#/components/schemas/GeoIpDatabaseStatus" }, "databaseType": { "type": "string" }, "buildEpoch": { "type": "integer", "format": "int64" }, "modifiedAt": { "type": "string" } } }, "GeoIpDatabaseStatus": { "type": "string", "enum": [ "not_configured", "not_found", "not_readable", "invalid_database", "unsupported_database", "ready" ] }, "GeolocationCollectionStatus": { "type": "string", "enum": [ "collected", "denied", "unavailable", "skipped" ] }, "GeolocationRequirement": { "type": "string", "enum": [ "disabled", "required" ] }, "GroupCompoundPolicyWriteResponse": { "allOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "type": "object", "required": [ "policies" ], "properties": { "policies": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/GroupPolicyState" } } } } ] }, "GroupPolicyResponse": { "type": "object", "required": [ "policy" ], "properties": { "policy": { "$ref": "#/components/schemas/GroupPolicyState" } } }, "GroupPolicyState": { "type": "object", "required": [ "policyKey", "scope", "targetId", "value", "allowChildOverride", "visibleToChild", "allowedValues", "deletableByCurrentActor" ], "properties": { "policyKey": { "type": "string" }, "scope": { "type": "string", "enum": [ "group" ] }, "targetId": { "type": "string" }, "value": { "$ref": "#/components/schemas/EffectivePolicyValue", "nullable": true }, "effectiveValue": { "$ref": "#/components/schemas/EffectivePolicyValue", "nullable": true }, "allowChildOverride": { "type": "boolean" }, "visibleToChild": { "type": "boolean" }, "allowedValues": { "type": "array", "items": { "$ref": "#/components/schemas/EffectivePolicyValue" } }, "deletableByCurrentActor": { "type": "boolean" } } }, "GroupPolicyWriteRequest": { "type": "object", "required": [ "value", "allowChildOverride" ], "properties": { "value": { "$ref": "#/components/schemas/EffectivePolicyValue" }, "allowChildOverride": { "type": "boolean" } } }, "GroupPolicyWriteResponse": { "allOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "$ref": "#/components/schemas/GroupPolicyResponse" } ] }, "HasRootCertResponse": { "type": "object", "required": [ "hasRootCert" ], "properties": { "hasRootCert": { "type": "boolean" } } }, "IdDocs": { "type": "object", "required": [ "file" ], "properties": { "file": { "$ref": "#/components/schemas/NewFile" }, "name": { "type": "string" }, "type": { "type": "string" } } }, "IdDocsApprovalListResponse": { "type": "object", "required": [ "pagination", "data" ], "properties": { "pagination": { "$ref": "#/components/schemas/Pagination" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/File" } } } }, "IdDocsListResponse": { "type": "object", "required": [ "pagination", "data" ], "properties": { "pagination": { "$ref": "#/components/schemas/Pagination" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/File" } } } }, "IdDocsUploadErrorResponse": { "type": "object", "required": [ "file", "type", "message" ], "properties": { "file": { "type": "integer", "format": "int64", "nullable": true }, "type": { "type": "string", "nullable": true, "enum": [ "info", "warning", "danger" ] }, "message": { "type": "string" } } }, "IdentifyAccount": { "type": "object", "required": [ "identify", "isNoUser", "displayName", "subname", "shareType" ], "properties": { "identify": { "type": "string" }, "isNoUser": { "type": "boolean" }, "displayName": { "type": "string" }, "subname": { "type": "string" }, "shareType": { "type": "integer", "format": "int64", "enum": [ 0, 4 ] }, "method": { "type": "string", "enum": [ "account", "email", "signal", "sms", "telegram", "whatsapp", "whatsappbusiness", "xmpp" ] }, "iconName": { "type": "string", "enum": [ "account", "email", "signal", "sms", "telegram", "whatsapp", "xmpp" ] }, "acceptsEmailNotifications": { "type": "boolean" } } }, "IdentifyAccountsResponse": { "type": "array", "items": { "$ref": "#/components/schemas/IdentifyAccount" } }, "IdentifyMethod": { "type": "object", "required": [ "method", "value", "requirement" ], "properties": { "method": { "type": "string", "enum": [ "account", "email", "signal", "sms", "telegram", "whatsapp", "whatsappbusiness", "xmpp" ] }, "value": { "type": "string" }, "requirement": { "$ref": "#/components/schemas/IdentifyMethodRequirement" } } }, "IdentifyMethodAdminSetting": { "type": "object", "required": [ "name", "friendly_name", "enabled", "requirement" ], "properties": { "name": { "type": "string" }, "friendly_name": { "type": "string" }, "enabled": { "type": "boolean" }, "requirement": { "$ref": "#/components/schemas/IdentifyMethodRequirement" }, "minimumTotalVerifiedFactors": { "type": "integer", "format": "int64", "minimum": 1 }, "can_create_account": { "type": "boolean" }, "test_url": { "type": "string" }, "signatureMethods": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/AdminSignatureMethodSetting" } } } }, "IdentifyMethodRequirement": { "type": "string", "enum": [ "required", "optional" ] }, "IdentifyMethodSetting": { "type": "object", "required": [ "name", "friendly_name", "enabled", "requirement" ], "properties": { "name": { "type": "string" }, "friendly_name": { "type": "string" }, "enabled": { "type": "boolean" }, "requirement": { "$ref": "#/components/schemas/IdentifyMethodRequirement" }, "minimumTotalVerifiedFactors": { "type": "integer", "format": "int64", "minimum": 1 }, "signatureMethods": { "$ref": "#/components/schemas/SignatureMethods" } } }, "InfoMessage": { "type": "object", "required": [ "type", "message" ], "properties": { "type": { "type": "string", "enum": [ "info" ] }, "message": { "type": "string" } } }, "MessageResponse": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } }, "MessagesResponse": { "type": "object", "required": [ "messages" ], "properties": { "messages": { "type": "array", "items": { "type": "string" } } } }, "NewFile": { "type": "object", "properties": { "base64": { "type": "string" }, "nodeId": { "oneOf": [ { "type": "integer", "format": "int64", "minimum": 0 }, { "type": "string" } ] }, "path": { "type": "string" }, "url": { "type": "string" }, "name": { "type": "string" } } }, "NewSigner": { "type": "object", "required": [ "identifyMethods" ], "properties": { "identifyMethods": { "type": "array", "items": { "type": "object", "required": [ "method", "value", "requirement" ], "properties": { "method": { "type": "string" }, "value": { "type": "string" }, "requirement": { "$ref": "#/components/schemas/IdentifyMethodRequirement" } } } }, "displayName": { "type": "string" }, "description": { "type": "string" }, "notify": { "type": "integer", "format": "int64", "minimum": 0 }, "signingOrder": { "type": "integer", "format": "int64", "minimum": 0 }, "status": { "type": "integer", "format": "int64" }, "participantRole": { "$ref": "#/components/schemas/ParticipantRole" }, "deviceGeolocationRequired": { "type": "boolean" } } }, "NotificationStatusResponse": { "type": "object", "required": [ "status", "complete", "channels" ], "properties": { "status": { "type": "string", "enum": [ "processing", "completed", "attention_required", "not_found" ] }, "complete": { "type": "boolean" }, "channels": { "type": "array", "items": { "type": "object", "required": [ "channel", "state" ], "properties": { "channel": { "type": "string" }, "state": { "type": "string" } } } } } }, "Notify": { "type": "object", "required": [ "date", "method" ], "properties": { "date": { "type": "integer", "format": "int64", "minimum": 0 }, "method": { "type": "string", "enum": [ "activity", "notify", "mail" ] }, "description": { "type": "string" } } }, "OCSMeta": { "type": "object", "required": [ "status", "statuscode" ], "properties": { "status": { "type": "string" }, "statuscode": { "type": "integer" }, "message": { "type": "string" }, "totalitems": { "type": "string" }, "itemsperpage": { "type": "string" } } }, "Pagination": { "type": "object", "required": [ "total", "current", "next", "prev", "last", "first" ], "properties": { "total": { "type": "integer", "format": "int64", "minimum": 0 }, "current": { "type": "string", "nullable": true }, "next": { "type": "string", "nullable": true }, "prev": { "type": "string", "nullable": true }, "last": { "type": "string", "nullable": true }, "first": { "type": "string", "nullable": true } } }, "ParticipantRole": { "type": "string", "enum": [ "signer", "observer" ] }, "PolicyScope": { "type": "string", "enum": [ "system", "group", "user" ] }, "PolicySection": { "type": "object", "required": [ "OID", "CPS" ], "properties": { "OID": { "type": "string" }, "CPS": { "type": "string" } } }, "PolicySnapshotBooleanEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "type": "boolean" }, "sourceScope": { "type": "string" } } }, "PolicySnapshotEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "type": "string" }, "sourceScope": { "type": "string" } } }, "PolicySnapshotIdentificationDocumentsEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "$ref": "#/components/schemas/PolicySnapshotIdentificationDocumentsValue" }, "sourceScope": { "type": "string" } } }, "PolicySnapshotIdentificationDocumentsValue": { "type": "object", "required": [ "enabled", "approvers" ], "properties": { "enabled": { "type": "boolean" }, "approvers": { "type": "array", "items": { "type": "string" } } } }, "PolicySnapshotIdentifyMethodFactor": { "type": "object", "required": [ "name", "enabled" ], "properties": { "name": { "type": "string" }, "enabled": { "type": "boolean" }, "signatureMethods": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/PolicySnapshotSignatureMethodSetting" } }, "signatureMethodEnabled": { "type": "string" }, "requirement": { "$ref": "#/components/schemas/IdentifyMethodRequirement" }, "minimumTotalVerifiedFactors": { "type": "integer", "format": "int64", "minimum": 1 }, "friendly_name": { "type": "string" } } }, "PolicySnapshotIdentifyMethodsEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "type": "array", "items": { "$ref": "#/components/schemas/PolicySnapshotIdentifyMethodFactor" } }, "sourceScope": { "type": "string" } } }, "PolicySnapshotLegalInformationEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "type": "string" }, "sourceScope": { "type": "string" } } }, "PolicySnapshotNumericEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "type": "integer", "format": "int64" }, "sourceScope": { "type": "string" } } }, "PolicySnapshotSignatureMethodSetting": { "allOf": [ { "$ref": "#/components/schemas/AdminSignatureMethodSetting" }, { "type": "object", "properties": { "identifyMethod": { "type": "string", "nullable": true }, "needCode": { "type": "boolean" }, "hasConfirmCode": { "type": "boolean" }, "blurredEmail": { "type": "string" }, "hashOfEmail": { "type": "string" }, "blurredIdentifier": { "type": "string" }, "hashOfIdentifier": { "type": "string" }, "hasSignatureFile": { "type": "boolean" } } } ] }, "PolicySnapshotSignatureRejectionBehaviorEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "$ref": "#/components/schemas/SignatureRejectionBehavior" }, "sourceScope": { "type": "string" } } }, "PolicySnapshotSignatureRejectionCommentModeEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "$ref": "#/components/schemas/SignatureRejectionCommentMode" }, "sourceScope": { "type": "string" } } }, "PolicySnapshotSignatureRejectionVisibilityEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "$ref": "#/components/schemas/SignatureRejectionVisibility" }, "sourceScope": { "type": "string" } } }, "PolicySnapshotSignerGeolocationEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "$ref": "#/components/schemas/PolicySnapshotSignerGeolocationValue" }, "sourceScope": { "type": "string" } } }, "PolicySnapshotSignerGeolocationValue": { "type": "object", "required": [ "mode" ], "properties": { "mode": { "$ref": "#/components/schemas/SignerGeolocationPolicyMode" } } }, "PolicySnapshotSignerIpGeolocationEntry": { "type": "object", "required": [ "effectiveValue", "sourceScope" ], "properties": { "effectiveValue": { "$ref": "#/components/schemas/PolicySnapshotSignerIpGeolocationValue" }, "sourceScope": { "type": "string" } } }, "PolicySnapshotSignerIpGeolocationValue": { "type": "object", "required": [ "mode" ], "properties": { "mode": { "$ref": "#/components/schemas/SignerIpGeolocationPolicyMode" } } }, "ProgressError": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "code": { "type": "integer", "format": "int64" }, "timestamp": { "type": "string" }, "fileId": { "type": "integer", "format": "int64" }, "signRequestId": { "type": "integer", "format": "int64" }, "signRequestUuid": { "type": "string" } } }, "ProgressFile": { "type": "object", "required": [ "id", "name", "status", "statusText" ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "status": { "type": "integer", "format": "int64" }, "statusText": { "type": "string" }, "error": { "$ref": "#/components/schemas/ProgressError" } } }, "ProgressPayload": { "type": "object", "required": [ "total", "signed", "inProgress", "pending" ], "properties": { "total": { "type": "integer", "format": "int64" }, "signed": { "type": "integer", "format": "int64" }, "inProgress": { "type": "integer", "format": "int64" }, "pending": { "type": "integer", "format": "int64" }, "errors": { "type": "integer", "format": "int64" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/ProgressFile" } }, "signers": { "type": "array", "items": { "$ref": "#/components/schemas/ProgressSigner" } } } }, "ProgressResponse": { "type": "object", "required": [ "status", "statusCode", "statusText", "fileId", "progress" ], "properties": { "status": { "type": "string", "enum": [ "NOT_LIBRESIGN_FILE", "DRAFT", "ABLE_TO_SIGN", "PARTIAL_SIGNED", "SIGNED", "DELETED", "SIGNING_IN_PROGRESS", "ERROR", "UNKNOWN" ] }, "statusCode": { "type": "integer", "format": "int64" }, "statusText": { "type": "string" }, "fileId": { "type": "integer", "format": "int64" }, "progress": { "$ref": "#/components/schemas/ProgressPayload" }, "file": { "$ref": "#/components/schemas/ValidatedFile" }, "error": { "$ref": "#/components/schemas/ProgressError" } } }, "ProgressSigner": { "type": "object", "required": [ "id", "displayName", "signed", "status" ], "properties": { "id": { "type": "integer", "format": "int64" }, "displayName": { "type": "string" }, "signed": { "type": "string", "nullable": true }, "status": { "type": "integer", "format": "int64" } } }, "PublicCapabilities": { "type": "object", "properties": { "libresign": { "$ref": "#/components/schemas/Capabilities" } } }, "ReminderSettings": { "type": "object", "required": [ "days_before", "days_between", "max", "send_timer" ], "properties": { "days_before": { "type": "integer", "format": "int64", "minimum": 0 }, "days_between": { "type": "integer", "format": "int64", "minimum": 0 }, "max": { "type": "integer", "format": "int64", "minimum": 0 }, "send_timer": { "type": "string" }, "next_run": { "type": "string" } } }, "RequestedBy": { "type": "object", "required": [ "userId", "displayName" ], "properties": { "userId": { "type": "string" }, "displayName": { "type": "string", "nullable": true } } }, "RootCertificate": { "type": "object", "required": [ "commonName", "names" ], "properties": { "commonName": { "type": "string" }, "names": { "type": "array", "items": { "$ref": "#/components/schemas/RootCertificateName" } } } }, "RootCertificateName": { "type": "object", "required": [ "id", "value" ], "properties": { "id": { "type": "string" }, "value": { "nullable": true, "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } }, "Settings": { "type": "object", "required": [ "canSign", "canRequestSign", "phoneNumber", "hasSignatureFile", "needIdentificationDocuments", "identificationDocumentsWaitingApproval" ], "properties": { "canSign": { "type": "boolean" }, "canRequestSign": { "type": "boolean" }, "phoneNumber": { "type": "string" }, "hasSignatureFile": { "type": "boolean" }, "isApprover": { "type": "boolean" }, "needIdentificationDocuments": { "type": "boolean" }, "identificationDocumentsWaitingApproval": { "type": "boolean" } } }, "SignActionErrorResponse": { "type": "object", "required": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/ActionErrorWithCode" } }, "redirect": { "type": "string" } } }, "SignActionResponse": { "type": "object", "required": [ "action" ], "properties": { "action": { "type": "integer", "format": "int64" }, "message": { "type": "string" }, "file": { "$ref": "#/components/schemas/FileUuidReference" }, "job": { "$ref": "#/components/schemas/SigningJob" } } }, "SignatureMethod": { "type": "object", "required": [ "enabled", "label", "name" ], "properties": { "enabled": { "type": "boolean" }, "label": { "type": "string" }, "name": { "type": "string" } } }, "SignatureMethodEmailToken": { "type": "object", "required": [ "label", "identifyMethod", "needCode", "hasConfirmCode", "blurredEmail", "hashOfEmail" ], "properties": { "label": { "type": "string" }, "identifyMethod": { "type": "string", "enum": [ "email", "account" ] }, "needCode": { "type": "boolean" }, "hasConfirmCode": { "type": "boolean" }, "blurredEmail": { "type": "string" }, "hashOfEmail": { "type": "string" } } }, "SignatureMethodPassword": { "type": "object", "required": [ "label", "name", "hasSignatureFile" ], "properties": { "label": { "type": "string" }, "name": { "type": "string" }, "hasSignatureFile": { "type": "boolean" } } }, "SignatureMethods": { "type": "object", "properties": { "clickToSign": { "$ref": "#/components/schemas/SignatureMethod" }, "emailToken": { "$ref": "#/components/schemas/SignatureMethodEmailToken" }, "password": { "$ref": "#/components/schemas/SignatureMethodPassword" } } }, "SignatureRejectionBehavior": { "type": "string", "enum": [ "cancel", "continue" ] }, "SignatureRejectionCommentMode": { "type": "string", "enum": [ "disabled", "optional", "required" ] }, "SignatureRejectionResponse": { "type": "object", "required": [ "message", "signRequestId", "status", "statusText", "rejectedAt", "workflowCanceled" ], "properties": { "message": { "type": "string" }, "signRequestId": { "type": "integer", "format": "int64" }, "status": { "type": "integer", "format": "int64" }, "statusText": { "type": "string" }, "rejectedAt": { "type": "string" }, "workflowCanceled": { "type": "boolean" } } }, "SignatureRejectionVisibility": { "type": "string", "enum": [ "requester", "participants", "public" ] }, "SignerCertificateInfo": { "type": "object", "properties": { "serialNumber": { "type": "string" }, "serialNumberHex": { "type": "string" }, "hash": { "type": "string" }, "subject": { "$ref": "#/components/schemas/DynamicMetadataValue" } } }, "SignerDetail": { "allOf": [ { "$ref": "#/components/schemas/SignerSummary" }, { "type": "object", "required": [ "description", "request_sign_date", "me", "visibleElements" ], "properties": { "description": { "type": "string", "nullable": true }, "subject": { "type": "string" }, "request_sign_date": { "type": "string" }, "valid_from": { "type": "integer", "format": "int64", "minimum": 0 }, "valid_to": { "type": "integer", "format": "int64", "minimum": 0 }, "remote_address": { "type": "string" }, "user_agent": { "type": "string" }, "notify": { "type": "array", "items": { "$ref": "#/components/schemas/Notify" } }, "userId": { "type": "string" }, "sign_date": { "type": "string", "nullable": true }, "sign_request_uuid": { "type": "string" }, "hash_algorithm": { "type": "string" }, "covers_entire_document": { "type": "boolean" }, "document_modification_state": { "type": "string", "enum": [ "unchanged", "unsigned_content", "trailing_data", "invalid_byte_range", "invalid_eof_boundary" ] }, "me": { "type": "boolean" }, "signingOrder": { "type": "integer", "format": "int64", "minimum": 0 }, "visibleElements": { "type": "array", "items": { "$ref": "#/components/schemas/VisibleElement" } }, "signatureMethods": { "$ref": "#/components/schemas/SignatureMethods" }, "uid": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/SignerMetadata" }, "rejection": { "$ref": "#/components/schemas/SignerRejection" } } } ] }, "SignerDeviceGeolocation": { "type": "object", "required": [ "status" ], "properties": { "status": { "$ref": "#/components/schemas/GeolocationCollectionStatus" }, "latitude": { "type": "number", "format": "double" }, "longitude": { "type": "number", "format": "double" }, "accuracy": { "type": "number", "format": "double" }, "timestamp": { "type": "integer", "format": "int64" } } }, "SignerDisplayStatus": { "type": "string", "enum": [ "draft", "ready_to_sign", "signed", "rejected", "observing", "not_signed" ] }, "SignerGeolocation": { "type": "object", "properties": { "device": { "$ref": "#/components/schemas/SignerDeviceGeolocation" }, "ip": { "$ref": "#/components/schemas/SignerIpGeolocation" } } }, "SignerGeolocationPolicyMode": { "type": "string", "enum": [ "disabled", "optional", "required" ] }, "SignerIpGeolocation": { "type": "object", "required": [ "status" ], "properties": { "status": { "$ref": "#/components/schemas/SignerIpGeolocationStatus" }, "sourceIp": { "type": "string" }, "countryCode": { "type": "string" }, "country": { "type": "string" }, "regionCode": { "type": "string" }, "region": { "type": "string" }, "city": { "type": "string" }, "latitude": { "type": "number", "format": "double" }, "longitude": { "type": "number", "format": "double" }, "accuracyRadius": { "type": "integer", "format": "int64" }, "reason": { "$ref": "#/components/schemas/SignerIpGeolocationUnavailableReason" } } }, "SignerIpGeolocationPolicyMode": { "type": "string", "enum": [ "disabled", "enabled" ] }, "SignerIpGeolocationStatus": { "type": "string", "enum": [ "resolved", "not_found", "unavailable" ] }, "SignerIpGeolocationUnavailableReason": { "type": "string", "enum": [ "database_not_ready", "address_unavailable", "lookup_failed" ] }, "SignerMetadata": { "type": "object", "properties": { "remote-address": { "type": "string" }, "user-agent": { "type": "string" }, "deviceGeolocationRequirement": { "$ref": "#/components/schemas/GeolocationRequirement" }, "geolocation": { "$ref": "#/components/schemas/SignerGeolocation" }, "notify": { "type": "array", "items": { "$ref": "#/components/schemas/Notify" } }, "certificate_info": { "$ref": "#/components/schemas/SignerCertificateInfo" } } }, "SignerRejection": { "type": "object", "required": [ "rejectedAt" ], "properties": { "rejectedAt": { "type": "string" }, "comment": { "type": "string" }, "commentPrivate": { "type": "boolean" } } }, "SignerSummary": { "type": "object", "required": [ "signRequestId", "displayName", "signed", "displayStatus", "statusText" ], "properties": { "signRequestId": { "type": "integer", "format": "int64" }, "displayName": { "type": "string" }, "email": { "type": "string", "nullable": true }, "identifyMethods": { "type": "array", "items": { "$ref": "#/components/schemas/IdentifyMethod" } }, "signed": { "type": "string", "nullable": true }, "displayStatus": { "$ref": "#/components/schemas/SignerDisplayStatus" }, "status": { "type": "integer", "format": "int64", "enum": [ 0, 1, 2, 3, 4 ] }, "statusText": { "type": "string" }, "participantRole": { "$ref": "#/components/schemas/ParticipantRole" } } }, "SigningJob": { "type": "object", "required": [ "status", "file" ], "properties": { "status": { "type": "string", "enum": [ "SIGNING_IN_PROGRESS" ] }, "file": { "$ref": "#/components/schemas/FileUuidReference" } } }, "StatusMessageResponse": { "type": "object", "required": [ "message", "status" ], "properties": { "message": { "type": "string" }, "status": { "type": "string" } } }, "SuccessStatusResponse": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "success" ] } } }, "SystemPolicyResponse": { "type": "object", "required": [ "policy" ], "properties": { "policy": { "$ref": "#/components/schemas/SystemPolicyState" } } }, "SystemPolicyState": { "type": "object", "required": [ "policyKey", "scope", "value", "allowChildOverride", "visibleToChild", "allowedValues" ], "properties": { "policyKey": { "type": "string" }, "scope": { "type": "string", "enum": [ "system", "global" ] }, "value": { "$ref": "#/components/schemas/EffectivePolicyValue", "nullable": true }, "allowChildOverride": { "type": "boolean" }, "visibleToChild": { "type": "boolean" }, "allowedValues": { "type": "array", "items": { "$ref": "#/components/schemas/EffectivePolicyValue" } } } }, "SystemPolicyWriteRequest": { "type": "object", "required": [ "value" ], "properties": { "value": { "$ref": "#/components/schemas/EffectivePolicyValue" } } }, "SystemPolicyWriteResponse": { "allOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "$ref": "#/components/schemas/EffectivePolicyResponse" } ] }, "UserCompoundPolicyWriteResponse": { "allOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "type": "object", "required": [ "policies" ], "properties": { "policies": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/UserPolicyState" } } } } ] }, "UserElement": { "type": "object", "required": [ "id", "type", "file", "userId", "starred", "createdAt" ], "properties": { "id": { "type": "integer", "format": "int64" }, "type": { "type": "string" }, "file": { "type": "object", "required": [ "url", "nodeId" ], "properties": { "url": { "type": "string" }, "nodeId": { "type": "integer", "format": "int64" } } }, "userId": { "type": "string" }, "starred": { "type": "boolean" }, "createdAt": { "type": "string" } } }, "UserElementsMessageResponse": { "type": "object", "required": [ "elements", "message" ], "properties": { "elements": { "type": "array", "items": { "$ref": "#/components/schemas/UserElement" } }, "message": { "type": "string" } } }, "UserElementsResponse": { "type": "object", "required": [ "elements" ], "properties": { "elements": { "type": "array", "items": { "$ref": "#/components/schemas/UserElement" } } } }, "UserPolicyResponse": { "type": "object", "required": [ "policy" ], "properties": { "policy": { "$ref": "#/components/schemas/UserPolicyState" } } }, "UserPolicyState": { "type": "object", "required": [ "policyKey", "scope", "targetId", "value", "allowChildOverride" ], "properties": { "policyKey": { "type": "string" }, "scope": { "type": "string", "enum": [ "user_policy" ] }, "targetId": { "type": "string" }, "value": { "$ref": "#/components/schemas/EffectivePolicyValue", "nullable": true }, "allowChildOverride": { "type": "boolean" } } }, "UserPolicyWriteResponse": { "allOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "$ref": "#/components/schemas/UserPolicyResponse" } ] }, "ValidateMetadata": { "type": "object", "required": [ "extension", "p" ], "properties": { "extension": { "type": "string" }, "p": { "type": "integer", "format": "int64" }, "d": { "type": "array", "items": { "type": "object", "required": [ "w", "h" ], "properties": { "w": { "type": "number", "format": "double" }, "h": { "type": "number", "format": "double" } } } }, "original_file_deleted": { "type": "boolean" }, "policy_snapshot": { "$ref": "#/components/schemas/ValidatePolicySnapshot" }, "pdfVersion": { "type": "string" }, "status_changed_at": { "type": "string" } } }, "ValidatePolicySnapshot": { "type": "object", "properties": { "docmdp": { "$ref": "#/components/schemas/PolicySnapshotNumericEntry" }, "signature_flow": { "$ref": "#/components/schemas/PolicySnapshotEntry" }, "add_footer": { "$ref": "#/components/schemas/PolicySnapshotEntry" }, "legal_information": { "$ref": "#/components/schemas/PolicySnapshotLegalInformationEntry" }, "identification_documents": { "$ref": "#/components/schemas/PolicySnapshotIdentificationDocumentsEntry" }, "identify_methods": { "$ref": "#/components/schemas/PolicySnapshotIdentifyMethodsEntry" }, "signer_device_geolocation": { "$ref": "#/components/schemas/PolicySnapshotSignerGeolocationEntry" }, "signer_ip_geolocation": { "$ref": "#/components/schemas/PolicySnapshotSignerIpGeolocationEntry" }, "enable_observer_profile": { "$ref": "#/components/schemas/PolicySnapshotBooleanEntry" }, "rejection_enabled": { "$ref": "#/components/schemas/PolicySnapshotBooleanEntry" }, "rejection_behavior": { "$ref": "#/components/schemas/PolicySnapshotSignatureRejectionBehaviorEntry" }, "rejection_comment_mode": { "$ref": "#/components/schemas/PolicySnapshotSignatureRejectionCommentModeEntry" }, "rejection_visibility": { "$ref": "#/components/schemas/PolicySnapshotSignatureRejectionVisibilityEntry" }, "rejection_comment_visibility": { "$ref": "#/components/schemas/PolicySnapshotSignatureRejectionVisibilityEntry" } } }, "ValidatedChildFile": { "type": "object", "required": [ "id", "uuid", "name", "status", "statusText", "nodeId", "size", "signers", "metadata" ], "properties": { "id": { "type": "integer", "format": "int64" }, "uuid": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "integer", "format": "int64" }, "statusText": { "type": "string" }, "nodeId": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int64", "minimum": 0 }, "size": { "type": "integer", "format": "int64", "minimum": 0 }, "pdfVersion": { "type": "string" }, "signers": { "type": "array", "items": { "$ref": "#/components/schemas/ValidatedChildSigner" } }, "file": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/ValidateMetadata" } } }, "ValidatedChildSigner": { "allOf": [ { "$ref": "#/components/schemas/SignerSummary" }, { "type": "object", "properties": { "visibleElements": { "type": "array", "items": { "$ref": "#/components/schemas/VisibleElement" } } } } ] }, "ValidatedFile": { "type": "object", "required": [ "id", "uuid", "name", "status", "statusText", "nodeId", "nodeType", "signatureFlow", "docmdpLevel", "filesCount", "files", "totalPages", "size", "pdfVersion", "created_at", "requested_by" ], "properties": { "id": { "type": "integer", "format": "int64" }, "uuid": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "integer", "format": "int64", "enum": [ 0, 1, 2, 3, 4, 6 ] }, "statusText": { "type": "string" }, "nodeId": { "type": "integer", "format": "int64", "minimum": 0 }, "nodeType": { "type": "string", "enum": [ "file", "envelope" ] }, "signatureFlow": { "type": "string", "enum": [ "none", "parallel", "ordered_numeric" ] }, "policySnapshotFrozen": { "type": "boolean" }, "docmdpLevel": { "type": "integer", "format": "int64" }, "filesCount": { "type": "integer", "format": "int64", "minimum": 0 }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/ValidatedChildFile" } }, "totalPages": { "type": "integer", "format": "int64", "minimum": 0 }, "size": { "type": "integer", "format": "int64", "minimum": 0 }, "pdfVersion": { "type": "string" }, "created_at": { "type": "string" }, "requested_by": { "$ref": "#/components/schemas/RequestedBy" }, "file": { "type": "string" }, "url": { "type": "string" }, "mime": { "type": "string" }, "pages": { "type": "array", "items": { "$ref": "#/components/schemas/ValidationPage" } }, "metadata": { "$ref": "#/components/schemas/ValidateMetadata" }, "signers": { "type": "array", "items": { "$ref": "#/components/schemas/SignerDetail" } }, "signersCount": { "type": "integer", "format": "int64", "minimum": 0 }, "settings": { "$ref": "#/components/schemas/Settings" }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/InfoMessage" } }, "visibleElements": { "type": "array", "items": { "$ref": "#/components/schemas/VisibleElement" } } } }, "ValidatedFileResponse": { "allOf": [ { "$ref": "#/components/schemas/ValidatedFile" }, { "type": "object", "properties": { "effective_policies": { "$ref": "#/components/schemas/EffectivePoliciesResponse" } } } ] }, "ValidationPage": { "type": "object", "required": [ "number", "url", "resolution" ], "properties": { "number": { "type": "integer", "format": "int64" }, "url": { "type": "string" }, "resolution": { "$ref": "#/components/schemas/ValidationPageResolution" } } }, "ValidationPageResolution": { "type": "object", "required": [ "w", "h" ], "properties": { "w": { "type": "number", "format": "double" }, "h": { "type": "number", "format": "double" } } }, "VisibleElement": { "type": "object", "required": [ "elementId", "signRequestId", "fileId", "type", "coordinates" ], "properties": { "elementId": { "type": "integer", "format": "int64" }, "signRequestId": { "type": "integer", "format": "int64" }, "fileId": { "type": "integer", "format": "int64" }, "type": { "type": "string" }, "coordinates": { "$ref": "#/components/schemas/Coordinate" } } } } }, "paths": { "/index.php/apps/libresign/certificate-policy.pdf": { "get": { "operationId": "certificate_policy-get-certificate-policy", "summary": "Certificate policy of this instance", "tags": [ "certificate_policy" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "responses": { "200": { "description": "OK", "headers": { "Content-Disposition": { "schema": { "type": "string", "enum": [ "inline; filename=\"certificate-policy.pdf\"" ] } } }, "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": {} } } } } } }, "/index.php/apps/libresign/crl/libresign_{instanceId}_{generation}_{engineType}.crl": { "get": { "operationId": "crl-get-revocation-list", "summary": "Get Certificate Revocation List in DER format (RFC 5280 compliant)", "tags": [ "crl" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "instanceId", "in": "path", "description": "Instance identifier", "required": true, "schema": { "type": "string" } }, { "name": "generation", "in": "path", "description": "Generation identifier", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "engineType", "in": "path", "description": "Engine type identifier", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "CRL retrieved successfully in DER format", "content": { "*/*": { "schema": { "type": "string", "format": "binary" } } } }, "500": { "description": "Failed to generate CRL", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CrlErrorResponse" } } } } } } }, "/index.php/apps/libresign/crl/check/{serialNumber}": { "get": { "operationId": "crl-check-certificate-status", "summary": "Check certificate revocation status", "tags": [ "crl" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "serialNumber", "in": "path", "description": "Certificate serial number to check", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Certificate status retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CrlCertificateStatusResponse" } } } }, "400": { "description": "Invalid serial number format", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CrlErrorResponse" } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/account/create/{uuid}": { "post": { "operationId": "account-create-to-sign", "summary": "Create account to sign a document", "tags": [ "account" ], "security": [ {}, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "email", "password" ], "properties": { "email": { "type": "string", "description": "email to the new account" }, "password": { "type": "string", "description": "the password to then new account" }, "signPassword": { "type": "string", "nullable": true, "description": "The password to create certificate" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "Sign request uuid to allow account creation", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CreateToSignResponse" } } } } } } } }, "422": { "description": "Validation page not accessible if unauthenticated", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ActionMessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/account/signature": { "post": { "operationId": "account-signature-generate", "summary": "Create PFX file using self-signed certificate", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "signPassword" ], "properties": { "signPassword": { "type": "string", "description": "The password that will be used to encrypt the certificate file" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Settings saved", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object" } } } } } } } }, "401": { "description": "Failure to create PFX file", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/account/me": { "get": { "operationId": "account-me", "summary": "Who am I", "description": "Validates API access data and returns the authenticated user's data.", "tags": [ "account" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/AccountMeResponse" } } } } } } } }, "404": { "description": "Invalid user or password", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/account/settings": { "patch": { "operationId": "account-update-settings", "summary": "Update the account phone number", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "phone": { "type": "string", "nullable": true, "description": "the phone number to be defined. If null will remove the phone number" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Settings saved", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/AccountSettingsUpdateResponse" } } } } } } } }, "404": { "description": "Invalid data to update phone number", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/account/pfx": { "delete": { "operationId": "account-delete-pfx", "summary": "Delete PFX file", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "202": { "description": "Certificate deleted with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } }, "post": { "operationId": "account-upload-pfx", "summary": "Upload PFX file", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "202": { "description": "Certificate saved with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "400": { "description": "No file provided or other problem with provided file", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } }, "patch": { "operationId": "account-update-pfx-password", "summary": "Update PFX file", "description": "Used to change the password of PFX file", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "current", "new" ], "properties": { "current": { "type": "string", "description": "Current password" }, "new": { "type": "string", "description": "New password" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "202": { "description": "Certificate saved with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "400": { "description": "No file provided or other problem with provided file", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/account/pfx/read": { "post": { "operationId": "account-read-pfx-data", "summary": "Read content of PFX file", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "password" ], "properties": { "password": { "type": "string", "description": "password of PFX file to decrypt the file and return his content" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "202": { "description": "Certificate saved with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CertificatePfxData" } } } } } } } }, "400": { "description": "No file provided or other problem with provided file", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/account/config/{key}": { "put": { "operationId": "account-set-config", "summary": "Set user config value", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "key", "in": "path", "description": "Config key", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Config updated", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ConfigValueResponse" } } } } } } } }, "400": { "description": "Error updating config", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/validate/uuid/{uuid}": { "get": { "operationId": "file-validate-uuid", "summary": "Validate a file using Uuid", "description": "Validate a file returning file data. The response always includes `filesCount` and `files`. For `nodeType=file`, `filesCount=1` and `files` contains the current file. For `nodeType=envelope`, `files` contains envelope child files.", "tags": [ "file" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "The UUID of the LibreSign file", "required": true, "schema": { "type": "string" } }, { "name": "showVisibleElements", "in": "query", "description": "Whether to include visible elements in the response", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "showMessages", "in": "query", "description": "Whether to include validation messages in the response", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "showValidateFile", "in": "query", "description": "Whether to include the file payload in the response", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ValidatedFileResponse" } } } } } } } }, "404": { "description": "Request failed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ActionErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/validate/file_id/{fileId}": { "get": { "operationId": "file-validate-file-id", "summary": "Validate a file using FileId", "description": "Validate a file returning file data. The response always includes `filesCount` and `files`. For `nodeType=file`, `filesCount=1` and `files` contains the current file. For `nodeType=envelope`, `files` contains envelope child files.", "tags": [ "file" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "The identifier value of the LibreSign file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "showVisibleElements", "in": "query", "description": "Whether to include visible elements in the response", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "showMessages", "in": "query", "description": "Whether to include validation messages in the response", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "showValidateFile", "in": "query", "description": "Whether to include the file payload in the response", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ValidatedFileResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "404": { "description": "Request failed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ActionErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/validate": { "post": { "operationId": "file-validate-binary", "summary": "Validate a binary file", "description": "Validate a binary file returning file data. Use field 'file' for the file upload. The response always includes `filesCount` and `files`. For `nodeType=file`, `filesCount=1` and `files` contains the current file. For `nodeType=envelope`, `files` contains envelope child files.", "tags": [ "file" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ValidatedFileResponse" } } } } } } } }, "404": { "description": "Request failed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ActionErrorResponse" } } } } } } } }, "400": { "description": "Request failed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ActionErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/list": { "get": { "operationId": "file-list", "summary": "List identification documents that need to be approved", "tags": [ "file" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "page", "in": "query", "description": "the number of page to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "length", "in": "query", "description": "Total of elements to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "signer_uuid", "in": "query", "description": "Signer UUID", "schema": { "type": "string", "nullable": true } }, { "name": "fileIds[]", "in": "query", "description": "The list of fileIds (database file IDs). It's the ids of LibreSign files", "schema": { "type": "array", "nullable": true, "items": { "type": "integer", "format": "int64" } } }, { "name": "nodeIds[]", "in": "query", "description": "The list of nodeIds. It's the ids of files at Nextcloud", "schema": { "type": "array", "nullable": true, "items": { "type": "integer", "format": "int64" } } }, { "name": "status[]", "in": "query", "description": "Status could be none or many of 0 = draft, 1 = able to sign, 2 = partial signed, 3 = signed, 4 = deleted.", "schema": { "type": "array", "nullable": true, "items": { "type": "integer", "format": "int64" } } }, { "name": "start", "in": "query", "description": "Start date of signature request (UNIX timestamp)", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "end", "in": "query", "description": "End date of signature request (UNIX timestamp)", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "sortBy", "in": "query", "description": "Name of the column to sort by", "schema": { "type": "string", "nullable": true } }, { "name": "sortDirection", "in": "query", "description": "Ascending or descending order", "schema": { "type": "string", "nullable": true } }, { "name": "parentFileId", "in": "query", "description": "Filter files by parent envelope file ID", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "details", "in": "query", "description": "Whether to return the detailed payload instead of the lightweight summary payload", "schema": { "type": "integer", "default": 0, "enum": [ 0, 1 ] } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FileListResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/thumbnail/{nodeId}": { "get": { "operationId": "file-get-thumbnail", "summary": "Return the thumbnail of a LibreSign file", "tags": [ "file" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "The nodeId of document", "required": true, "schema": { "type": "integer", "format": "int64", "default": -1 } }, { "name": "x", "in": "query", "description": "Width of generated file", "schema": { "type": "integer", "format": "int64", "default": 32 } }, { "name": "y", "in": "query", "description": "Height of generated file", "schema": { "type": "integer", "format": "int64", "default": 32 } }, { "name": "a", "in": "query", "description": "Crop, boolean value, default false", "schema": { "type": "integer", "default": 0, "enum": [ 0, 1 ] } }, { "name": "forceIcon", "in": "query", "description": "Force to generate a new thumbnail", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "mode", "in": "query", "description": "To force a given mimetype for the file", "schema": { "type": "string", "default": "fill" } }, { "name": "mimeFallback", "in": "query", "description": "If we have no preview enabled, we can redirect to the mime icon if any", "schema": { "type": "integer", "default": 0, "enum": [ 0, 1 ] } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "303": { "description": "Redirect", "headers": { "Location": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/thumbnail/file_id/{fileId}": { "get": { "operationId": "file-get-thumbnail-by-file-id", "summary": "Return the thumbnail of a LibreSign file by fileId", "tags": [ "file" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "The LibreSign fileId (database id)", "required": true, "schema": { "type": "integer", "format": "int64", "default": -1 } }, { "name": "x", "in": "query", "description": "Width of generated file", "schema": { "type": "integer", "format": "int64", "default": 32 } }, { "name": "y", "in": "query", "description": "Height of generated file", "schema": { "type": "integer", "format": "int64", "default": 32 } }, { "name": "a", "in": "query", "description": "Crop, boolean value, default false", "schema": { "type": "integer", "default": 0, "enum": [ 0, 1 ] } }, { "name": "forceIcon", "in": "query", "description": "Force to generate a new thumbnail", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "mode", "in": "query", "description": "To force a given mimetype for the file", "schema": { "type": "string", "default": "fill" } }, { "name": "mimeFallback", "in": "query", "description": "If we have no preview enabled, we can redirect to the mime icon if any", "schema": { "type": "integer", "default": 0, "enum": [ 0, 1 ] } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "303": { "description": "Redirect", "headers": { "Location": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file": { "post": { "operationId": "file-save", "summary": "Send a file", "description": "Send a new file to Nextcloud and return the fileId used to create a signature request. Files must be uploaded as multipart/form-data with field name 'file[]' or 'files[]'.\n**Note on multiple file uploads:** PHP has a limit on the number of files that can be uploaded in a single request (max_file_uploads directive, default 20). When uploading many files (more than 20), consider uploading them sequentially in multiple requests or use individual file uploads like the Files app does.", "tags": [ "file" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "file": { "$ref": "#/components/schemas/NewFile", "default": [], "description": "File to save" }, "name": { "type": "string", "default": "", "description": "The name of file to sign" }, "settings": { "$ref": "#/components/schemas/FolderSettings", "default": [], "description": "Settings to define how and where the file should be stored" }, "files": { "type": "array", "default": [], "description": "Multiple files to create an envelope (optional, use either file or files)", "items": { "$ref": "#/components/schemas/NewFile" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/DetailedFileResponse" } } } } } } } }, "422": { "description": "Failed to save data", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/{uuid}/add-file": { "post": { "operationId": "file-add-file-to-envelope", "summary": "Add file to envelope", "description": "Add one or more files to an existing envelope that is in DRAFT status. Files must be uploaded as multipart/form-data with field name 'files[]'.", "tags": [ "file" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "The UUID of the envelope", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Files added successfully", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/DetailedFileResponse" } } } } } } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "404": { "description": "Envelope not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "422": { "description": "Cannot add files (envelope not in DRAFT status or validation failed)", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/file_id/{fileId}": { "delete": { "operationId": "file-delete-file", "summary": "Delete File", "description": "This will delete the file and all data", "tags": [ "file" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "LibreSign file ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "deleteFile", "in": "query", "description": "Whether to delete the physical file from Nextcloud (default: true)", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "401": { "description": "Failed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "422": { "description": "Failed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ActionErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid}": { "post": { "operationId": "file_element-create-visible-element", "summary": "Create visible element", "description": "Create visible element of a specific file", "tags": [ "file_element" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "signRequestId" ], "properties": { "signRequestId": { "type": "integer", "format": "int64", "description": "Id of sign request" }, "elementId": { "type": "integer", "format": "int64", "nullable": true, "description": "ID of visible element. Each element has an ID that is returned on validation endpoints." }, "fileId": { "type": "integer", "format": "int64", "nullable": true, "description": "LibreSign file ID that owns the visible element" }, "type": { "type": "string", "default": "", "description": "The type of element to create, sginature, sinitial, date, datetime, text" }, "metadata": { "type": "object", "default": {}, "description": "Metadata of visible elements to associate with the document" }, "coordinates": { "$ref": "#/components/schemas/Coordinate", "default": [], "description": "Coortinates of a visible element on PDF" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of sign request. The signer UUID is what the person receives via email when asked to sign. This is not the file UUID.", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FileElementIdResponse" } } } } } } } }, "404": { "description": "Failure when create visible element", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorsResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid}/{elementId}": { "patch": { "operationId": "file_element-update-visible-element", "summary": "Update visible element", "description": "Update visible element of a specific file", "tags": [ "file_element" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "signRequestId" ], "properties": { "signRequestId": { "type": "integer", "format": "int64", "description": "Id of sign request" }, "fileId": { "type": "integer", "format": "int64", "nullable": true, "description": "LibreSign file ID that owns the visible element" }, "type": { "type": "string", "default": "", "description": "The type of element to create, sginature, sinitial, date, datetime, text" }, "metadata": { "type": "object", "default": {}, "description": "Metadata of visible elements to associate with the document" }, "coordinates": { "$ref": "#/components/schemas/Coordinate", "default": [], "description": "Coortinates of a visible element on PDF" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of sign request. The signer UUID is what the person receives via email when asked to sign. This is not the file UUID.", "required": true, "schema": { "type": "string" } }, { "name": "elementId", "in": "path", "description": "ID of visible element. Each element has an ID that is returned on validation endpoints.", "required": true, "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FileElementIdResponse" } } } } } } } }, "404": { "description": "Failure when patch visible element", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorsResponse" } } } } } } } } } }, "delete": { "operationId": "file_element-delete-visible-element", "summary": "Delete visible element", "description": "Delete visible element of a specific file", "tags": [ "file_element" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of sign request. The signer UUID is what the person receives via email when asked to sign. This is not the file UUID.", "required": true, "schema": { "type": "string" } }, { "name": "elementId", "in": "path", "description": "ID of visible element. Each element has an ID that is returned on validation endpoints.", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "404": { "description": "Failure when delete visible element or file not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorsResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/progress/{uuid}": { "get": { "operationId": "file_progress-check-progress-by-uuid", "summary": "Check file progress by sign request UUID with long-polling (similar to Talk)", "description": "Waits up to 30 seconds for status change using cache for efficiency. Returns progress for the specific sign request, not the global file status.", "tags": [ "file_progress" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "Sign request UUID", "required": true, "schema": { "type": "string" } }, { "name": "timeout", "in": "query", "description": "Maximum seconds to wait (default 30)", "schema": { "type": "integer", "format": "int64", "default": 30 } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Status and progress returned", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ProgressResponse" } } } } } } } }, "404": { "description": "Sign request not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/StatusMessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/footer-template": { "post": { "operationId": "footer_template-save-footer-template", "summary": "Save footer template and render preview", "description": "Saves the footer template and returns the rendered PDF preview.\nThis endpoint requires admin access", "tags": [ "footer_template" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "type": "string", "default": "", "description": "The Twig template to save (empty to reset to default)" }, "width": { "type": "integer", "format": "int64", "default": 595, "description": "Width of preview in points (default: 595 - A4 width)" }, "height": { "type": "integer", "format": "int64", "default": 50, "description": "Height of preview in points (default: 50)" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/footer-template/preview-pdf": { "post": { "operationId": "footer_template-preview-pdf", "summary": "Preview footer template as PDF", "tags": [ "footer_template" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "type": "string", "default": "", "description": "Template to preview" }, "width": { "type": "integer", "format": "int64", "default": 595, "description": "Width of preview in points (default: 595 - A4 width)" }, "height": { "type": "integer", "format": "int64", "default": 50, "description": "Height of preview in points (default: 50)" }, "writeQrcodeOnFooter": { "type": "boolean", "nullable": true, "description": "Whether to force QR code rendering in footer preview (null uses policy)" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/id-docs": { "post": { "operationId": "id_docs-add-files", "summary": "Add identification documents to user profile", "tags": [ "id_docs" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "files" ], "properties": { "files": { "type": "array", "description": "The list of files to add to profile", "items": { "$ref": "#/components/schemas/IdDocs" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Certificate saved with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "401": { "description": "No file provided or other problem with provided file", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/IdDocsUploadErrorResponse" } } } } } } } } } }, "get": { "operationId": "id_docs-list-unauthenticated-signer-documents", "summary": "List files of unauthenticated account", "tags": [ "id_docs" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "userId", "in": "query", "description": "User ID to filter by", "schema": { "type": "string", "nullable": true } }, { "name": "signRequestId", "in": "query", "description": "Sign request ID to filter by", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "page", "in": "query", "description": "the number of page to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "length", "in": "query", "description": "Total of elements to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Certificate saved with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/IdDocsListResponse" } } } } } } } }, "404": { "description": "No file provided or other problem with provided file", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/id-docs/{nodeId}": { "delete": { "operationId": "id_docs-delete", "summary": "Delete file from account", "tags": [ "id_docs" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "the nodeId of file to be delete", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "uuid", "in": "query", "description": "Sign request UUID for unauthenticated access", "schema": { "type": "string", "nullable": true } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "File deleted with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "401": { "description": "Failure to delete file from account", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessagesResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/id-docs/approval/list": { "get": { "operationId": "id_docs-list-to-approval", "summary": "List files that need to be approved", "tags": [ "id_docs" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "userId", "in": "query", "description": "User ID to filter by", "schema": { "type": "string", "nullable": true } }, { "name": "signRequestId", "in": "query", "description": "Sign request ID to filter by", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "page", "in": "query", "description": "the number of page to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "length", "in": "query", "description": "Total of elements to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "sortBy", "in": "query", "description": "Sort field (e.g., 'owner', 'file_type', 'status')", "schema": { "type": "string", "nullable": true } }, { "name": "sortOrder", "in": "query", "description": "Sort order (ASC or DESC)", "schema": { "type": "string", "nullable": true } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/IdDocsApprovalListResponse" } } } } } } } }, "404": { "description": "Account not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/identify-account/search": { "get": { "operationId": "identify-search", "summary": "List possible signers", "description": "Used to identify who can be invited to sign a document. The response follows Administration Settings > LibreSign > Identify method.", "tags": [ "identify" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "search", "in": "query", "description": "search params", "schema": { "type": "string", "default": "" } }, { "name": "method", "in": "query", "description": "filter by method (email, account, sms, signal, telegram, whatsapp, whatsappbusiness, xmpp)", "schema": { "type": "string", "default": "" } }, { "name": "page", "in": "query", "description": "the number of page to return. Default: 1", "schema": { "type": "integer", "format": "int64", "default": 1 } }, { "name": "limit", "in": "query", "description": "Total of elements to return. Default: 25", "schema": { "type": "integer", "format": "int64", "default": 25 } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Certificate saved with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/IdentifyAccountsResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/notify/signers": { "post": { "operationId": "notify-signers", "summary": "Notify signers of a file", "tags": [ "notify" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "fileId", "signers" ], "properties": { "fileId": { "type": "integer", "format": "int64", "description": "The identifier value of LibreSign file" }, "signers": { "type": "array", "description": "Signers data", "items": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string" } } } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Request processed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "422": { "description": "Request cannot be processed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "anyOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "$ref": "#/components/schemas/ActionErrorResponse" } ] } } } } } } } }, "502": { "description": "Transport did not confirm submission", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/DangerMessagesResponse" } } } } } } } }, "500": { "description": "Unexpected server error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/DangerMessagesResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/notify/signer": { "post": { "operationId": "notify-signer", "summary": "Notify a signer of a file", "tags": [ "notify" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "fileId", "signRequestId" ], "properties": { "fileId": { "type": "integer", "format": "int64", "description": "The identifier value of LibreSign file" }, "signRequestId": { "type": "integer", "format": "int64", "description": "The sign request id" }, "requestId": { "type": "string", "nullable": true, "description": "Optional random idempotency key (32 lowercase hex characters)" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Request processed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "422": { "description": "Request cannot be processed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "anyOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "$ref": "#/components/schemas/ActionErrorResponse" } ] } } } } } } } }, "502": { "description": "Transport did not confirm submission", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/DangerMessagesResponse" } } } } } } } }, "500": { "description": "Unexpected server error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/DangerMessagesResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/notify/status": { "get": { "operationId": "notify-status", "summary": "Read the status of one manual reminder, including each channel.", "tags": [ "notify" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "query", "description": "The LibreSign file ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "signRequestId", "in": "query", "description": "The sign request ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "requestId", "in": "query", "description": "The random idempotency key used in the POST request", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Current notification states", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/NotificationStatusResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/notify/notification": { "delete": { "operationId": "notify-notification-dismiss", "summary": "Dismiss a specific notification", "tags": [ "notify" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "objectType", "in": "query", "description": "The type of object", "required": true, "schema": { "type": "string" } }, { "name": "objectId", "in": "query", "description": "The identifier value of LibreSign file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "subject", "in": "query", "description": "The subject of notification", "required": true, "schema": { "type": "string" } }, { "name": "timestamp", "in": "query", "description": "Timestamp of notification to dismiss", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/effective": { "get": { "operationId": "policy-effective", "summary": "Effective policies bootstrap", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/EffectivePoliciesResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/group/{groupId}/{policyKey}": { "get": { "operationId": "policy-get-group", "summary": "Read a group-level policy value", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "groupId", "in": "path", "description": "Group identifier that receives the policy binding.", "required": true, "schema": { "type": "string", "pattern": "^[^/]+$" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to read for the selected group.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/GroupPolicyResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } }, "put": { "operationId": "policy-set-group", "summary": "Save a group-level policy value", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "value": { "nullable": true, "description": "Policy value to persist for the group.", "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] }, "allowChildOverride": { "type": "boolean", "default": false, "description": "Whether users and requests below this group may override the group default." } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "groupId", "in": "path", "description": "Group identifier that receives the policy binding.", "required": true, "schema": { "type": "string", "pattern": "^[^/]+$" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to persist at the group layer.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/GroupPolicyWriteResponse" } } } } } } } }, "400": { "description": "Invalid policy value", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } }, "delete": { "operationId": "policy-clear-group", "summary": "Clear a group-level policy value", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "groupId", "in": "path", "description": "Group identifier that receives the policy binding.", "required": true, "schema": { "type": "string", "pattern": "^[^/]+$" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to clear for the selected group.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/GroupPolicyWriteResponse" } } } } } } } }, "400": { "description": "Invalid policy value", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/by-policy/group/{policyKey}": { "get": { "operationId": "policy-list-group-policies", "summary": "List all explicit group-level policy values for a policy key", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to list group rules.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "policies" ], "properties": { "policies": { "type": "array", "items": { "$ref": "#/components/schemas/GroupPolicyState" } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/user/{userId}/{policyKey}": { "get": { "operationId": "policy-get-user-policy-for-user", "summary": "Read an explicit user-level policy for a target user (admin scope)", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "userId", "in": "path", "description": "Target user identifier that receives the policy assignment.", "required": true, "schema": { "type": "string", "pattern": "^[^/]+$" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to read for the selected user.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/UserPolicyResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } }, "put": { "operationId": "policy-set-user-policy-for-user", "summary": "Save an explicit user policy for a target user (admin scope)", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "value": { "nullable": true, "description": "Policy value to persist as assigned target user policy.", "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] }, "allowChildOverride": { "type": "boolean", "default": false, "description": "Whether the target user may still override the assigned value in personal preferences." } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "userId", "in": "path", "description": "Target user identifier that receives the policy assignment.", "required": true, "schema": { "type": "string", "pattern": "^[^/]+$" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to persist for the target user.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/UserPolicyWriteResponse" } } } } } } } }, "400": { "description": "Invalid policy value", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } }, "delete": { "operationId": "policy-clear-user-policy-for-user", "summary": "Clear an explicit user policy for a target user (admin scope)", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "userId", "in": "path", "description": "Target user identifier that receives the policy assignment removal.", "required": true, "schema": { "type": "string", "pattern": "^[^/]+$" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to clear for the target user.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/UserPolicyWriteResponse" } } } } } } } }, "400": { "description": "User-scope not supported", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/by-policy/user/{policyKey}": { "get": { "operationId": "policy-list-user-policies", "summary": "List all explicit user-level policy values for a policy key", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to list user rules.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "policies" ], "properties": { "policies": { "type": "array", "items": { "$ref": "#/components/schemas/UserPolicyState" } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/compound/group/{groupId}/{parentPolicyKey}": { "put": { "operationId": "policy-set-group-compound", "summary": "Save several group-level values of the same composite policy at once", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "values": { "type": "object", "default": {}, "description": "Values to persist for the group, keyed by policy identifier.", "additionalProperties": { "nullable": true, "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] } }, "allowChildOverride": { "type": "object", "default": {}, "description": "Whether users and requests below this group may override each saved value, keyed by policy identifier.", "additionalProperties": { "type": "boolean" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "groupId", "in": "path", "description": "Group identifier that receives the policy bindings.", "required": true, "schema": { "type": "string", "pattern": "^[^/]+$" } }, { "name": "parentPolicyKey", "in": "path", "description": "Policy identifier the other settings are grouped under.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/GroupCompoundPolicyWriteResponse" } } } } } } } }, "400": { "description": "Invalid policy value", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/compound/user/{parentPolicyKey}": { "put": { "operationId": "policy-set-user-preference-compound", "summary": "Save several values of the same composite policy as user preferences", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "values": { "type": "object", "default": {}, "description": "Values to persist as the current user's defaults, keyed by policy identifier.", "additionalProperties": { "nullable": true, "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "parentPolicyKey", "in": "path", "description": "Policy identifier the other settings are grouped under.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/EffectiveCompoundPolicyWriteResponse" } } } } } } } }, "400": { "description": "Invalid policy value", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/compound/user/{userId}/{parentPolicyKey}": { "put": { "operationId": "policy-set-user-policy-for-user-compound", "summary": "Save several values of the same composite policy for a target user (admin scope)", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "values": { "type": "object", "default": {}, "description": "Values to persist for the target user, keyed by policy identifier.", "additionalProperties": { "nullable": true, "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] } }, "allowChildOverride": { "type": "object", "default": {}, "description": "Whether the target user may still override each assigned value, keyed by policy identifier.", "additionalProperties": { "type": "boolean" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "userId", "in": "path", "description": "Target user identifier that receives the policy assignments.", "required": true, "schema": { "type": "string", "pattern": "^[^/]+$" } }, { "name": "parentPolicyKey", "in": "path", "description": "Policy identifier the other settings are grouped under.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/UserCompoundPolicyWriteResponse" } } } } } } } }, "400": { "description": "Invalid policy value", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/user/{policyKey}": { "put": { "operationId": "policy-set-user-preference", "summary": "Save a user policy preference", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "value": { "nullable": true, "description": "Policy value to persist as the current user's default.", "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to persist for the current user.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SystemPolicyWriteResponse" } } } } } } } }, "400": { "description": "Invalid policy value", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } }, "delete": { "operationId": "policy-clear-user-preference", "summary": "Clear a user policy preference", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to clear for the current user.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SystemPolicyWriteResponse" } } } } } } } }, "400": { "description": "User-scope not supported", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/request-signature": { "post": { "operationId": "request_signature-request-signature", "summary": "Request signature", "description": "Request that a file be signed by a list of signers. Each signer in the signers array can optionally include a 'signingOrder' field to control the order of signatures when ordered signing flow is enabled. The returned `data` always includes `filesCount` and `files`. For `nodeType=file`, `filesCount=1` and `files` contains the current file. For `nodeType=envelope`, `files` contains envelope child files.", "tags": [ "signing" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "signers": { "type": "array", "default": [], "description": "Collection of signers who must sign the document. Use identifyMethods as the canonical format. Other supported fields: displayName, description, notify, signingOrder, status, deviceGeolocationRequired", "items": { "$ref": "#/components/schemas/NewSigner" } }, "name": { "type": "string", "default": "", "description": "The name of file to sign" }, "settings": { "$ref": "#/components/schemas/FolderSettings", "default": [], "description": "Settings to define how and where the file should be stored" }, "file": { "$ref": "#/components/schemas/NewFile", "default": [], "description": "File object. Supports nodeId (a non-negative integer or its canonical decimal string, as Nextcloud node ids can exceed a JavaScript number), url, base64 or path." }, "files": { "type": "array", "default": [], "description": "Multiple files to create an envelope (optional, use either file or files). Each file supports nodeId, url, base64 or path.", "items": { "$ref": "#/components/schemas/NewFile" } }, "callback": { "type": "string", "nullable": true, "description": "URL that will receive a POST after the document is signed" }, "status": { "type": "integer", "format": "int64", "nullable": true, "default": 1, "description": "Numeric code of status * 0 - no signers * 1 - signed * 2 - pending" }, "policy": { "type": "object", "nullable": true, "description": "Structured policy payload with request-level overrides and active context.", "additionalProperties": { "type": "object" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/DetailedFileResponse" } } } } } } } }, "422": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "anyOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "$ref": "#/components/schemas/ActionErrorResponse" } ] } } } } } } } } } }, "patch": { "operationId": "request_signature-update-signature-request", "summary": "Updates signatures data", "description": "It is necessary to inform the UUID of the file and a list of signers.", "tags": [ "signing" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "signers": { "type": "array", "nullable": true, "default": [], "description": "Collection of signers who must sign the document. Use identifyMethods as the canonical format.", "items": { "$ref": "#/components/schemas/NewSigner" } }, "uuid": { "type": "string", "nullable": true, "description": "UUID of sign request. The signer UUID is what the person receives via email when asked to sign. This is not the file UUID." }, "visibleElements": { "type": "array", "nullable": true, "description": "Visible elements on document", "items": { "$ref": "#/components/schemas/VisibleElement" } }, "file": { "$ref": "#/components/schemas/NewFile", "nullable": true, "description": "File object. Supports nodeId (a non-negative integer or its canonical decimal string), url, base64 or path when creating a new request." }, "status": { "type": "integer", "format": "int64", "nullable": true, "description": "Numeric code of status * 0 - no signers * 1 - signed * 2 - pending" }, "policy": { "type": "object", "nullable": true, "description": "Structured policy payload with request-level overrides and active context.", "additionalProperties": { "type": "object" } }, "name": { "type": "string", "nullable": true, "description": "The name of file to sign" }, "settings": { "$ref": "#/components/schemas/FolderSettings", "default": [], "description": "Settings to define how and where the file should be stored" }, "files": { "type": "array", "default": [], "description": "Multiple files to create an envelope (optional, use either file or files). Each file supports nodeId, url, base64 or path.", "items": { "$ref": "#/components/schemas/NewFile" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/DetailedFileResponse" } } } } } } } }, "422": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "anyOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "$ref": "#/components/schemas/ActionErrorResponse" } ] } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId}/{signRequestId}": { "delete": { "operationId": "request_signature-remove-signer", "summary": "Delete sign request", "description": "You can only request exclusion as any sign", "tags": [ "signing" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "LibreSign file ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "signRequestId", "in": "path", "description": "The sign request id", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "401": { "description": "Failed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "422": { "description": "Failed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ActionErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId}": { "delete": { "operationId": "request_signature-delete-signature-request", "summary": "Delete sign request", "description": "You can only request exclusion as any sign", "tags": [ "signing" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "LibreSign file ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "401": { "description": "Failed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "422": { "description": "Failed", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ActionErrorResponse" } } } } } } } } } }, "post": { "operationId": "sign_file-sign-by-file-id", "summary": "Sign a file using file Id", "tags": [ "signing" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "method" ], "properties": { "method": { "type": "string", "description": "Signature method" }, "elements": { "type": "object", "default": {}, "description": "List of visible elements", "additionalProperties": { "type": "object" } }, "identifyValue": { "type": "string", "default": "", "description": "Identify value" }, "token": { "type": "string", "default": "", "description": "Token, commonly send by email" }, "async": { "type": "boolean", "default": false, "description": "Execute signing asynchronously when possible" }, "deviceGeolocation": { "type": "object", "default": {}, "description": "Device-reported geolocation metadata submitted by the signing client", "additionalProperties": { "type": "object" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "Id of LibreSign file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SignActionResponse" } } } } } } } }, "422": { "description": "Error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SignActionErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid}": { "post": { "operationId": "sign_file-sign-by-signer-uuid", "summary": "Sign a file using file UUID", "tags": [ "signing" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "method" ], "properties": { "method": { "type": "string", "description": "Signature method" }, "elements": { "type": "object", "default": {}, "description": "List of visible elements", "additionalProperties": { "type": "object" } }, "identifyValue": { "type": "string", "default": "", "description": "Identify value" }, "token": { "type": "string", "default": "", "description": "Token, commonly send by email" }, "async": { "type": "boolean", "default": false, "description": "Execute signing asynchronously when possible" }, "deviceGeolocation": { "type": "object", "default": {}, "description": "Device-reported geolocation metadata submitted by the signing client", "additionalProperties": { "type": "object" } }, "saveSignature": { "type": "boolean", "default": false, "description": "Explicitly save the external email signer's visible signature for future documents" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of LibreSign file", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SignActionResponse" } } } } } } } }, "422": { "description": "Error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SignActionErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId}/reject": { "post": { "operationId": "sign_file-reject-by-file-id", "summary": "Reject a signature request using file Id", "tags": [ "signing" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "comment": { "type": "string", "default": "", "description": "Justification sent by the signer, when the document policy accepts comments" }, "privateComment": { "type": "boolean", "default": false, "description": "Keep the comment visible only to who requested the signature" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "Id of LibreSign file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SignatureRejectionResponse" } } } } } } } }, "422": { "description": "Error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid}/reject": { "post": { "operationId": "sign_file-reject-by-signer-uuid", "summary": "Reject a signature request using the signer UUID", "tags": [ "signing" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "comment": { "type": "string", "default": "", "description": "Justification sent by the signer, when the document policy accepts comments" }, "privateComment": { "type": "boolean", "default": false, "description": "Keep the comment visible only to who requested the signature" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of the signer", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SignatureRejectionResponse" } } } } } } } }, "422": { "description": "Error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid}/renew/{method}": { "post": { "operationId": "sign_file-sign-renew", "summary": "Renew the signature method", "tags": [ "signing" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "method", "in": "path", "description": "Signature method", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid}/code": { "post": { "operationId": "sign_file-request-code-by-signer-uuid", "summary": "Get code to sign the document using UUID", "tags": [ "signing" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "identifyMethod": { "type": "string", "nullable": true, "enum": [ "account", "email" ], "description": "Identify signer method" }, "signMethod": { "type": "string", "nullable": true, "description": "Method used to sign the document, i.e. emailToken, account, clickToSign, smsToken, signalToken, telegramToken, whatsappToken, xmppToken" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of LibreSign file", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "422": { "description": "Error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId}/code": { "post": { "operationId": "sign_file-request-code-by-file-id", "summary": "Get code to sign the document using FileID", "tags": [ "signing" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "identifyMethod": { "type": "string", "nullable": true, "enum": [ "account", "email" ], "description": "Identify signer method" }, "signMethod": { "type": "string", "nullable": true, "description": "Method used to sign the document, i.e. emailToken, account, clickToSign, smsToken, signalToken, telegramToken, whatsappToken, xmppToken" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "Id of LibreSign file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "422": { "description": "Error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements": { "post": { "operationId": "signature_elements-create-signature-element", "summary": "Create signature element", "tags": [ "signature_elements" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "elements" ], "properties": { "elements": { "type": "object", "description": "Element object", "additionalProperties": { "type": "object" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/UserElementsMessageResponse" } } } } } } } }, "422": { "description": "Invalid data", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } }, "get": { "operationId": "signature_elements-get-signature-elements", "summary": "Get signature elements", "tags": [ "signature_elements" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/UserElementsResponse" } } } } } } } }, "404": { "description": "Invalid data", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/saved": { "post": { "operationId": "signature_elements-use-saved-signature-elements", "summary": "Use the saved signature elements of a signer identified by email", "description": "The saved elements are copied into the current signing session only after the signer satisfies the confirm method configured for the Email identification factor.", "tags": [ "signature_elements" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "default": "", "description": "Verification code, required when the confirm method is the email token" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/UserElementsResponse" } } } } } } } }, "422": { "description": "The saved elements cannot be used", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/preview/{nodeId}": { "get": { "operationId": "signature_elements-preview-signature-element", "summary": "Get preview of signature elements of", "tags": [ "signature_elements" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "Invalid data", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements/{nodeId}": { "get": { "operationId": "signature_elements-get-signature-element", "summary": "Get signature element of signer", "tags": [ "signature_elements" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/UserElement" } } } } } } } }, "404": { "description": "Invalid data", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } }, "patch": { "operationId": "signature_elements-patch-signature-element", "summary": "Update signature element", "tags": [ "signature_elements" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "type": "string", "default": "", "description": "The type of signature element" }, "file": { "type": "object", "default": {}, "description": "Element object", "additionalProperties": { "type": "object" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/UserElementsMessageResponse" } } } } } } } }, "422": { "description": "Error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } }, "delete": { "operationId": "signature_elements-delete-signature-element", "summary": "Delete signature element", "tags": [ "signature_elements" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/signature-stamp/preview-pdf": { "post": { "operationId": "signature_stamp_preview-preview-pdf", "summary": "Render a preview PDF of the signature stamp with the provided configuration", "tags": [ "signature_stamp_preview" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "type": "string", "default": "", "description": "Signature text template (Twig syntax)" }, "templateFontSize": { "type": "number", "format": "double", "description": "Font size for template text in pt" }, "signatureFontSize": { "type": "number", "format": "double", "description": "Font size for signer name in pt" }, "signatureWidth": { "type": "number", "format": "double", "description": "Stamp width in mm" }, "signatureHeight": { "type": "number", "format": "double", "description": "Stamp height in mm" }, "renderMode": { "type": "string", "description": "Render mode: default, text, graphic, description_only" }, "backgroundType": { "type": "string", "description": "Background: default, custom, deleted" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Preview PDF", "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "422": { "description": "Rendering error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/cfssl": { "post": { "operationId": "admin-generate-certificate-cfssl", "summary": "Generate certificate using CFSSL engine", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "rootCert" ], "properties": { "rootCert": { "type": "object", "description": "fields of root certificate", "required": [ "commonName", "names" ], "properties": { "commonName": { "type": "string" }, "names": { "type": "object", "additionalProperties": { "type": "object", "required": [ "value" ], "properties": { "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } } }, "cfsslUri": { "type": "string", "default": "", "description": "URI of CFSSL API" }, "configPath": { "type": "string", "default": "", "description": "Path of config files of CFSSL" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/EngineHandlerResponse" } } } } } } } }, "401": { "description": "Account not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/openssl": { "post": { "operationId": "admin-generate-certificate-open-ssl", "summary": "Generate certificate using OpenSSL engine", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "rootCert" ], "properties": { "rootCert": { "type": "object", "description": "fields of root certificate", "required": [ "commonName", "names" ], "properties": { "commonName": { "type": "string" }, "names": { "type": "object", "additionalProperties": { "type": "object", "required": [ "value" ], "properties": { "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } } }, "configPath": { "type": "string", "default": "", "description": "Path of config files of CFSSL" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/EngineHandlerResponse" } } } } } } } }, "401": { "description": "Account not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/engine": { "post": { "operationId": "admin-set-certificate-engine", "summary": "Set certificate engine", "description": "Sets the certificate engine (openssl, cfssl, or none) and automatically configures identify_methods when needed\nThis endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "engine" ], "properties": { "engine": { "type": "string", "description": "The certificate engine to use (openssl, cfssl, or none)" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CertificateEngineConfigResponse" } } } } } } } }, "400": { "description": "Invalid engine", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate": { "get": { "operationId": "admin-load-certificate", "summary": "Load certificate data", "description": "Return all data of root certificate and a field called `generated` with a boolean value.\nThis endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CertificateDataGenerated" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/configure-check": { "get": { "operationId": "admin-configure-check", "summary": "Check the configuration of LibreSign", "description": "Return the status of necessary configuration and tips to fix the problems.\nThis endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ConfigureChecksResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/signature-background": { "post": { "operationId": "admin-signature-background-save", "summary": "Add custom background image", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SuccessStatusResponse" } } } } } } } }, "422": { "description": "Error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FailureStatusResponse" } } } } } } } } } }, "get": { "operationId": "admin-signature-background-get", "summary": "Get custom background image", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Image returned", "content": { "*/*": { "schema": { "type": "string", "format": "binary" } } } } } }, "delete": { "operationId": "admin-signature-background-delete", "summary": "Delete background image", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Deleted with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SuccessStatusResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate-policy": { "post": { "operationId": "admin-save-certificate-policy", "summary": "Upload new certificate policy PDF for this instance", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CertificatePolicyResponse" } } } } } } } }, "422": { "description": "Upload or validation error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FailureStatusResponse" } } } } } } } } } }, "delete": { "operationId": "admin-delete-certificate-policy", "summary": "Delete certificate policy of this instance", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "success" ] } } } } } } } } } }, "422": { "description": "Error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FailureStatusResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate-policy/oid": { "post": { "operationId": "admin-update-oid", "summary": "Update OID", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "oid" ], "properties": { "oid": { "type": "string", "description": "OID is a unique numeric identifier for certificate policies in digital certificates." } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SuccessStatusResponse" } } } } } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FailureStatusResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/active-signings": { "get": { "operationId": "admin-get-active-signings", "summary": "Get list of files currently being signed (status = SIGNING_IN_PROGRESS)", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "List of active signings", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ActiveSigningsResponse" } } } } } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/geoip": { "get": { "operationId": "admin-get-geo-ip-config", "summary": "Get GeoIP database configuration and status", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "GeoIP configuration", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/GeoIpConfig" } } } } } } } } } }, "post": { "operationId": "admin-save-geo-ip-config", "summary": "Save GeoIP database path", "description": "An empty path clears the configuration. The path may be saved even when the database file is not available yet; the returned status describes the current filesystem state.\nThis endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "path": { "type": "string", "default": "", "description": "Absolute path to a MaxMind City database, or empty to clear" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "GeoIP configuration saved", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/GeoIpConfig" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/crl/list": { "get": { "operationId": "crl_api-list", "summary": "List CRL entries with pagination and filters", "description": "This endpoint requires admin access", "tags": [ "crl" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "page", "in": "query", "description": "Page number (1-based)", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "length", "in": "query", "description": "Number of items per page", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "status", "in": "query", "description": "Filter by status (issued, revoked, expired)", "schema": { "type": "string", "nullable": true } }, { "name": "engine", "in": "query", "description": "Filter by engine type", "schema": { "type": "string", "nullable": true } }, { "name": "instanceId", "in": "query", "description": "Filter by instance ID", "schema": { "type": "string", "nullable": true } }, { "name": "generation", "in": "query", "description": "Filter by generation", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "owner", "in": "query", "description": "Filter by owner", "schema": { "type": "string", "nullable": true } }, { "name": "serialNumber", "in": "query", "description": "Filter by serial number (partial match)", "schema": { "type": "string", "nullable": true } }, { "name": "revokedBy", "in": "query", "description": "Filter by who revoked the certificate", "schema": { "type": "string", "nullable": true } }, { "name": "sortBy", "in": "query", "description": "Sort field (e.g., 'revoked_at', 'issued_at', 'serial_number')", "schema": { "type": "string", "nullable": true } }, { "name": "sortOrder", "in": "query", "description": "Sort order (ASC or DESC)", "schema": { "type": "string", "nullable": true } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "CRL entries retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CrlListResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/crl/revoke": { "post": { "operationId": "crl_api-revoke", "summary": "Revoke a certificate by serial number", "description": "This endpoint requires admin access", "tags": [ "crl" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "serialNumber" ], "properties": { "serialNumber": { "type": "string", "description": "Certificate serial number to revoke" }, "reasonCode": { "type": "integer", "format": "int64", "nullable": true, "description": "Revocation reason code (0-10, see RFC 5280)" }, "reasonText": { "type": "string", "nullable": true, "description": "Optional text describing the reason" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Certificate revoked successfully", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CrlRevokeResponse" } } } } } } } }, "400": { "description": "Invalid parameters", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CrlRevokeResponse" } } } } } } } }, "404": { "description": "Certificate not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CrlRevokeResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/system/{policyKey}": { "get": { "operationId": "policy-get-system", "summary": "Read explicit system policy configuration", "description": "This endpoint requires admin access", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to read from the system layer.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SystemPolicyResponse" } } } } } } } } } }, "post": { "operationId": "policy-set-system", "summary": "Save a system-level policy value", "description": "This endpoint requires admin access", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "value": { "nullable": true, "description": "Policy value to persist as an explicit system rule, even when it equals the default. Null removes the explicit system rule: the built-in default applies and lower layers may override it.", "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] }, "allowChildOverride": { "type": "boolean", "default": false, "description": "Whether lower layers may override this system default." } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to persist at the system layer.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SystemPolicyWriteResponse" } } } } } } } }, "400": { "description": "Invalid policy value", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/compound/system/{parentPolicyKey}": { "post": { "operationId": "policy-set-system-compound", "summary": "Save several system-level values of the same composite policy at once", "description": "Settings that only make sense together are written as one operation: the policy they belong to validates the resulting configuration before any of them is stored, so the result does not depend on the order of the values.\nThis endpoint requires admin access", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "values": { "type": "object", "default": {}, "description": "Values to persist, keyed by policy identifier, each as an explicit system rule even when it equals the default. Null removes the explicit system rule of that policy: the built-in default applies and lower layers may override it.", "additionalProperties": { "nullable": true, "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] } }, "allowChildOverride": { "type": "object", "default": {}, "description": "Whether lower layers may override each saved value, keyed by policy identifier.", "additionalProperties": { "type": "boolean" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "parentPolicyKey", "in": "path", "description": "Policy identifier the other settings are grouped under.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/EffectiveCompoundPolicyWriteResponse" } } } } } } } }, "400": { "description": "Invalid policy value", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/setting/has-root-cert": { "get": { "operationId": "setting-has-root-cert", "summary": "Has root certificate", "description": "Checks whether the root certificate has been configured by checking the Nextcloud configuration table to see if the root certificate settings have", "tags": [ "setting" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/HasRootCertResponse" } } } } } } } } } } } }, "tags": [] }