> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.staple.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.staple.ai/_mcp/server.

# Documentation for Staple's REST APIs

By [vvluc@staple.io](mailto:vvluc@staple.io) / [josh@staple.io](mailto:josh@staple.io) / [hello@staple.io](mailto:hello@staple.io)

See our demo at [https://www.staple.io/demo](https://www.staple.io/demo) if you would wish to sample the scanning using a simple drag and drop interface before using the API directly.

#### What is this API for?

Everything relating to the Staple platform and scanning invoice, receipts and other documents! Just send up an invoice or receipt, and the API will return a JSON containing all data the could be extracted, along with details of where that information was on the page, and a new tagged image of the original document. This API is optimized for computer generated PDFs, which will have the best performance. However, pdf scans, png, jpeg, tiff, jfif, and docx are also supported.

Please expect the API to change and improve over the coming weeks and months as the models are being constantly improved at Staple. The values and dictionaries key of returned JSON will not be removed, however new ones may be added.

#### Authentication

Authenticate requests with your `x-api-key` header plus an `Authorization: Bearer <token>` header, where the token is the JWT returned by the login endpoint. Contact [hello@staple.io](mailto:hello@staple.io) for API access.

#### Rates

The API is load balanced, and should be able to handle a significant number of requests in parallel, but we appreciate your patience with any issues that may occur regarding dropped responses. We recommend testing with no more that 10 parallel requests at a time.

Staple AI reserves the right to make changes to the API, including registration process, access and response values at any time. That means that the returned values you see now are not fixed, and may be subject to change.