Developer Documentation

This page is the orientation layer above the reference. It tells you what exists, where it lives, and which door to use, so that by the time you open the full documentation you already know the shape of the thing you are building against. The complete reference, with every request and response schema, lives at docs.staple.ai; this is the map that gets you there without guessing.

Start Here: Five Steps To A First Result

Getting a first structured result takes five steps, in order. First, authenticate against the regional endpoint your account is provisioned on. Second, create or select a model, the natural-language blueprint that defines what to capture from a document type. Third, submit a document, over the API or one of the other ingestion channels. Fourth, receive the completion webhook, so you learn the moment the data is final rather than polling blindly. Fifth, retrieve the fields, each with its value, confidence, and provenance. Everything else in the platform is a variation or an extension of that loop. In practice the first useful call is the submit, which returns a document identifier immediately; the structured fields are not on that first response, they arrive when the completion event fires, which is why the webhook step is not optional if you want to know when the data is ready to act on.

The Core Object Model

Everything maps to five objects, and learning them once makes the whole API predictable. A model is the prompt-driven definition of how a document type should be understood. A queue is where documents of a given type collect and where rules are applied. A document belongs to a queue and is processed against a model. A field is a single captured value carrying its confidence, its provenance, and whether it was extracted, inferred, mapped, or set. An event is emitted whenever a document changes state, and it is what a webhook delivers. Once those five are clear, the endpoints read as operations on objects you already understand. Start integrating through APIs and SDKs.

What The Reference Covers

• Authentication and the regional base URLs, so you call the endpoint your data residency requires.

• Submitting documents and retrieving structured fields and line-item tables.

• Models and queues, created and managed programmatically rather than through a ticket.

• Webhooks and the event lifecycle, a document uploaded, completed, rejected with its reason, deleted, or moved between queues.

• Redaction, via POST /v2/redaction/document with a follow-up GET to track the redacted output.

• Exporting audit logs as CSV or JSON, and pulling results in bulk.

Ingestion Is Not Only The API

The reference documents direct API upload, but a document can also arrive over S3, SFTP, email, shared drives, portals, and file sync, and every route lands in the same pipeline and returns the same structured result. This matters for planning an integration: a team can keep sending documents the way its business already does while your code reads the clean output over the API. The Embedded Document Processing page walks through that flow end to end.

Handling The Review State

The single most common integration mistake is treating every response as final. Any field below the configurable confidence threshold, 0.9 by default, puts a document into a review state, and the API exposes that state explicitly. The completion webhook fires only once the document is resolved, so the correct pattern is to act on the completion event, not on the initial submission acknowledgment. Build for that from the start and your integration will never post a provisional value as if it were certain.

Verifying The Trust Record

Staple can attach a Metastructured Data envelope to a result, a cryptographically signed proof of source, timestamp, and confidence. You can verify it independently with the open-source SDK at github.com/msd-protocol, which signs and verifies envelopes offline with no callback to any server. The SDK is early stage, so read its roadmap before taking a hard dependency; the open standard is documented under Open Trust Infrastructure.

Regions, Residency, And Access

Regional endpoints span Singapore, the EU, the US, and China, with residency enforced at the egress boundary as infrastructure rather than a configuration flag. Access is governed by SSO and role-based access control, which also determines who may manage models, webhooks, and exports. The certification posture behind these controls, including the ISO 42001 AI management-systems standard, is published in the Trust Vault.

Support And Status

For help while building, use the Support Hub, and check the status page for incident and uptime visibility. If you need an environment to try against, request sandbox access through the team rather than testing on production data, so a first integration is built and validated safely before it touches live documents.

Start Building

Open the developer documentation for the full reference, or contact our team for developer support and sandbox access.

Related Topics

See Staple process your documents

Book a 30-minute demo with a document processing specialist.

Book a Demo

Not ready yet?

Take your time to decide.

Read the foodpanda case study