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
}
'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)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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nextlevelmca.com/v1/deals/{dealId}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'mime_type' => '<string>',
'file_size' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nextlevelmca.com/v1/deals/{dealId}/documents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"file_size\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nextlevelmca.com/v1/deals/{dealId}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"file_size\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nextlevelmca.com/v1/deals/{dealId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"file_size\": 2\n}"
response = http.request(request)
puts response.read_body{
"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
}
'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)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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nextlevelmca.com/v1/deals/{dealId}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'mime_type' => '<string>',
'file_size' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nextlevelmca.com/v1/deals/{dealId}/documents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"file_size\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nextlevelmca.com/v1/deals/{dealId}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"file_size\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nextlevelmca.com/v1/deals/{dealId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"file_size\": 2\n}"
response = http.request(request)
puts response.read_body{
"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?