Skip to main content
New to Corsair? See API access, authentication, and error handling.

Documents

create

documents.create Convert HTML or a URL to a PDF or Excel file and return the file itself (synchronous, up to 60 seconds); billed unless test is true Risk: destructive
Input Synchronous: the answer is the PDF or Excel file, returned as core file output (contentType, byteLength, filename, contentBase64 or fileId). A conversion that runs past 60 seconds fails; use documents.createAsync for long documents.
Output

createAsync

documents.createAsync Queue an HTML-to-PDF or XML-to-Excel conversion and return its status_id; poll documents.status for the download_url Risk: destructive
Input Returns a status_id. Poll documents.status until completed, then documents.download with its download_id.
Output

createHosted

documents.createHosted Generate a document and host it at a public DocRaptor URL, a paid add-on; the URL is billed per download Risk: destructive
Input Hosted documents are a paid add-on; a test-mode hosted document is free, allows five downloads and expires after one day.
Output

createHostedAsync

documents.createHostedAsync Queue a hosted document (paid add-on) and return its status_id; poll documents.status for the public download_url Risk: destructive
Input Same asynchronous flow as documents.createAsync, for a paid hosted document; poll documents.status for the public download_url.
Output

download

documents.download Download a finished asynchronous document by its download_id and return the file (each download_url allows only a few fetches) Risk: read
Input Fetches the finished file by download_id, which uses up one of its few allowed fetches. Output

expire

documents.expire Permanently remove a hosted document so its public URL stops working; this cannot be undone Risk: destructive · Irreversible
Input Output

list

documents.list List generated documents with paging; test-mode keys are denied this listing Risk: read
Input The public test key is refused this listing with a 403, so the row fields pass through exactly as a paid account receives them. Output

status

documents.status Read where an asynchronous document stands: queued or working, completed with its download_url, or failed with validation errors Risk: read
Input The download_url of a non-hosted document allows only a few fetches and expires with the account’s data retention setting, so do not cache it. Hosted URLs follow hosted_download_limit and hosted_expires_at instead. Output

Ips

list

ips.list List the IP addresses DocRaptor downloads document assets from (document_url, images, stylesheets), for allowlisting on your servers Risk: read
Input: empty object Public endpoint served from docraptor.com; the standard auth header is sent and ignored. Output