Resources
Documents
Upload PDFs, track status, void, download the signed result, and clean up drafts. Documents are the core object in the SigPen API.
Request a presigned direct upload URL
For PDFs too large to send base64-encoded in the POST /documents body (request bodies over 4.5MB are rejected, roughly 3MB of PDF after base64 inflation). PUT the raw PDF to the returned upload_url with Content-Type application/pdf, then call POST /documents with upload_key instead of file. URLs expire after 10 minutes. Hard cap 25MB.
| Parameter | Type | Description |
|---|---|---|
file_namerequired | string | |
file_sizerequired | integer | Size of the PDF in bytes (max 26214400) |
curl -X POST \
https://www.sigpen.com/api/v1/documents/upload-url \
-H "Authorization: Bearer sp_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"file_name": "nda.pdf",
"file_size": 0
}'{
"upload_url": "https://example.com/webhooks/sigpen",
"upload_key": "string",
"expires_in": 0,
"max_file_size": 0
}List documents
| Parameter | Type | Description |
|---|---|---|
statusoptional | string | |
pageoptional | integer | |
per_pageoptional | integer | |
searchoptional | string | |
sortoptional | enum: created_at · updated_at | |
orderoptional | enum: asc · desc |
curl -X GET \ https://www.sigpen.com/api/v1/documents \ -H "Authorization: Bearer sp_test_your_key"
{
"data": [
{
"id": "doc_123",
"external_id": "crm-7841",
"title": "Mutual NDA",
"file_name": "nda.pdf",
"status": "draft",
"metadata": {
"key": "value"
},
"created_at": "2026-06-11T18:02:11Z",
"updated_at": "2026-06-11T18:02:11Z"
}
],
"pagination": {
"page": 1,
"per_page": 0,
"total": 0,
"total_pages": 0
}
}Upload a document
Create a document from a PDF. Provide either file (base64-encoded, for PDFs up to ~3MB; larger request bodies are rejected by the platform) or upload_key (from POST /documents/upload-url, for PDFs up to 25MB). Counts toward monthly document limit.
| Parameter | Type | Description |
|---|---|---|
fileoptional | string | Base64-encoded PDF. Mutually exclusive with upload_key. |
upload_keyoptional | string | Staging key from POST /documents/upload-url after PUTting the PDF. Mutually exclusive with file. |
file_namerequired | string | |
titleoptional | string | |
external_idoptional | string | Your own record ID, stored on the document and returned in every webhook. |
metadataoptional | object |
curl -X POST \
https://www.sigpen.com/api/v1/documents \
-H "Authorization: Bearer sp_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"file_name": "nda.pdf",
"file": "JVBERi0xLjcK… (base64 PDF)",
"upload_key": "string",
"title": "Mutual NDA",
"external_id": "crm-7841"
}'{
"id": "doc_123",
"external_id": "crm-7841",
"title": "Mutual NDA",
"file_name": "nda.pdf",
"status": "draft",
"metadata": {
"key": "value"
},
"created_at": "2026-06-11T18:02:11Z",
"updated_at": "2026-06-11T18:02:11Z"
}curl -X GET \ https://www.sigpen.com/api/v1/documents/doc_123 \ -H "Authorization: Bearer sp_test_your_key"
Delete a document (trash)
Moves a draft document to trash (30-day soft delete).
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string |
curl -X DELETE \ https://www.sigpen.com/api/v1/documents/doc_123 \ -H "Authorization: Bearer sp_test_your_key"
Void a document
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string | |
reasonrequired | string |
curl -X POST \
https://www.sigpen.com/api/v1/documents/doc_123/void \
-H "Authorization: Bearer sp_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"reason": "string"
}'Download signed PDF
Returns the completed, signed PDF. Files over ~4MB return a 302 redirect to a short-lived download URL instead of the bytes; HTTP clients follow redirects by default.
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string |
curl -X GET \ https://www.sigpen.com/api/v1/documents/doc_123/download \ -H "Authorization: Bearer sp_test_your_key"