Files, documents, and downloads
Files, documents, and render jobs are separate resources:
| Identifier | Meaning | Typical operation |
|---|---|---|
file_id / upload public_id | Stored file | /api/v1/files/retrieve/{public_id} |
document_id | Generated document | /api/v1/documents/{public_id}/retrieve |
Render id | Processing and destination status | /api/v1/renders/{public_id} |
template_id | Reusable template | /api/v1/documents/templates/{public_id}/retrieve |
Upload a file with multipart/form-data:
curl --fail-with-body --request POST \
"$INKIT_BASE_URL/api/v1/files/upload" \
--header "X-Inkit-API-Token: $INKIT_API_KEY" \
--form '[email protected]' \
--form 'description=Example upload' \
--form 'section=team'The response is 200 and includes public_id, name, description, created_at, and extension. section accepts team or personal and defaults to team. To choose a folder, supply the fold_id query parameter, not a folder_id form field.
The handler configures a 500 MiB request limit (524,288,000 bytes). Keep the complete multipart request within the limit, including overhead. Supported commercial extensions are .pdf, .doc, .docx, .ppt, .pptx, .xls, .xlsx, .txt, .png, .jpg, .jpeg, .gif, .svg, .mp3, .mp4, .zip, .dmg, .3d, and .html. The filename must have a supported extension; matching is case-insensitive. Upload acceptance does not imply template, rendering, or AI compatibility.
List: GET /api/v1/files?page_size=25 requires page_size. Optional filters include page, sort, search, parent_id, types, section, and user_id. Access checks still apply when selecting another user. Document listing at /api/v1/documents also requires page_size.
Download: file downloads return JSON with base64 file; document downloads return raw bytes. File download mime_type currently contains an extension such as pdf, not application/pdf.
Move: PATCH /api/v1/files/{public_id}/move accepts folder_id, or an empty folder with is_personal to choose a root. The caller must have the required access to both locations.
Delete: file batch deletion accepts {"file_ids":["file_REPLACE"]}; document batch deletion accepts {"ids":["doc_REPLACE"]}. Success returns 204 without a body. Batch operations can partially succeed before reporting an error. Signature ownership and active-signature restrictions can affect deletion.
Updated 10 days ago