Mint a presigned upload session
curl --request POST \
--url https://www.presolve.com/api/v1/document-uploads \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"operation": "create",
"caseId": "<string>",
"name": "<string>",
"mimeType": "<string>",
"sizeBytes": 0,
"sha256": "<string>",
"folderId": "<string>"
}
'const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
'If-Match': '<if-match>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
operation: 'create',
caseId: '<string>',
name: '<string>',
mimeType: '<string>',
sizeBytes: 0,
sha256: '<string>',
folderId: '<string>'
})
};
fetch('https://www.presolve.com/api/v1/document-uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.presolve.com/api/v1/document-uploads"
payload = {
"operation": "create",
"caseId": "<string>",
"name": "<string>",
"mimeType": "<string>",
"sizeBytes": 0,
"sha256": "<string>",
"folderId": "<string>"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"If-Match": "<if-match>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}Documents
Mint a presigned upload session
Create-or-replace presigned upload (max 2 GiB). Complete with POST /document-uploads//complete.
Requires the documents:write scope. Mutations require an X-Idempotency-Key header (responses are stored for replay; reusing a key with a different request returns 409 IDEMPOTENCY_CONFLICT). Requires If-Match: "<revision>"; a stale revision returns 409 STALE_REVISION and successful responses carry an ETag. Rate tier: upload.
POST
/
api
/
v1
/
document-uploads
Mint a presigned upload session
curl --request POST \
--url https://www.presolve.com/api/v1/document-uploads \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"operation": "create",
"caseId": "<string>",
"name": "<string>",
"mimeType": "<string>",
"sizeBytes": 0,
"sha256": "<string>",
"folderId": "<string>"
}
'const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
'If-Match': '<if-match>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
operation: 'create',
caseId: '<string>',
name: '<string>',
mimeType: '<string>',
sizeBytes: 0,
sha256: '<string>',
folderId: '<string>'
})
};
fetch('https://www.presolve.com/api/v1/document-uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.presolve.com/api/v1/document-uploads"
payload = {
"operation": "create",
"caseId": "<string>",
"name": "<string>",
"mimeType": "<string>",
"sizeBytes": 0,
"sha256": "<string>",
"folderId": "<string>"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"If-Match": "<if-match>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}Authorizations
Org-issued integration API key (service account credential). The plaintext secret is shown once at creation.
Headers
Stable caller-chosen key (max 200 chars) making the mutation safely retryable.
Maximum string length:
200Current entity revision, quoted (e.g. "3"), from the last ETag.
Body
application/json
- Option 1
- Option 2
Allowed value:
"create"Required string length:
1 - 200Required string length:
1 - 255Required string length:
1 - 255Required range:
-9007199254740991 <= x <= 9007199254740991Pattern:
^[A-Za-z0-9+/]{43}=$Required string length:
1 - 200