Upload a PDF, or register one by URL or base64
const url = 'https://api.sealpost.app/v1/files';const form = new FormData();form.append('file', 'example');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sealpost.app/v1/files \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=exampleScope envelopes:write. Three bodies: multipart/form-data with the PDF in the part
named file; JSON {"url": "https://…"} (publicly reachable, fetched once, 25 MB); or
JSON {"base64": "…", "name": "x.pdf"} (10 MB). The response carries the SHA-256 of the
original bytes, the page count and every page’s visual size in points (page_sizes),
which field geometry is checked against. PDF only in this release. An unattached file is
kept 30 days, then swept. For larger files use /files/presign. Honours Idempotency-Key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Client-chosen key, 1 to 255 characters, scoped to (tenant, API key,
method, path). The first response is stored for 24 hours and replayed
for repeats with the same body (Idempotent-Replayed: true). A repeat
with a different body is a 422 idempotency_key_reused; a repeat while
the first request is still running is a 409 idempotency_in_flight
(a request that dies mid-flight releases its lock after 60 seconds).
Request Bodyrequired
Section titled “Request Bodyrequired”object
Exactly one of url or base64 (a multipart body sends the part file instead).
object
Publicly reachable http(s) URL of a PDF, fetched once, 25 MB. Addresses inside private networks are refused.
The PDF bytes, up to 10 MB decoded.
File name shown to signers; defaults to the URL’s last segment or document.pdf.
Example generated
{ "url": "https://example.com", "base64": "example", "name": "example"}Responses
Section titled “Responses”The stored file.
object
Null until the file is attached to an envelope.
1-based order within the envelope.
The caller’s label for the document type, e.g. merchant_application; used to split a signed envelope back into its documents.
SHA-256 (hex) of the original bytes, exactly as uploaded. Null while pending.
One page’s visual size in points (after /Rotate).
object
When an unattached upload is swept (30 days). Null once attached.
Example
{ "page_sizes": [ { "rotate": 0 } ], "status": "pending"}Headers
Section titled “Headers”Unique id of this request (req_…). Quote it in support requests.
Present and true when the response was replayed from a stored earlier response for the same Idempotency-Key.
The request could not be read (malformed JSON, bad header).
RFC 9457 problem details plus a stable code and the request_id.
object
https://sealpost.app/errors/{code}
Human-readable, safe to show to a developer, never contains secrets or signer data.
The request path.
Stable machine-readable code from the catalogue (docs/errors.md).
Field-level detail on validation_failed.
object
JSON pointer-ish path, e.g. scopes[2].
Example
{ "type": "https://sealpost.app/errors/insufficient_scope", "title": "Forbidden", "status": 403, "detail": "This key lacks the api_keys:write scope.", "code": "insufficient_scope", "request_id": "req_01J9ZK3V8Q4M2XQ7W0E5D1R6TA"}Headers
Section titled “Headers”Unique id of this request (req_…). Quote it in support requests.
No key, an unknown key, or a revoked or expired key.
RFC 9457 problem details plus a stable code and the request_id.
object
https://sealpost.app/errors/{code}
Human-readable, safe to show to a developer, never contains secrets or signer data.
The request path.
Stable machine-readable code from the catalogue (docs/errors.md).
Field-level detail on validation_failed.
object
JSON pointer-ish path, e.g. scopes[2].
Example
{ "type": "https://sealpost.app/errors/insufficient_scope", "title": "Forbidden", "status": 403, "detail": "This key lacks the api_keys:write scope.", "code": "insufficient_scope", "request_id": "req_01J9ZK3V8Q4M2XQ7W0E5D1R6TA"}Headers
Section titled “Headers”Unique id of this request (req_…). Quote it in support requests.
The key is valid but lacks the scope, or a test key tried a live-only action.
RFC 9457 problem details plus a stable code and the request_id.
object
https://sealpost.app/errors/{code}
Human-readable, safe to show to a developer, never contains secrets or signer data.
The request path.
Stable machine-readable code from the catalogue (docs/errors.md).
Field-level detail on validation_failed.
object
JSON pointer-ish path, e.g. scopes[2].
Example
{ "type": "https://sealpost.app/errors/insufficient_scope", "title": "Forbidden", "status": 403, "detail": "This key lacks the api_keys:write scope.", "code": "insufficient_scope", "request_id": "req_01J9ZK3V8Q4M2XQ7W0E5D1R6TA"}Headers
Section titled “Headers”Unique id of this request (req_…). Quote it in support requests.
A request with the same Idempotency-Key is still in flight.
RFC 9457 problem details plus a stable code and the request_id.
object
https://sealpost.app/errors/{code}
Human-readable, safe to show to a developer, never contains secrets or signer data.
The request path.
Stable machine-readable code from the catalogue (docs/errors.md).
Field-level detail on validation_failed.
object
JSON pointer-ish path, e.g. scopes[2].
Example
{ "type": "https://sealpost.app/errors/insufficient_scope", "title": "Forbidden", "status": 403, "detail": "This key lacks the api_keys:write scope.", "code": "insufficient_scope", "request_id": "req_01J9ZK3V8Q4M2XQ7W0E5D1R6TA"}Headers
Section titled “Headers”Unique id of this request (req_…). Quote it in support requests.
A file is over 25 MB (10 MB inline as base64); use /files/presign.
RFC 9457 problem details plus a stable code and the request_id.
object
https://sealpost.app/errors/{code}
Human-readable, safe to show to a developer, never contains secrets or signer data.
The request path.
Stable machine-readable code from the catalogue (docs/errors.md).
Field-level detail on validation_failed.
object
JSON pointer-ish path, e.g. scopes[2].
Example
{ "type": "https://sealpost.app/errors/insufficient_scope", "title": "Forbidden", "status": 403, "detail": "This key lacks the api_keys:write scope.", "code": "insufficient_scope", "request_id": "req_01J9ZK3V8Q4M2XQ7W0E5D1R6TA"}Headers
Section titled “Headers”Unique id of this request (req_…). Quote it in support requests.
The request was read but a value is invalid, or an Idempotency-Key was reused with a different body.
RFC 9457 problem details plus a stable code and the request_id.
object
https://sealpost.app/errors/{code}
Human-readable, safe to show to a developer, never contains secrets or signer data.
The request path.
Stable machine-readable code from the catalogue (docs/errors.md).
Field-level detail on validation_failed.
object
JSON pointer-ish path, e.g. scopes[2].
Example
{ "type": "https://sealpost.app/errors/insufficient_scope", "title": "Forbidden", "status": 403, "detail": "This key lacks the api_keys:write scope.", "code": "insufficient_scope", "request_id": "req_01J9ZK3V8Q4M2XQ7W0E5D1R6TA"}Headers
Section titled “Headers”Unique id of this request (req_…). Quote it in support requests.
The key is over its per-minute budget (600 live, 60 test, sliding window).
RFC 9457 problem details plus a stable code and the request_id.
object
https://sealpost.app/errors/{code}
Human-readable, safe to show to a developer, never contains secrets or signer data.
The request path.
Stable machine-readable code from the catalogue (docs/errors.md).
Field-level detail on validation_failed.
object
JSON pointer-ish path, e.g. scopes[2].
Example
{ "type": "https://sealpost.app/errors/insufficient_scope", "title": "Forbidden", "status": 403, "detail": "This key lacks the api_keys:write scope.", "code": "insufficient_scope", "request_id": "req_01J9ZK3V8Q4M2XQ7W0E5D1R6TA"}Headers
Section titled “Headers”Unique id of this request (req_…). Quote it in support requests.
Seconds to wait before retrying.
Requests allowed per minute for this key (600 live, 60 test).
Requests remaining in the current window.
Seconds until the window has capacity again.
Something failed on our side. The request_id is in our logs.
RFC 9457 problem details plus a stable code and the request_id.
object
https://sealpost.app/errors/{code}
Human-readable, safe to show to a developer, never contains secrets or signer data.
The request path.
Stable machine-readable code from the catalogue (docs/errors.md).
Field-level detail on validation_failed.
object
JSON pointer-ish path, e.g. scopes[2].
Example
{ "type": "https://sealpost.app/errors/insufficient_scope", "title": "Forbidden", "status": 403, "detail": "This key lacks the api_keys:write scope.", "code": "insufficient_scope", "request_id": "req_01J9ZK3V8Q4M2XQ7W0E5D1R6TA"}Headers
Section titled “Headers”Unique id of this request (req_…). Quote it in support requests.
The document service could not be reached; nothing was stored. Retry after Retry-After seconds with the same Idempotency-Key.
RFC 9457 problem details plus a stable code and the request_id.
object
https://sealpost.app/errors/{code}
Human-readable, safe to show to a developer, never contains secrets or signer data.
The request path.
Stable machine-readable code from the catalogue (docs/errors.md).
Field-level detail on validation_failed.
object
JSON pointer-ish path, e.g. scopes[2].
Example
{ "type": "https://sealpost.app/errors/insufficient_scope", "title": "Forbidden", "status": 403, "detail": "This key lacks the api_keys:write scope.", "code": "insufficient_scope", "request_id": "req_01J9ZK3V8Q4M2XQ7W0E5D1R6TA"}Headers
Section titled “Headers”Unique id of this request (req_…). Quote it in support requests.
Seconds to wait before retrying.