Extract doc at a Sensible URL

Extract data asynchronously from a document with the following steps:

  1. Use this endpoint to generate a Sensible URL.
  2. PUT your document at the upload_url returned from the previous step. Sensible extracts data from the document.
  3. To retrieve the extraction, use a webhook, or use the extraction id returned in the response to poll the GET documents/{id} endpoint.

For supported file size and types, see Supported file types.

For example, if your call to /generate_upload_url specifies the document type with a content_type body parameter (recommended), your first two steps are as follows:

Step 1. Generate the Sensible URL:

curl --location 'https://api.sensible.so/v0/generate_upload_url/<YOUR_DOCUMENT_TYPE>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer REDACTED' \
--data '{"content_type":"application/pdf"}'

Step 2. PUT the document:

curl --location --request PUT 'https://sensible-so-utility-bucket-dev-us-west-2.s3.us-west-2.amazonaws.com/REDACTED' \
--header 'Content-Type: application/pdf' \
--data 'YOUR_PATH_TO_DOCUMENT.pdf'

Note that in step 2:

  • you must omit an authorization header
  • the Content-Type header must match the content_type body parameter in step 1
  • the pre-signed upload_url doesn't support Base64 encoded documents, so you PUT the document bytes directly to the endpoint.

For a step-by-step tutorial on calling this endpoint, see Try asynchronous extraction from a Sensible URL.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

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. 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.

Query Params
string
enum
Defaults to production

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.

Allowed:
string

If you specify the filename of the document using this parameter, then Sensible returns the filename in the extraction response.

Body Params
webhook
object

Pushes extraction results to the specified webhook under the following circumstances, so you don't have to poll for results status:

  • When Sensible sets "status": "COMPLETE" or "status": "FAILED"
  • When the value for reviewStatus (for portfolio extractions) or reviewStatus (for single-document extractions) changes.
string
enum

Content type of the document being presented for extraction. Required for the CSV file type.

Allowed:
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/plain