---
updatedAt: 2026-07-31T18:03:06.000Z
agentTools:
  projectIndex: https://docs.sensible.so/llms.txt
---

# Extract data from a document (sync)


**Note:** Use this endpoint for testing. Use the asynchronous extraction endpoints when in production.

Extract data from a local document synchronously.

To explore this endpoint, use this interactive API reference, or use one of the following options:

- For a quick "hello world" response to this endpoint, see the [API quickstart](doc:quickstart)
- For a step-by-step tutorial about calling this endpoint, see [Try synchronous extraction](doc:api-tutorial-sync).
- Run this endpoint in the Sensible Postman collection.
  [![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/16839934-45339059-3fec-4c31-a891-9a12a3e1c22b?action=collection%2Ffork&collection-url=entityId%3D16839934-45339059-3fec-4c31-a891-9a12a3e1c22b%26entityType%3Dcollection%26workspaceId%3Ddbde09dc-b7dd-487d-a68f-20d32b008f90)

There are two options for posting the document bytes.
  1. (often preferred) specify the non-encoded document bytes as the entire request body,and specify the `Content-Type` header, for example,"application/pdf" or "image/jpeg".
  2. Base64 encode the document bytes, specify them in a body "document" field, and specify application/json for the `Content-Type` header.

For a list of  supported document file types, see [Supported file types](doc:file-types).

To get additional information about an extraction initiated with this endpoint, including signed download URLs and the error message for failed extractions, retrieve it via [GET /documents/{id}](ref:retrieving-results).


# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "servers": [
    {
      "url": "https://api.sensible.so/v0",
      "description": "Production server (uses live data)"
    }
  ],
  "info": {
    "title": "Extraction",
    "version": "0.0.0",
    "license": {
      "name": "Sensible API",
      "url": "https://www.TBD.org/licenses/LICENSE-2.0.html"
    },
    "description": "Extract structured data from documents with the Sensible API."
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Document",
      "description": "Extract data from documents"
    }
  ],
  "paths": {
    "/extract/{document_type}": {
      "post": {
        "operationId": "extract-data-from-a-document",
        "x-internal-note": "Accounts with requireMalwareScan return 400 'This account requires uploaded documents to be malware-scanned; use generate_upload_url or extract_from_url instead of the synchronous extract endpoint' for this endpoint, since the sync flow can't route the document through malware scanning (src/api/extract/handler.ts, MALWARE_SCAN_REQUIRED_RESPONSE in src/api/common.ts:388-392).",
        "summary": "Extract data from a document (sync)",
        "description": "\n**Note:** Use this endpoint for testing. Use the asynchronous extraction endpoints when in production.\n\nExtract data from a local document synchronously.\n\nTo explore this endpoint, use this interactive API reference, or use one of the following options:\n\n- For a quick \"hello world\" response to this endpoint, see the [API quickstart](doc:quickstart)\n- For a step-by-step tutorial about calling this endpoint, see [Try synchronous extraction](doc:api-tutorial-sync).\n- Run this endpoint in the Sensible Postman collection.\n  [![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/16839934-45339059-3fec-4c31-a891-9a12a3e1c22b?action=collection%2Ffork&collection-url=entityId%3D16839934-45339059-3fec-4c31-a891-9a12a3e1c22b%26entityType%3Dcollection%26workspaceId%3Ddbde09dc-b7dd-487d-a68f-20d32b008f90)\n\nThere are two options for posting the document bytes.\n  1. (often preferred) specify the non-encoded document bytes as the entire request body,and specify the `Content-Type` header, for example,\"application/pdf\" or \"image/jpeg\".\n  2. Base64 encode the document bytes, specify them in a body \"document\" field, and specify application/json for the `Content-Type` header.\n\nFor a list of  supported document file types, see [Supported file types](doc:file-types).\n\nTo get additional information about an extraction initiated with this endpoint, including signed download URLs and the error message for failed extractions, retrieve it via [GET /documents/{id}](ref:retrieving-results).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/document_type"
          },
          {
            "$ref": "#/components/parameters/environment"
          },
          {
            "$ref": "#/components/parameters/document_name"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/SupportedFileTypes"
        },
        "tags": [
          "Document"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractionSyncResponse"
                }
              }
            },
            "description": "The structured data extracted from the document.\n"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "415": {
            "$ref": "#/components/responses/415"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "400": {
        "description": "Bad Request. Sensible returns either a plain-text error message or a structured JSON error, depending on what caused the failure. For more information, see the two content types below.",
        "content": {
          "text/plain": {
            "schema": {
              "title": "Bad Request",
              "type": "string",
              "example": "Either a specific set of messages about fields in the request, or error messages like the following examples - To use the asynchronous flow you must have persistence enabled Specified document type does not exist Specified document type ${named type} does not exist No published configurations found for environment ${environment} Specified golden does not exist Must provide the Content-Type header Missing request body or body.document Could not determine the content type of the document Could not determine the content type of the document. Please check that the document was correctly encoded as Base64 This PDF is invalid. If you submitted this PDF using Base64 encoding, please check that the encoding is correct This PDF is password protected. Please resubmit with password protection disabled This PDF is empty This PDF exceeds the maximum dimensions for OCR of 17 x 17 inches This PDF exceeds the maximum size for OCR of 50MB No fingerprints match for this PDF and fingerprint_mode is set to strict Content type of ${found} does not match declared type of ${expected} The start date must be before the end date"
            }
          },
          "application/json": {
            "schema": {
              "title": "Bad Request (structured)",
              "type": "object",
              "description": "Returned instead of plain text when the request fails path, query, or body validation (for example, a malformed id, an out-of-range limit, or an invalid field in a JSON body), and for the extract_from_url document-fetch failure. The shape of `context` varies by cause: for validation failures, it echoes the offending path and/or query values; for the extract_from_url failure, it's the extraction's current state.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Human-readable summary of the error."
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Present when the request failed path, query, or body validation -- one message per failing field, in the form '<location>/<field> <reason>'."
                },
                "context": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Additional context about the failure. See the parent description for how this varies by cause."
                }
              },
              "required": [
                "message"
              ]
            },
            "examples": {
              "validationFailure": {
                "summary": "A path parameter failed validation",
                "value": {
                  "message": "This request contains errors",
                  "context": {
                    "path": "/documents/{id}"
                  },
                  "errors": [
                    "path/id should be valid version 4 UUID"
                  ]
                }
              },
              "documentFetchFailure": {
                "summary": "extract_from_url could not download the document",
                "value": {
                  "message": "Transferring the file failed with 'Response code 404 (Not Found)'",
                  "context": {
                    "id": "e75dd6ee-ef8f-4960-8be2-ba22f8c398e3",
                    "created": "2026-07-17T14:39:49.084Z",
                    "completed": "2026-07-17T14:39:49.330Z",
                    "status": "FAILED",
                    "type": "1040s",
                    "environment": "production",
                    "errors": [],
                    "error": "Response code 404:\n404: Not Found",
                    "actor": "legacy: Sensible"
                  }
                }
              }
            }
          }
        }
      },
      "401": {
        "description": "Not authorized",
        "content": {
          "text/plain": {
            "schema": {
              "title": "Unauthorized",
              "type": "string",
              "example": "Unauthorized"
            }
          }
        }
      },
      "415": {
        "description": "Unsupported Media Type",
        "content": {
          "text/plain": {
            "schema": {
              "title": "Unsupported Media Type",
              "type": "string",
              "description": "Unsupported file type. See https://docs.sensible.so/docs/file-types."
            }
          }
        }
      },
      "429": {
        "description": "Too Many Requests",
        "content": {
          "text/plain": {
            "schema": {
              "title": "Too Many Requests",
              "type": "string",
              "example": "One of the following error messages - Attempt limit exceeded, please retry after some time. Free accounts are limited to 150 API calls per month. Please upgrade your account to make additional calls. Pro accounts are limited to 5,000 API calls per month. Please upgrade your account to make additional calls."
            }
          }
        }
      },
      "500": {
        "description": "Internal Server Error",
        "content": {
          "text/plain": {
            "schema": {
              "title": "Sensible encountered an unknown error",
              "type": "string",
              "example": "Sensible encountered an unknown error"
            }
          }
        }
      }
    },
    "parameters": {
      "document_type": {
        "name": "document_type",
        "required": true,
        "in": "path",
        "description": "Type of document to extract from. Create your custom type in the Sensible app (for example, `rate_confirmation`, `certificate_of_insurance`, or `home_inspection_report`). To quickly test this endpoint using the `Try It` button in this interactive explorer, use the `senseml_basics` tutorial document type with this [example document](https://raw.githubusercontent.com/sensible-hq/sensible-docs/v0/assets/pdfs/1_extract_your_first_data.pdf). As a convenience, Sensible automatically detects the best-fit extraction from among the extraction queries (\"configs\") in the document type. For example, if you create an `auto_insurance_quotes` document type, you can add `carrier 1`, `carrier 2`, and `carrier 3` configs to the document type in the Sensible app. Sensible then automatically classifies each document you upload by its carrier, so you can use the same document type for each carrier without specifying the carrier in the extraction request.",
        "schema": {
          "type": "string"
        },
        "example": "senseml_basics"
      },
      "document_name": {
        "name": "document_name",
        "in": "query",
        "description": "If you specify the filename of the document using this parameter, then Sensible returns the filename in the extraction response.",
        "schema": {
          "type": "string"
        },
        "example": "test.pdf"
      },
      "environment": {
        "name": "environment",
        "in": "query",
        "description": "If you specify `development`, extracts preferentially using config versions published to the development environment in the Sensible app. The extraction runs all configs in the doc type before picking the best fit. For each config, falls back to production version if no development version of the config exists.",
        "schema": {
          "type": "string",
          "enum": [
            "production",
            "development"
          ],
          "default": "production"
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Sensible uses API keys to authenticate requests. Keep your API keys secure and do not share them publicly accessible areas such as GitHub, client-side code, etc. Authentication to the API is performed via Bearer Authentication. Provide your API key as the bearer auth value."
      }
    },
    "requestBodies": {
      "SupportedFileTypes": {
        "description": "See endpoint description for request body options.  ",
        "required": true,
        "content": {
          "application/pdf": {
            "schema": {
              "$ref": "#/components/schemas/BinaryDocument"
            }
          },
          "image/jpeg": {
            "schema": {
              "$ref": "#/components/schemas/BinaryDocument"
            }
          },
          "image/png": {
            "schema": {
              "$ref": "#/components/schemas/BinaryDocument"
            }
          },
          "image/tiff": {
            "schema": {
              "$ref": "#/components/schemas/BinaryDocument"
            }
          },
          "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
            "schema": {
              "$ref": "#/components/schemas/BinaryDocument"
            }
          },
          "application/msword": {
            "schema": {
              "$ref": "#/components/schemas/BinaryDocument"
            }
          },
          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
            "schema": {
              "$ref": "#/components/schemas/BinaryDocument"
            }
          },
          "text/csv": {
            "schema": {
              "$ref": "#/components/schemas/BinaryDocument"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/encodedPdf"
            }
          }
        }
      }
    },
    "schemas": {
      "Charged": {
        "type": "integer",
        "example": 1,
        "description": "The number of extractions charged to your account for this extraction ID."
      },
      "Actor": {
        "type": "string",
        "description": "Best-effort label identifying the user or credential that initiated the extraction. For extractions you initiate in the Sensible app, the value is your account's email address. For extractions you initiate by using your API key, the value is `'api_key: <key name>'` if the key has a name, or `'api_key'` if unnamed. For extractions you initiate in the Sensible app while logged in with legacy credentials, the value is `'legacy: <account>'`. Sensible omits this field for extractions you initiate with email processors.",
        "example": "api_key: my production key",
        "x-internal-note": "auth_token-initiated extractions are not a real code path; omitting the 'auth_token: <creator>' case from the public description deliberately."
      },
      "PostprocessorOutput": {
        "type": "object",
        "additionalProperties": true,
        "description": "A custom schema that you define using a [postprocessor](doc:postprocessors). For example, define this output when your app consumes a pre-existing schema and you don't want to use   Sensible's `parsed_document` schema."
      },
      "ReviewStatus": {
        "type": "string",
        "enum": [
          "NEEDS_REVIEW",
          "APPROVED",
          "REJECTED"
        ],
        "example": "NEEDS_REVIEW",
        "description": "The extraction's review status. For more information, see [Human review](doc:human-review). Specify a webhook in the extraction request so that you can get a push notification when  review status changes to `APPROVED` or `REJECTED` for extractions that returned `NEEDS_REVIEW`. Sensible omits this property from the extraction response  if the extraction doesn't need review."
      },
      "ContentTypeResponse": {
        "type": "string",
        "description": "The content type of the document.\n",
        "example": "image/png"
      },
      "Coverage": {
        "type": "number",
        "description": "The coverage score measures how fully an extraction captured all your target data in the document.  It's a percentage comparing non-null, [validated](doc:validate-extractions) fields to total fields  returned by a config for a document. For example, a coverage score of 70% for an extraction with no  validation errors means that 30% of fields were null. For more information about scoring,  see [Monitoring extraction metrics](doc:metrics).",
        "example": 0.75
      },
      "EnvironmentResponse": {
        "description": "Name of the environment to which the configuration used by this extraction was published.",
        "example": "production",
        "type": "string",
        "enum": [
          "production",
          "development"
        ]
      },
      "ExtractionSyncResponse": {
        "type": "object",
        "x-internal-note": "version_id is returned by the backend but deliberately not documented publicly. batchId may also be returned, but is not a standard field on every extraction -- the backend only sets it for extractions created through the separate, undocumented /extract/batch/* API (src/api/extract/batch.ts), so it's absent for anything created through the endpoints in this spec.",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ExtractionId"
          },
          "created": {
            "$ref": "#/components/schemas/ExtractionCreated"
          },
          "type": {
            "$ref": "#/components/schemas/DocumentTypeName"
          },
          "status": {
            "$ref": "#/components/schemas/ExtractionStatus"
          },
          "completed": {
            "$ref": "#/components/schemas/ExtractionCompleted"
          },
          "configuration": {
            "$ref": "#/components/schemas/ConfigurationName"
          },
          "configuration_version": {
            "$ref": "#/components/schemas/ConfigurationVersion"
          },
          "parsed_document": {
            "$ref": "#/components/schemas/ParsedDocument"
          },
          "validations": {
            "$ref": "#/components/schemas/Validations"
          },
          "file_metadata": {
            "$ref": "#/components/schemas/FileMetadata"
          },
          "validation_summary": {
            "$ref": "#/components/schemas/ValidationsSummary"
          },
          "errors": {
            "$ref": "#/components/schemas/Errors"
          },
          "classification_summary": {
            "$ref": "#/components/schemas/ClassificationSummary"
          },
          "page_count": {
            "type": "integer",
            "example": 100,
            "description": "Total number of pages in the document."
          },
          "environment": {
            "$ref": "#/components/schemas/EnvironmentResponse"
          },
          "document_name": {
            "$ref": "#/components/schemas/DocName"
          },
          "content_type": {
            "$ref": "#/components/schemas/ContentTypeResponse"
          },
          "coverage": {
            "$ref": "#/components/schemas/Coverage"
          },
          "reviewStatus": {
            "$ref": "#/components/schemas/ReviewStatus"
          },
          "charged": {
            "$ref": "#/components/schemas/Charged"
          },
          "actor": {
            "$ref": "#/components/schemas/Actor"
          },
          "postprocessorOutput": {
            "$ref": "#/components/schemas/PostprocessorOutput"
          }
        }
      },
      "DocName": {
        "type": "string",
        "description": "If you specify the filename of the document using the `document_name` parameter, then  Sensible displays the name in extraction history in the Sensible app  and returns the name in the extraction response.",
        "example": "example.pdf"
      },
      "Classification": {
        "type": "object",
        "properties": {
          "configuration": {
            "$ref": "#/components/schemas/ConfigurationName"
          },
          "fingerprints_present": {
            "type": "integer",
            "example": 1,
            "description": "The number of this config's fingerprints that Sensible found in the document."
          },
          "fingerprints": {
            "type": "integer",
            "example": 1,
            "description": "The number of fingerprints defined in this config."
          },
          "score": {
            "$ref": "#/components/schemas/Score"
          }
        }
      },
      "ConfigurationName": {
        "type": "string",
        "description": "Name of the \"configuration\", a collection of SenseML queries for extracting document data.",
        "example": "config_for_x_company"
      },
      "ConfigurationVersion": {
        "type": "string",
        "description": "Version number for the configuration.",
        "example": "N39i3ZvEbPCkcjOtYIAU1_ADSovnUC5I"
      },
      "DocumentTypeName": {
        "description": "Unique user-friendly name for a document type",
        "example": "auto_insurance_quotes_all_carriers",
        "type": "string"
      },
      "ClassificationSummary": {
        "type": "array",
        "description": "Metadata about how Sensible scores configs against the document to extract from. By default, Sensible compares all configs in the document type, then chooses the best extraction using fingerprints, scores, or a combination of the two. When two extractions tie by score and fingerprints, Sensible chooses the first configuration in alphabetic order. For more information, see [fingerprints](https://docs.sensible.so/docs/fingerprint#notes).",
        "items": {
          "$ref": "#/components/schemas/Classification"
        },
        "example": [
          {
            "configuration": "config_for_x_company",
            "fingerprints": 2,
            "fingerprints_present": 2,
            "score": {
              "value": 3,
              "fields_present": 4,
              "penalties": 0.5
            }
          },
          {
            "configuration": "acme_co",
            "fingerprints": 2,
            "fingerprints_present": 2,
            "score": {
              "value": 0,
              "fields_present": 2,
              "penalties": 1.5
            }
          }
        ]
      },
      "FileMetadata": {
        "type": "object",
        "description": "Metadata about the PDF file, for example author, authoring tool, and modified date.",
        "properties": {
          "metadata": {
            "type": "object",
            "description": "Raw metadata embedded in the PDF. Returned if available, without data normalization."
          },
          "error": {
            "type": "string",
            "description": "Errors Sensible encountered when attempting to retrieve metadata",
            "example": "Error retrieving PDF metadata: Invalid PDF structure"
          },
          "info": {
            "type": "object",
            "description": "Normalized metadata about the PDF, returned if available.",
            "properties": {
              "author": {
                "type": "string",
                "description": "The name of the person who created the document.",
                "example": "Jay S. Schiller"
              },
              "title": {
                "type": "string",
                "description": "Title assigned to the PDF by the PDF producer.",
                "example": "file123"
              },
              "creator": {
                "type": "string",
                "description": "If the document was converted to PDF from another format, the name of the application that created the original document from which it was converted.",
                "example": "macOS Version 11.2 (Build 20D64) Quartz PDFContext"
              },
              "producer": {
                "type": "string",
                "description": "If the document was converted to PDF from another format, the name of the application that converted it to PDF",
                "example": "Preview"
              },
              "creation_date": {
                "type": "string",
                "description": "File creation date",
                "example": "2022-08-02T18:09:31.000+00:00"
              },
              "modification_date": {
                "type": "string",
                "description": "File modification date",
                "example": "2022-08-03T15:09:23.000+00:00"
              },
              "error": {
                "type": "string",
                "description": "Errors Sensible encountered when attempting to retrieve metadata."
              }
            }
          }
        }
      },
      "Score": {
        "type": "object",
        "description": "The score for the extraction, used to help choose the best extraction.",
        "properties": {
          "value": {
            "type": "number",
            "example": 17,
            "description": "The score total is fields_present minus penalty points. In the absence of fingerprints, Sensible returns the extraction in the document type with the highest score."
          },
          "fields_present": {
            "type": "integer",
            "example": 17,
            "description": "Number of non-null fields Sensible extracted from the document using this config"
          },
          "penalties": {
            "type": "number",
            "example": 1.5,
            "description": "Errors are 1 penalty point and warnings are 0.5 points. See the validation_summary for a breakdown."
          }
        }
      },
      "ParsedDocument": {
        "description": "Data extracted from the document, structured as an array of fields.\nConfigure the verbosity parameter in the SenseML configuration to return\nextraction metadata, such as:\n- page numbers\n- the bounding polygons that\ndefine line coordinates\n- for text that Sensible OCR'd, confidence scores.\nFor more information, see [Verbosity](doc:verbosity).\n",
        "type": "object",
        "example": {
          "policy_number": {
            "type": "number",
            "value": 123456789,
            "lines": [
              {
                "text": "123456789",
                "page": 0,
                "boundingPolygon": [
                  {
                    "x": 6.458,
                    "y": 2.601
                  },
                  {
                    "x": 7.354,
                    "y": 2.601
                  },
                  {
                    "x": 7.354,
                    "y": 2.767
                  },
                  {
                    "x": 6.458,
                    "y": 2.767
                  }
                ]
              }
            ]
          },
          "name_insured": {
            "type": "string",
            "value": "Petar Petrov",
            "lines": [
              {
                "text": "Petar Petrov",
                "page": 0,
                "boundingPolygon": [
                  {
                    "x": 1,
                    "y": 5.515
                  },
                  {
                    "x": 1.935,
                    "y": 5.515
                  },
                  {
                    "x": 1.935,
                    "y": 5.674
                  },
                  {
                    "x": 1,
                    "y": 5.674
                  }
                ]
              }
            ]
          }
        }
      },
      "Validation": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Description of the validation",
            "example": "Dollar amount should be more than $100"
          },
          "severity": {
            "type": "string",
            "enum": [
              "error",
              "warning",
              "skipped"
            ],
            "example": "warning",
            "description": "Severity of the failing validation (error, warning, skipped)"
          },
          "message": {
            "type": "string",
            "description": "Messages about why the validation failed",
            "example": "Missing prerequisites: broker.email"
          }
        }
      },
      "Validations": {
        "description": "Which extracted fields failed validation rules you write in the Sensible app",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Validation"
        },
        "example": [
          {
            "description": "Policy number must be 11 digits",
            "severity": "error"
          },
          {
            "description": "Company email must be in format string@string",
            "severity": "skipped",
            "message": "Missing prerequisites - company_email"
          }
        ]
      },
      "ValidationsSummary": {
        "type": "object",
        "description": "Summary of the extracted fields that fail validation rules you write in the Sensible app.",
        "properties": {
          "fields": {
            "type": "integer",
            "description": "Number of fields specified in the SenseML config to extract from the document",
            "example": 6
          },
          "fields_present": {
            "type": "integer",
            "description": "Actual number of non-null fields extracted from the document",
            "example": 4
          },
          "errors": {
            "type": "number",
            "description": "Number of validation errors in the extraction",
            "example": 0
          },
          "warnings": {
            "type": "number",
            "description": "Number of validation warnings in the extraction",
            "example": 1
          },
          "skipped": {
            "type": "integer",
            "description": "Number of fields skipped in the extraction because a prerequisite field was null",
            "example": 1
          }
        }
      },
      "Errors": {
        "type": "array",
        "description": "Extraction error messages.",
        "items": {
          "$ref": "#/components/schemas/ExtractionError"
        }
      },
      "ExtractionError": {
        "type": "object",
        "description": "Extraction error message",
        "properties": {
          "field_id": {
            "type": "string",
            "description": "ID of the extracted field.",
            "example": "phone_number"
          },
          "message": {
            "type": "string",
            "description": "Description of the error",
            "example": "ConfigurationError: width <=0"
          },
          "type": {
            "type": "string",
            "description": "Error type",
            "example": "configuration"
          }
        }
      },
      "ExtractionId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for the extraction, used to retrieve the extraction",
        "example": "246a6f60-0e5b-11eb-b720-295a6fba723e"
      },
      "ExtractionCreated": {
        "type": "string",
        "format": "date-time",
        "example": "2022-10-31T16:27:53.433",
        "description": "Date and time Sensible created the initial empty extraction and set its status to WAITING."
      },
      "ExtractionCompleted": {
        "type": "string",
        "format": "date-time",
        "example": "2022-10-31T16:27:53.741Z",
        "description": "Date and time Sensible set the extraction's status to COMPLETED"
      },
      "ExtractionStatus": {
        "type": "string",
        "description": "Status of the extraction:\n- WAITING: Sensible created an initial empty extraction and is waiting for the document.\n- PROCESSING: Sensible received the document and is extracting data.\n- FAILED: The extraction failed.\n- COMPLETE: The extraction is complete.\n",
        "enum": [
          "WAITING",
          "PROCESSING",
          "COMPLETE",
          "FAILED"
        ],
        "example": "COMPLETE"
      },
      "ContentTypeParameter": {
        "type": "string",
        "enum": [
          "application/pdf",
          "image/jpeg",
          "image/png",
          "image/tiff",
          "application/msword",
          "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
          "application/vnd.ms-excel",
          "application/vnd.ms-excel.sheet.macroenabled.12",
          "application/vnd.ms-excel.sheet.binary.macroenabled.12",
          "text/csv",
          "application/json"
        ],
        "description": "Content type of the document being presented for extraction. For supported file types, see [Supported file types](doc:file-types).",
        "x-internal-note": "XLSB is a ZIP (OPC) container, like XLSX. If the request omits content_type (allowed for every type except CSV), Sensible detects an XLSB file as XLSX: the extraction's content_type reports XLSX, and the output is the same because one Excel reader handles both. Sensible treats a file as XLSB only when the request declares the XLSB content type. Verified 2026-11-10 with extract_from_url on the docs test account; see sensible-hq/sensible#3474. Deliberately not documented publicly: nothing a reader does depends on it."
      },
      "BinaryDocument": {
        "type": "string",
        "format": "binary",
        "description": "non-encoded document bytes as the entire request body"
      },
      "encodedPdf": {
        "type": "object",
        "required": [
          "document"
        ],
        "properties": {
          "document": {
            "type": "string",
            "description": "This parameter is for option 2 for posting document bytes: Base64 encode the bytes of any supported document type (not just PDF), and paste the resulting string into this parameter. To test it, you can use an online file-to-base64 encoder.\n"
          },
          "content_type": {
            "$ref": "#/components/schemas/ContentTypeParameter"
          }
        }
      }
    }
  }
}
```