Documents
Document Upload
Upload a file using POST /v3/company/{company}/file/upload.
Document Upload
Use this endpoint to upload a file before case creation.
If the combined size of the documents you want to send in a case is more than 3.5 MB, upload the files first and pass the returned URL into documents[].file in Case Create.
Authorization
All requests to this endpoint require authentication using a Bearer Token.
Use your NextSign API key as the bearer token for this endpoint.
Endpoint
POST https://api.nextsign.dk/v3/company/{company}/file/uploadPath Parameters
| Parameter | Type | Description |
|---|---|---|
company | string | Your company identifier |
Request Formats
This endpoint supports both:
multipart/form-data- Base64 payloads in the request body
Accepted File Types
application/pdfapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
Multipart Form Data Fields
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | File to upload |
name | string | No | File name to store with the upload |
type | string | No | Valid MIME type such as application/pdf |
Base64 Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
file | string | Yes | Base64 string or full data URL |
name | string | Yes | File name to store with the upload |
type | string | Conditionally | MIME type. Optional when file is a full data URL like data:application/pdf;base64,... |
For base64 uploads, send either a full data URL such as data:application/pdf;base64,... or a raw base64 string plus an explicit type.
Example Request
curl --location 'https://api.nextsign.dk/v3/company/{company}/file/upload' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'file=@"/path/to/Hi.pdf"' \
-F 'name=Hi.pdf' \
-F 'type=application/pdf'Example Request With Base64
{
"file": "data:application/pdf;base64,JVBERi0xLjQKJcfs...",
"name": "Hi.pdf"
}curl --location 'https://api.nextsign.dk/v3/company/{company}/file/upload' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{
"file": "data:application/pdf;base64,JVBERi0xLjQKJcfs...",
"name": "Hi.pdf"
}'Example Response
{
"url": "https://nextsign-dev.hel1.your-objectstorage.com/686557955db9ec08e6a94c39/1774622990607-Hi.pdf",
"type": "application/pdf"
}Response Fields
| Field | Type | Description |
|---|---|---|
url | string | Uploaded file URL to use in later API requests |
type | string | MIME type stored for the uploaded file |
Use In Case Create
Pass the returned url into the documents[].file field:
{
"documents": [
{
"name": "Hi.pdf",
"file": "https://nextsign-dev.hel1.your-objectstorage.com/686557955db9ec08e6a94c39/1774622990607-Hi.pdf"
}
]
}Related Endpoints
Common Error Responses
Missing file:
{
"error": "missing-file"
}Missing file name:
{
"error": "missing-file-name"
}Missing file type:
{
"error": "missing-file-type"
}Invalid file type:
{
"error": "invalid-file-type"
}