Skip to main content
POST
@firma-dev/sdk

Authorizations

Authorization
string
header
required

API key for authentication. Use your API key directly without any prefix (e.g., 'your-api-key'). Bearer prefix is optional but not required.

Body

application/json
file_name
string
required

Name of the document file

Maximum string length: 255
Example:

"contract.pdf"

file_size
integer
required

File size in bytes. Maximum 50MB (52,428,800 bytes).

Required range: 1 <= x <= 52428800
Example:

15000000

content_type
enum<string>
required

MIME type of the document

Available options:
application/pdf,
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Example:

"application/pdf"

Response

Upload URL created

document_id
string<uuid>

Document ID to pass in the signing request

upload_url
string<uri>

Presigned URL to PUT the document file to. Send the raw file bytes with Content-Type matching the requested content_type.

upload_token
string

Upload authentication token (included in the upload_url)

expires_in
integer

Seconds until the upload URL expires

Example:

3600