openapi: 3.0.0 info: title: Alloy Identity Bank Accounts Documents API version: 1.0.0 description: The Alloy Identity API provides endpoints for creating and managing person and business entities, running evaluations through configurable risk workflows, managing journey applications, submitting events for ongoing monitoring, handling document verification, and managing investigations and case alerts. Authentication is via Basic HTTP credentials or OAuth 2.0 Client Credentials. contact: name: Alloy Support url: https://help.alloy.com/hc/en-us license: name: Proprietary servers: - url: https://sandbox.alloy.co/v1 description: Sandbox environment - url: https://alloy.co/v1 description: Production environment security: - basic: [] - oauth2: [] tags: - name: Documents description: The document upload API is a two-step process. First, the metadata for the document is specified, and the API returns a file identifier so the file can be streamed directly to the next endpoint. You’ll need to look for the document_token returned in the response because that is necessary to pass to the next endpoint for streaming the file. paths: /entities/{entity_token}/documents: parameters: - in: path name: entity_token schema: type: string required: true description: Token of entity for associated documents. get: tags: - Documents summary: Get a List of All Documents for an Entity description: All documents for an entity can be queried using this endpoint. All metadata for the documents is available, but the documents themselves must be downloaded individually. responses: '200': x-summary: OK description: Document content: application/json: schema: type: array items: $ref: '#/paths/~1documents~1%7Bdocument_token%7D/put/responses/200/content/application~1json/schema/items' post: tags: - Documents summary: Describe a Document Before Uploading description: The document upload API is a two-step process. First, the metadata for the document is specified, and the API returns a file identifier so the file can be streamed directly to the next endpoint. You’ll need to look for the document_token returned in the response because that is necessary to pass to the next endpoint for streaming the file. requestBody: content: application/json: schema: $ref: '#/paths/~1documents/post/requestBody/content/application~1json/schema' responses: '200': x-summary: OK description: Document content: application/json: schema: type: object $ref: '#/paths/~1documents~1%7Bdocument_token%7D/put/responses/200/content/application~1json/schema/items' /entities/{entity_token}/documents/{document_token}: parameters: - in: path name: document_token schema: type: string required: true description: Token associated with document. - in: path name: entity_token schema: type: string required: true description: Token of entity for associated documents. put: tags: - Documents summary: Submit a Document File for an Entity description: Now that that metadata for the file has been specified, you just need to stream the file to the location we’ve allocated for it. The response should be the same as for the preceding `POST` request endpoint except `uploaded` will be true. requestBody: content: application/octet-stream: schema: type: string format: binary responses: '200': x-summary: OK description: Document content: application/json: schema: type: array items: $ref: '#/paths/~1documents~1%7Bdocument_token%7D/put/responses/200/content/application~1json/schema/items' components: securitySchemes: basic: type: http description: HTTP basic authorization using a workflow token and secret scheme: basic oauth2: type: oauth2 description: OAuth2 using a workflow token and secret to generate a bearer token flows: clientCredentials: tokenUrl: /oauth/bearer scopes: {}