Create a document and get an upload URL
Creates the document record and returns a presigned URL for the file itself.
The bytes do not travel through this API. Take uploadUrl from the response and issue a single PUT straight to it with the file as the raw request body, no authorization header, and two headers that must match what was signed exactly: Content-Type equal to the contentType you sent here, and Content-Length equal to fileSize. A mismatch on either one is rejected by storage, not by InkSeal. The URL is valid for 900 seconds (15 minutes) from the moment this call returns; after that, create a new document rather than reusing the id.
Nothing about the document is usable until the upload is handed back: call POST /documents/{documentId}/confirm-upload once the PUT succeeds. The document stays in processing with no page count until then.
The key the server signed is recorded on the document row, so confirm-upload binds to it and never trusts a key supplied by the caller. objectKey is returned for logging and support; it is not required by any later call.
Workspace content limits are workspace-wide rather than per-credential; a breach answers 429 with the code workspace_limit_exceeded, which is a different condition from request rate limiting and is not retryable on a timer.
Accepts an Idempotency-Key: a retry with the same key replays the original response rather than signing a second upload URL.
Request
- Base URL: https://inkseal.net/api/v1
- URL: https://inkseal.net/api/v1/documents
- Auth: HTTP bearer
Headers
Makes this mutation retry-safe. 1 to 255 printable ASCII characters (0x20 to 0x7e), trimmed before use. The key is scoped to the workspace and the credential that sent it. Reusing it with a different method, path, or payload answers 422 idempotency_key_reuse. A completed attempt replays its stored status and body with an Idempotent-Replay: true response header; 5xx, 429, and non-JSON answers leave the key retryable. A concurrent request holding the 90 second lease answers 409 idempotency_in_progress. Records are retained 24 hours.
Request body
Example request
{
"fileName": "master-services-agreement.pdf",
"contentType": "application/pdf",
"fileSize": 184320
}Response
The document record was created and an upload URL was signed.
Example response
{
"data": {
"documentId": "V1StGXR8_Z5jdHi6B-myT",
"uploadUrl": "https://r2.example.com/inkseal/w/wk_8f2c/2026-08-21/6f1b8a2c-2f61-4a1e-9d0f-1c0f9f6a4b77.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=900&X-Amz-Signature=...",
"objectKey": "w/wk_8f2c/2026-08-21/6f1b8a2c-2f61-4a1e-9d0f-1c0f9f6a4b77.pdf"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.