curl --request POST \
--url https://api.nextlevelmca.com/v1/deals/{dealId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"mime_type": "<string>",
"file_size": 2
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', mime_type: '<string>', file_size: 2})
};
fetch('https://api.nextlevelmca.com/v1/deals/{dealId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nextlevelmca.com/v1/deals/{dealId}/documents"
payload = {
"name": "<string>",
"mime_type": "<string>",
"file_size": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"document_id": "<string>",
"upload_url": "<string>",
"upload_method": "PUT",
"headers": {},
"expires_at": "<string>"
},
"meta": {}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}Start a document upload
Two-step upload. 1. Call this with the file’s name, type and MIME type: a hidden document row is created and a presigned URL is returned. 2. PUT the raw file bytes to upload_url with the returned headers (Content-Type must match mime_type; no multipart, no auth header). 3. Call POST /documents/{document_id}/finalize so the document becomes visible and, for bank statements, coverage is recomputed. The upload URL expires after about two hours; unfinalized rows stay hidden. Send an Idempotency-Key to retry safely.
curl --request POST \
--url https://api.nextlevelmca.com/v1/deals/{dealId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"mime_type": "<string>",
"file_size": 2
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', mime_type: '<string>', file_size: 2})
};
fetch('https://api.nextlevelmca.com/v1/deals/{dealId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nextlevelmca.com/v1/deals/{dealId}/documents"
payload = {
"name": "<string>",
"mime_type": "<string>",
"file_size": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"document_id": "<string>",
"upload_url": "<string>",
"upload_method": "PUT",
"headers": {},
"expires_at": "<string>"
},
"meta": {}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
API key (nlmca_live_…) or OAuth access token
Path Parameters
Deal id
Body
File name including extension, e.g. chase-aug-2026.pdf. Path separators are stripped.
255Document type. Use bank-statement for statements you want analyzed.
application, bank-statement, tax-return, voided-check, contract, drivers-license, ach-authorization, business-license, proof-of-ownership, utility-bill, other MIME type of the file you will PUT, e.g. application/pdf, image/jpeg. Must match the Content-Type header of the upload.
100Size in bytes, if known. Verified against the stored object on finalize.
x >= 1Was this page helpful?