Skip to main content

Create document

POST 

/documents/

Upload a Document for Analysis.

This endpoint allows the authenticated user to upload a document for analysis associated with a specific applicant. Supported document formats include PDF and image formats (JPEG, PNG), and the uploaded file is stored for processing.

Apple's HEIC format is not supported

Authentication:​

  • Requires a valid OAuth access token with the following scopes:
    • document:write
    • Or one of the internal scopes: org:staff, org:admin, admin
    • Public scopes may also be included.

Parameters:​

  • file (required, form): The document file to upload. Supported formats:
    • application/pdf
    • image/jpeg
    • image/png
  • applicant (required, form): The unique identifier (UUID) of the applicant to whom the document is associated.
  • document_type (required, form): The unique identifier (UUID) representing the type of document being uploaded.

Response:​

  • 201 Created: Returns the details of the uploaded document, including its storage reference and metadata.
  • 404 Not Found: If the applicant or the document type associated with the provided ID cannot be found.
  • 400 Bad Request: If the uploaded file is of an unsupported format or if any of the required parameters are missing.
  • 413 Payload Too Large: If the uploaded file exceeds the maximum size limit of 50 MB.
  • 403 Forbidden: If the user does not have the necessary permissions to upload the document.

Request​

Responses​

Successful Response