API Tutorial
Try synchronous extraction
Try out a test endpoint, the /extract endpoint. This endpoint accepts a document and returns extracted data synchronously. Use asynchronous endpoints in production.
Audience
If you’re new to APIs, use this tutorial to return document data from an example tax form.
Or, if you’re familiar with APIs:
- see the API quickstart to get a sample API response.
- explore the Sensible Postman collection:
Prerequisites
See prerequisites.
Run the request in Postman
To run a Sensible API request in Postman, follow these steps:
- Copy the following code sample, and replace
*YOUR_API_KEY*
with your API key:
cURL
- In your Postman workspace, click Import, select Raw text, paste the code sample, and follow the prompts to import to code sample.
- Download the following example document, which works with the prerequisite tax_forms document type:
Example document | Download link |
---|
- Correct the path to the downloaded document: In the request, click the Body tab, select binary, then click Select file and select the document you downloaded:
- Click Send. The response includes a
parsed_document
object that looks something like the following:
JSON
Note: Did you notice that this API call doesn’t specify a config (1040_2021
)? As a convenience, Sensible evaluates all the configs for the document type (tax_forms
), and automatically chooses the one that fits best.
(Optional) See how it works in the Sensible app
To see this example in the Sensible app:
- Log into the Sensible app.
- Navigate to the 1040 configuration in the tax forms document type.
- Visually examine the example document (middle pane), config (left pane), and extracted data (right pane) to better understand the configuration for the API call you just ran: