POST
/
generate_upload_url
/
{document_type}
curl --request POST \
  --url https://api.sensible.so/v0/generate_upload_url/{document_type} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "webhook": {
    "url": "https://example.com/example_webhook_url",
    "payload": "info extra to the default extraction payload"
  },
  "content_type": "application/pdf"
}'
{
  "id": "246a6f60-0e5b-11eb-b720-295a6fba723e",
  "created": "2022-10-31T16:27:53.433Z",
  "type": "auto_insurance_quotes_all_carriers",
  "status": "COMPLETE",
  "upload_url": "https://sensible-so-utility-bucket-prod-us-west-2.s3.us-west-2.amazonaws.com/EXTRACTION_UPLOAD/sensible/fc3484c5-3f35-4129-bb29-0ad1291ee9f8/EXTRACTION/14d82783-c12b-4e70-b0ae-ca1ce35a9836.pdf?AWSAccessKeyId=REDACTED&Expires=1623861476&Signature=REDACTED&x-amz-security-token=REDACTED"
}

Authorizations

Authorization
string
header
required

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

Response

200
application/json
Returns the upload_url at which to PUT the document for extraction

The response is of type object.