Upload File

Upload a PDF (base64-encoded) for use in sessions created with Create Session. The returned fileId is referenced in the session's files array as { "type": "uploadedPdf", "fileId": "..." }. Uploaded PDFs ride along as reference documents - signature fields are placed on block documents. Only PDF files are accepted, up to 7MB (decoded).

Endpoint

POST https://api.airsign.com.au/api/v1/File

Headers

NameValueRequiredDescription
Content-Typeapplication/jsonYesSpecifies the format of the request body
AuthorizationBearer {access_token}YesBearer token with the write:files or write:sessions scope

Request Body

ParameterTypeRequiredDescription
fileNamestringYesFile name (max 255 characters). A .pdf extension is added if missing
datastringYesbase64-encoded PDF bytes, without a data: URI prefix. Max 7MB decoded

Example Request

curl --location 'https://api.airsign.com.au/api/v1/File' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data-raw '{
    "fileName": "supplier-terms.pdf",
    "data": "JVBERi0xLjcKJ...{base64}..."
}'

Response

Status: 200 OK

{
    "fileId": "{uuid}",
    "fileName": "supplier-terms.pdf",
    "fileType": "application/pdf",
    "sizeBytes": 482133
}

Error Responses

StatusDescription
400Invalid base64 (INVALID_BASE64) or the decoded file is not a PDF (INVALID_FILE_TYPE)
401Missing or invalid authentication token
413File too large - max 7MB decoded (FILE_TOO_LARGE)