Perform Document Check
Learn how to perform Document Check through the API.
Overview
This guide shows you how to run a Document check using the ComplyCube API.
You can try this check right away using our Demo Postman Collection. It’s publicly accessible and requires no account.
Integration steps

Create a document
Create a document by providing the Client ID and document type (e.g. passport, national ID).
The response will contain an id (the Document ID). It is required for the next step.
Example request for creating a document
curl -X POST https://api.complycube.com/v1/documents \
-H 'Authorization: <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"clientId":"5eb04fcd0f3e360008035eb1",
"type": "passport",
"issuingCountry": "GB"
}'const document = await complycube.document.create("5eb04fcd0f3e360008035eb1", {
type: "passport",
issuingCountry: "GB"
});document = cc_api.documents.create(
"5eb04fcd0f3e360008035eb1",
type="passport",
issuingCountry="GB"
)$doc = $ccapi->documents()->create(
'5eb04fcd0f3e360008035eb1',
[
'type' => 'passport',
'issuingCountry' => 'GB'
]
);Example response
{
"id": "5ebd40714f23960008c81527",
"type": "passport",
"issuingCountry": "GB",
"createdAt": "2025-01-04T17:25:21.116Z",
"updatedAt": "2025-01-04T17:25:21.116Z"
}Upload front side of ID
Upload a BASE64-encoded image of the front of the ID document. Depending on the document type and issuing country, both sides may be required.
Images must be in JPG, PNG, or PDF format and between 34 KB and 4 MB in size.
Below is a sample BASE64-encoded file. Download it, copy its contents, and paste them into the data attribute when making the request.
Example request for uploading the front-side image of a document
Example response
Retrieve results
ComplyCube will then run the check. You can retrieve its outcome and detailed breakdown via the API, or review the results in the Portal.
If you have set up webhooks, you’ll also receive a notification once the check is complete.
Example request for retrieving the check outcome
Example response

