Integration Overview
Plainterms exposes a small public API for organization-owned automations and outbound webhooks for document and landing-page events.
Use the public API when another system needs to identify the organization, list eligible Plainterms users, reserve a document upload, or confirm a document threshold acknowledgment. Use webhooks when Plainterms needs to push the result of document processing or public landing-page activity back to your system.
Integration Surfaces
Section titled “Integration Surfaces”| Surface | Current scope | Where it is configured |
|---|---|---|
| Public API | API-key auth, user lookup, document upload reservation, document metadata polling, PDF download, confirmation | API keys in Settings -> API Keys |
| Webhooks | Seven outbound event types, signed delivery, delivery logs | Settings -> Webhooks |
| API keys | Organization-scoped Bearer keys for /api/v1 | Settings -> API Keys |
| Retool | One app/workflow pattern using the public API plus return-routed webhook delivery | Retool REST resource and Workflow webhook trigger |
There is no public endpoint for API-key management, webhook configuration, document listing/search, multipart document upload, bearerless rendered-PDF download, or OpenAPI discovery today.
Typical Flow
Section titled “Typical Flow”- A Plainterms administrator creates an organization API key.
- An integration calls
GET /api/v1/usersto map a downstream user to a Plaintermsuser_email. - The integration chooses or looks up a stable
customer_document_idfor the logical customer document when it needs downstream correlation or duplicate-safe re-uploads. - The integration calls
POST /api/v1/documentswith document metadata and thatuser_email. - Plainterms returns a
reservationdescribing the next step on the202:next_action"upload"comes with a signed storagePUTURL;"none"means the content is already satisfied server-side and there is no upload step (see Handling Duplicate Uploads). - When an upload URL was returned, the integration uploads the PDF bytes to that URL.
- Plainterms processes the document.
- The integration can poll
GET /api/v1/documents/{documentId}orGET /api/v1/documents/custId-{customerDocumentId}for state. - Plainterms sends webhook events to enabled endpoints.
- If metadata or a webhook payload includes
download_urlordownload.url, fetch that/api/v1/documents/{documentId}.pdfresource with the same API key.
Current Contract Rules
Section titled “Current Contract Rules”/api/v1usesAuthorization: Bearer <raw API key>only. Browser cookies do not authenticate these endpoints.- API keys identify an organization, not an individual user. Endpoints that
need user attribution use fields such as
user_emailorconfirmed_by_email. customer_document_idis optional at the API level, but production integrations that need CRM, Retool, policy-system, webhook, or confirmation correlation should choose one stable value per logical customer document. Duplicate or retry uploads of that same logical document should reuse the same value instead of generating a fresh per-click ID.- Webhook configuration is UI/remotes only. It is not available through
/api/v1. - Webhook signatures use
Webhook-Signature: t=<timestamp>,v1=<hex_hmac>, where the signed string is<timestamp>.<raw JSON body>. - Document metadata includes a
pollingobject and adownloadobject. The download URL is an API resource, not a signed bearer link. - Webhook
download_urlvalues are absolute URLs to the/api/v1/documents/{documentId}.pdfresource and require the same API key. There is nodownload_url_expires_atfield.
For coding agents, start with Agent Reference or /llms.txt.