REFERENCE

Files reference

Upload a PDF, DOCX, DOC, PNG or JPEG and get a file id to build a document from.

All documentation

One endpoint. Upload a file, get an id, then build a document around it with POST /documents.

POST/v1/files
Requires documents:write

This is the one endpoint that is not JSON. Send multipart/form-data with a single file part. There is no separate files scope - it shares documents:write.

bash
curl https://api.documentesign.com/v1/files \
  -H "Authorization: Bearer $ESIGN_API_KEY" \
  -F "file=@contract.pdf"
201 Created
{
  "id": "file_9f2c...",
  "name": "contract.pdf",
  "mime_type": "application/pdf",
  "size_bytes": 48210,
  "created_at": "2026-09-01T10:00:00.000Z"
}
Accepted types
FieldTypeNotes
application/pdf.pdfAlso parsed on upload.
…wordprocessingml.document.docxConverted to PDF when the document is built.
application/msword.docConverted as above.
image/png.png
image/jpeg.jpg
The type is read from the bytes, not the header
Your declared Content-Type and the file extension are both ignored. The file is identified from its actual contents, so renaming something to .pdf will not get it accepted. Anything outside the list above returns 415 unsupported_file_type. WebP, HEIC and SVG are not accepted here.
Errors
FieldTypeNotes
multipart_required415The request was not multipart/form-data.
file_missing400No file part was present.
file_empty400The part had no bytes.
file_too_large413Over 25 MB.
unsupported_file_type415Detected type is not in the accepted list.
password_protected_pdf400Encrypted PDFs are refused. Remove the password before uploading - there is no way to supply one.
corrupt_pdf400The PDF could not be parsed.

Using the id

Pass file ids to POST /documents in the order you want them merged. A document takes up to ten. An id that does not exist, or belongs to another workspace, returns 400 unknown_file with the offending ids in file_ids.

See send a document from a file for the full path.