Skip to content

Get a presigned URL to upload a large PDF directly

POST
/files/presign
curl --request POST \
--url https://api.sealpost.app/v1/files/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "bytes": 1, "mime": "application/pdf" }'

Scope envelopes:write. Returns upload_url and the exact headers to send with the PUT (they carry the server-side encryption under the tenant’s key and are part of the signature). The URL lives 15 minutes. Then call POST /files/{id}/complete.

Media typeapplication/json
object
name
required
string
<= 255 characters
bytes
required

The file size you will upload.

integer
>= 1 <= 26214400
mime
string
default: application/pdf
Allowed values: application/pdf

Where to PUT the bytes.

Media typeapplication/json
object
file_id
required
string format: uuid
upload_url
required

PUT the bytes here.

string format: uri
headers
required

Send these headers on the PUT exactly; they are part of the signature.

object
key
additional properties
string
expires_at
required
string format: date-time
then
required

The path to POST once the upload is done.

string

Example generated

{
"file_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"upload_url": "https://example.com",
"headers": {
"additionalProperty": "example"
},
"expires_at": "2026-04-15T12:00:00Z",
"then": "example"
}
Sign-Request-Id
string

Unique id of this request (req_…). Quote it in support requests.

The request could not be read (malformed JSON, bad header).

Media typeapplication/problem+json

RFC 9457 problem details plus a stable code and the request_id.

object
type
required

https://sealpost.app/errors/{code}

string format: uri
title
required
string
status
required
integer
detail

Human-readable, safe to show to a developer, never contains secrets or signer data.

string
instance

The request path.

string
code
required

Stable machine-readable code from the catalogue (docs/errors.md).

string
request_id
required
string
errors

Field-level detail on validation_failed.

Array<object>
object
param
required

JSON pointer-ish path, e.g. scopes[2].

string
message
required
string

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"
}
Sign-Request-Id
string

Unique id of this request (req_…). Quote it in support requests.

No key, an unknown key, or a revoked or expired key.

Media typeapplication/problem+json

RFC 9457 problem details plus a stable code and the request_id.

object
type
required

https://sealpost.app/errors/{code}

string format: uri
title
required
string
status
required
integer
detail

Human-readable, safe to show to a developer, never contains secrets or signer data.

string
instance

The request path.

string
code
required

Stable machine-readable code from the catalogue (docs/errors.md).

string
request_id
required
string
errors

Field-level detail on validation_failed.

Array<object>
object
param
required

JSON pointer-ish path, e.g. scopes[2].

string
message
required
string

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"
}
Sign-Request-Id
string

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.

Media typeapplication/problem+json

RFC 9457 problem details plus a stable code and the request_id.

object
type
required

https://sealpost.app/errors/{code}

string format: uri
title
required
string
status
required
integer
detail

Human-readable, safe to show to a developer, never contains secrets or signer data.

string
instance

The request path.

string
code
required

Stable machine-readable code from the catalogue (docs/errors.md).

string
request_id
required
string
errors

Field-level detail on validation_failed.

Array<object>
object
param
required

JSON pointer-ish path, e.g. scopes[2].

string
message
required
string

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"
}
Sign-Request-Id
string

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.

Media typeapplication/problem+json

RFC 9457 problem details plus a stable code and the request_id.

object
type
required

https://sealpost.app/errors/{code}

string format: uri
title
required
string
status
required
integer
detail

Human-readable, safe to show to a developer, never contains secrets or signer data.

string
instance

The request path.

string
code
required

Stable machine-readable code from the catalogue (docs/errors.md).

string
request_id
required
string
errors

Field-level detail on validation_failed.

Array<object>
object
param
required

JSON pointer-ish path, e.g. scopes[2].

string
message
required
string

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"
}
Sign-Request-Id
string

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).

Media typeapplication/problem+json

RFC 9457 problem details plus a stable code and the request_id.

object
type
required

https://sealpost.app/errors/{code}

string format: uri
title
required
string
status
required
integer
detail

Human-readable, safe to show to a developer, never contains secrets or signer data.

string
instance

The request path.

string
code
required

Stable machine-readable code from the catalogue (docs/errors.md).

string
request_id
required
string
errors

Field-level detail on validation_failed.

Array<object>
object
param
required

JSON pointer-ish path, e.g. scopes[2].

string
message
required
string

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"
}
Sign-Request-Id
string

Unique id of this request (req_…). Quote it in support requests.

Retry-After
integer

Seconds to wait before retrying.

RateLimit-Limit
integer

Requests allowed per minute for this key (600 live, 60 test).

RateLimit-Remaining
integer

Requests remaining in the current window.

RateLimit-Reset
integer

Seconds until the window has capacity again.

Something failed on our side. The request_id is in our logs.

Media typeapplication/problem+json

RFC 9457 problem details plus a stable code and the request_id.

object
type
required

https://sealpost.app/errors/{code}

string format: uri
title
required
string
status
required
integer
detail

Human-readable, safe to show to a developer, never contains secrets or signer data.

string
instance

The request path.

string
code
required

Stable machine-readable code from the catalogue (docs/errors.md).

string
request_id
required
string
errors

Field-level detail on validation_failed.

Array<object>
object
param
required

JSON pointer-ish path, e.g. scopes[2].

string
message
required
string

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"
}
Sign-Request-Id
string

Unique id of this request (req_…). Quote it in support requests.