Skip to content

Errors

Every error code the REST API returns, and what to do about each.

View as Markdown

Error envelope

Every non-2xx response has the same body. code is drawn from a closed vocabulary and is what your code should branch on; message is human-readable and may change.

{
  "error": {
    "code": "UNSUPPORTED_FILE_TYPE",
    "message": "original must be a .docx, .doc, or .pdf file",
    "request_id": "01J..."
  }
}

Send an X-Request-Id header to correlate your logs with ours. If you don't, one is minted and echoed back in the response.

Request errors

StatusCodeCauseRetry?
400INVALID_REQUESTMalformed request: a missing, empty, or unnamed file field, a merge with too few or too many revisions, or an unknown reference topicNo, fix the request
400INVALID_AUTHORIZATION_CODEPOST /v1/api-keys: the code is unknown, expired or used, or its verifier or redirect does not matchNo, sign in again
400INVALID_EDITAn edit was refused: a stale schema_version, a selector that matched nothing or too much, or an undefined combinationNo, fix the edits
400UNSUPPORTED_FILE_TYPEExtension is not .docx, .doc, .pdf, .pptx or .xlsx, or a .pptx or .xlsx paired with anything but another of its kindNo
400DOCUMENT_UNREADABLEA submitted .docx is not a readable Word file: corrupt, or encryptedNo, check the file opens in Word
400INVALID_COMPARISON_IDThe comparison id is malformed, or is a mrg_ merge idNo
400INVALID_MERGE_IDThe merge id is malformed, or is a cmp_ comparison idNo
400INVALID_EDIT_IDThe edit id is malformedNo
400INVALID_CREATION_IDThe creation id is malformedNo
400INVALID_FILE_ID, INVALID_DOCUMENT_ID, INVALID_VERSION_IDA file, Document or version id is malformedNo
400INVALID_PARENT_VERSIONA new version's parent names no version of the DocumentNo
400INVALID_CURSORA Documents list cursor is malformedNo
400ELEMENT_NOT_FOUNDAn element lookup id is no element of the version's body, or more than one element carries itNo
400UNSUPPORTED_FORMATA requested format is unknown, or not valid for this operationNo
400PARAGRAPH_NOT_FOUNDA selective comparison names a paragraph index or id that is not in its fileNo, read the file's listing again
400RANGE_TOO_LARGEA selective comparison's ranges are too large to compare in one requestNo, compare smaller ranges
400TRIAL_BATCH_TOO_LARGEA trial organization's merge has more revisions than its per-minute allowanceNo, send fewer revisions
401INVALID_API_KEYMissing, malformed, unknown, revoked, or expired keyNo, check the credential
402USAGE_LIMIT_REACHEDThe organization's monthly upload allowance is exhaustedNo, it's a billing state
403API_KEY_ORG_MISMATCHThe key's service account no longer belongs to the key's organizationNo, issue a new key
403TRIAL_COMPARISON_LIMIT_REACHEDThe organization's API trial allowance is used upNo, it's an account state
403TRIAL_WORD_DOWNLOADS_EXCLUDEDdocx was requested, and the API trial excludes Word downloadsNo, ask for another format
403ZERO_DAY_RETENTION_UNSUPPORTEDA Documents route, or a Document's version, was used by an organization with zero-day retentionNo, it's an account setting
404COMPARISON_NOT_FOUNDNo such comparison, or it belongs to another organizationNo
404MERGE_NOT_FOUNDNo such merge, or it belongs to another organizationNo
404EDIT_NOT_FOUNDNo such edit, or it belongs to another organizationNo
404FILE_NOT_FOUNDNo such file, or it belongs to another organizationNo
404CREATION_NOT_FOUNDNo such creation, or it belongs to another organizationNo
404DOCUMENT_NOT_FOUNDNo such Document, or it belongs to another organizationNo
404VERSION_NOT_FOUNDNo such version in the DocumentNo
409CONFLICTAn acknowledgment of work that is still processing, or that has no zero-day retention; an edit or selective comparison of a document still being prepared; or a file that is already a Document's versionOnce it has finished processing; an edit or selective comparison after Retry-After
409ELEMENT_MAP_PENDINGAn element lookup needs a redline or listing that is still being madeYes, after Retry-After
409ELEMENT_MAP_UNAVAILABLEAn element lookup needs a map that does not exist and will notNo
410CONTENT_DELETEDThe work was deleted under zero-day retentionNo
413FILE_TOO_LARGEA file exceeds the 100 MB limitNo
429TRIAL_RATE_LIMITEDThe API trial's per-minute rate is exceededYes, after Retry-After seconds
500INTERNAL_ERRORSomething went wrong on our sideYes, with backoff

