Request a Document Analysis

On this page, you will learn how to initiate a new Document Analysis request using the API.

POST /document_analyses

curl --location --request POST '{baseUrl}/document_analyses' \
--header 'Authorization: Bearer {apiKey}' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@social_security_card.pdf' \
--form type='social_security' \
--form workspace_id='c0840991-848c-47ed-9bfa-68c9daca4793'
{
    "id": "@uuid@",
    "workspace_id": "@uuid@",
    "status": "done",
    "type": "social_security",
    "data_anonymized": false,
    "created_at": "@datetime@",
    "updated_at": "@datetime@",
    "extracted_from_document": {
        "first_name": "John",
        "last_name": "Doe",
        "social_security_number": "1234567890123",
        "full_name": "John Doe"
    }
}
Query ParamTypeDescription
filefile[required]The file containing the data to extract. Accepted formats: PDF, PNG, JPG, JPEG. Max size: 10 MB. Max number of pages for PDF: 2.
typestring[required] The type of the document you are trying to analyze. Example : social_security

In the response, you'll find the id. This value is required to retrieve the verification results.

What data are extracted ?

For the type : social_security , the following data will be extracted :

"first_name": "Leo",
"last_name": "Pignol",
"full_name": "Leo Pignol",
"social_security_number": "101111300509563"

Failure to extract all data will result in an inconclusive status.