files

Upload File

Upload a file and return its file_id. Call this first when the user asks to change, fix, revise or redraft a document; then GET /v1/files/{file_id}?format=md and POST /v1/edit. Every call uploads a new copy, so upload a file once and reuse its file_id for every edit, merge and comparison of it.

Send the file's bytes as multipart/form-data in the document field (with curl, -F document=@<path>): a docx, doc or pdf to read, edit, compare or merge, or an xlsx or pptx to compare. A docx answers status processing while it is prepared, and work sent with its file_id waits for that. A doc or pdf is converted to Word first: the call waits up to 20 seconds for it and answers ready, failed with error, or processing.

post/v1/files

Request

  • Base URL
    https://api.versionstory.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.versionstory.com/v1/files
  • Auth
    HTTP bearer

Headers

X-Customer-Idstring nullable

Id of one of your customers (created in the developer dashboard) to attribute this request's credit usage to. Billing and limits stay organization-wide.

Request body multipart/form-data

documentstring binary required

The document to upload

track_redline_changesboolean

When an uploaded PDF is a redline (insertions underlined in one color, deletions struck through in another), turn its insertions and deletions into tracked changes in the Word document made from it. Default true. A PDF that is not a redline, and any other kind of document, is unaffected.

Response

Successful Response

file_idstring required
status'processing' | 'ready' | 'failed' required

The uploaded document's preparation; work queued against the file waits for it.

Changes

No recorded changes to this operation across all 1 revision of this API.