The *_NOT_FOUND codes intentionally cover both "doesn't exist" and "not yours", so ids cannot be probed for existence.

INTERNAL_ERROR is the only code worth retrying blindly. A response that carries Retry-After tells you when to try again: TRIAL_RATE_LIMITED, ELEMENT_MAP_PENDING, and CONFLICT for work still being made. Everything else in this table describes a request or account condition that will produce the same result next time. The trial codes are explained under API trials.

Comparison failures

A comparison that cannot be generated is not an HTTP error. The request succeeded — it correctly reported that the work will not finish — so it returns 200 with "status": "failed":

{
  "comparison_id": "cmp_...",
  "status": "failed",
  "error": {
    "code": "DOCUMENT_PROTECTED",
    "upstream_code": "ONE_OR_MORE_DOCUMENTS_ARE_PROTECTED"
  }
}
error.codeMeaningWhat to do
DOCUMENT_PROTECTEDA source is password-protected or permission-restrictedRemove protection and resubmit
DOCUMENT_UNREADABLEA source could not be opened — corrupt or malformedCheck the file opens in Word
DOCUMENT_CONVERSION_FAILEDA .doc, .pdf, or email source could not be converted to .docxConvert it yourself and resubmit
SOURCE_UPLOAD_FAILEDA source did not reach storage intactResubmit
PDF_RENDER_FAILEDThe redline generated but the PDF rendering did notRequest format=docx instead
COMPARISON_FAILEDCatch-all — upstream_code carries the specific pipeline codeInspect upstream_code; contact support if it recurs

failed is terminal for that comparison. Waiting longer changes nothing; submit a new comparison to retry.

A comparison whose redline succeeded but one of whose renderings did not (a PDF, say) also reports failed, but with no error: what was produced is in file.downloads, and the missing formats are named in file.failed_formats. A merge whose records can no longer produce a document reports MERGE_UNUSABLE. Edits and created documents fail the same way, with EDIT_FAILED and CREATION_FAILED; an amend whose change collides with a later version reports CARRY_CONFLICT. The live text for every code is also served by GET /v1/reference/errors.

DOCUMENT_UNREADABLE appears in both tables because a .docx is checked for readability while the request is still open — an unopenable one is refused with 400 rather than accepted and failed later. A .doc or .pdf source is opaque until its conversion step, so the same condition surfaces there as a failed status instead.

Pipeline failure codes

upstream_code comes from the document pipeline and is more specific than the public codes above. The ones you are most likely to see:

CodeMeaning
ONE_OR_MORE_DOCUMENTS_ARE_PROTECTEDA source is password-protected
ONE_OR_MORE_DOCUMENTS_ARE_UNABLE_TO_BE_OPENEDA source could not be opened
ONE_OR_MORE_DOCUMENTS_FAILED_TO_CONVERT_TO_DOCXConversion to .docx failed
ONE_OR_MORE_DOCUMENTS_FAILED_TO_UPLOAD_TO_S3A source did not reach storage
FAILED_TO_SAVE_REDLINE_AS_PDFPDF rendering of the redline failed
FAILED_TO_GENERATE_COMPARISONThe comparison itself failed
OUT_OF_MEMORYThe documents exceeded the processing budget
UNHANDLED_ERRORUnclassified failure

OUT_OF_MEMORY on very large or deeply nested documents is worth reporting to support — it is usually a fixable characteristic of the specific file rather than a hard limit.