openapi: 3.2.0 info: title: Modulr Document API description: Modulr API license: name: © Modulr Finance url: https://www.modulrfinance.com version: '1.0' servers: - url: https://api-sandbox.modulrfinance.com/api-sandbox-token security: - modulo_security: [] tags: - name: Document description: Operations on Documents paths: /documents: post: tags: - Document summary: Uploads and stores document description: Uploads and stores document in a repository. Gives back Url encoded document path in the repository operationId: upload requestBody: content: application/json: schema: $ref: '#/components/schemas/document.DocumentUploadRequest' required: true responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/document.DocumentResponse' '400': description: Validation errors content: '*/*': schema: type: array items: $ref: '#/components/schemas/document.MessageResponse' security: - HMAC: [] - TOKEN: [] /customers/{customerId}/documents: post: tags: - Document summary: Uploads and stores documents associated with an existing customer record description: Upload and store documents related to an existing customer, typically those collected during Know Your Customer (KYC) or Know Your Business (KYB) verification processes operationId: upload_1 parameters: - name: customerId in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/document.CustomerDocumentUploadRequest' required: true responses: '204': description: NO_CONTENT '400': description: Validation errors content: '*/*': schema: type: array items: $ref: '#/components/schemas/document.MessageResponse' '403': description: Incorrect permissions security: - HMAC: [] - TOKEN: [] components: schemas: document.CustomerDocumentUploadRequest: type: object properties: fileName: type: string maxLength: 100 minLength: 0 pattern: ^[\w\s-.]+\.(\w){3,4}$ content: type: string description: Needs to be Base64 encoded minLength: 1 type: type: string description: Document type uploaded for customer enum: - ID_DOCUMENT - PROOF_OF_ADDRESS - BUSINESS_DOCUMENTATION required: - content - fileName - type document.DocumentResponse: type: object properties: path: type: string fileName: type: string document.DocumentUploadRequest: type: object properties: fileName: type: string maxLength: 100 minLength: 0 pattern: ^[\w,\s-.]+\.(\w){3,4}$ content: type: string description: Needs to be Base64 encoded minLength: 1 group: type: string description: Use to group documents together. Combination of group+filename should be unique else the files will be overwritten maxLength: 100 minLength: 0 required: - content - fileName - group document.MessageResponse: type: object properties: field: type: string code: type: string enum: - GENERAL - BUSINESSRULE - MFASTATUS - MFAERROR - MFATIMEOUT - MFADEVICEMM - MFAMESSAGEINVALID - NOTFOUND - DUPLICATE - INVALID - CONNECTION - RETRY - RATELIMIT - PERMISSION - NOTACCEPTABLE - MFAVERIFICATION - TOKENEXPIRED errorCode: type: string message: type: string sourceService: type: string securitySchemes: modulo_security: type: apiKey name: Authorization in: header TOKEN: type: apiKey name: Authorization in: header x-readme: proxy-enabled: false