- The key is your auth token. Find it in your Draftable API account under API Credentials (there is a Testing and a Live pair; testing comparisons are free and expire). The client sends
Authorization: Token <token>, not Bearer. With no token stored, Corsair raisesAuthMissingErrorbefore any request; a token Draftable rejects comes back as HTTP 401. - Comparisons take document URLs.
comparisons.createdownloads each side from a publicsource_url. Supported types: pdf, docx, docm, doc, rtf, pptx, pptm, ppt, txt. Each comparison counts against the plan’s monthly quota, so the operation isdestructive. - Comparisons run asynchronously.
comparisons.createreturnsready: false; pollcomparisons.getuntilreadyis true (orfailed). - Viewing.
comparisons.getViewerUrlreturns the viewer link. For a private comparison it signs the link with your token (valid 30 minutes by default), the way Draftable’s own client libraries do; the token itself never appears in the link. - Exports.
exports.createstarts a PDF export; pollexports.getuntilready, then downloadurl.
- 7 typed API operations
- 1 synced entity (
comparisons) for fast.search()/.list()
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Draftable API key before the first call: More: API Key
pnpm corsair setup --plugin=draftable --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Check whether a comparison is readyQuery synced data
Synced entities supporttenant.draftable.db.<entity>.search() and .list(): comparisons.
See Database for filters and operators.
What’s next
API reference
Every
draftable.api.* operation with input and output types.Database
Synced entities, search filters, and operators.
Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.