POST
/
extract_from_url
/
{document_type}

Authorizations

Authorization
string
headerrequired

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.

Path Parameters

document_type
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. Then, you can extract data from all these carriers using the same document type, without specifying the carrier in the API request.

Query Parameters

environment
enum<string>
default: 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.

Available options:
production,
development
document_name
string

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

Body

application/json
document_url
string
required

URL that responds to a GET request with the bytes of the document you want to extract data from. This URL must be either publicly accessible, or presigned with a security token as part of the URL path. To check if the URL meets these criteria, open the URL with a web browser. The browser must either render the document as a full-page view with no other data, or download the document, without prompting for authentication.

webhook
object

Specifies to return extraction results to the defined webhook as soon as they're complete, so you don't have to poll for results status. Sensible also calls this webhook on error.

content_type
enum<string>

Content type of the document being presented for extraction.

Available options:
application/pdf,
image/jpeg,
image/png,
image/tiff,
application/msword,
application/vnd.openxmlformats-officedocument.wordprocessingml.document

Response

200 - application/json
id
string

Unique ID for the extraction, used to retrieve the extraction

created
string

Date and time Sensible created the initial empty extraction and set its status to WAITING.

type
string

Unique user-friendly name for a document type

status
enum<string>

Status of the extraction:

  • WAITING: Sensible created an initial empty extraction and is waiting for the document.
  • PROCESSING: Sensible received the document and is extracting data.
  • FAILED: The extraction failed.
  • COMPLETE: The extraction is complete.
Available options:
WAITING,
PROCESSING,
COMPLETE,
FAILED
environment
string

Name of the environment to which the configuration used by this extraction was published.

document_name
string

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.

errors
object[]

Extraction error messages.