Resources

Documents

Upload PDFs, track status, void, download the signed result, and clean up drafts. Documents are the core object in the SigPen API.

Available on Developer+Quota: plan-basedWebhooks: document.*
POST/api/v1/documents/upload-url#

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.

ParameterTypeDescription
file_namerequiredstring
file_sizerequiredintegerSize of the PDF in bytes (max 26214400)
POST /api/v1/documents/upload-url
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
  }'
200 · RESPONSE
{
  "upload_url": "https://example.com/webhooks/sigpen",
  "upload_key": "string",
  "expires_in": 0,
  "max_file_size": 0
}
GET/api/v1/documents#

List documents

ParameterTypeDescription
statusoptionalstring
pageoptionalinteger
per_pageoptionalinteger
searchoptionalstring
sortoptionalenum: created_at · updated_at
orderoptionalenum: asc · desc
GET /api/v1/documents
curl -X GET \
  https://www.sigpen.com/api/v1/documents \
  -H "Authorization: Bearer sp_test_your_key"
200 · RESPONSE
{
  "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
  }
}
POST/api/v1/documents#

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.

ParameterTypeDescription
fileoptionalstringBase64-encoded PDF. Mutually exclusive with upload_key.
upload_keyoptionalstringStaging key from POST /documents/upload-url after PUTting the PDF. Mutually exclusive with file.
file_namerequiredstring
titleoptionalstring
external_idoptionalstringYour own record ID, stored on the document and returned in every webhook.
metadataoptionalobject
POST /api/v1/documents
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"
  }'
201 · RESPONSE
{
  "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"
}
GET/api/v1/documents/{id}#

Get a document

ParameterTypeDescription
idrequiredpathstring
GET /api/v1/documents/{id}
curl -X GET \
  https://www.sigpen.com/api/v1/documents/doc_123 \
  -H "Authorization: Bearer sp_test_your_key"
DELETE/api/v1/documents/{id}#

Delete a document (trash)

Moves a draft document to trash (30-day soft delete).

ParameterTypeDescription
idrequiredpathstring
DELETE /api/v1/documents/{id}
curl -X DELETE \
  https://www.sigpen.com/api/v1/documents/doc_123 \
  -H "Authorization: Bearer sp_test_your_key"
POST/api/v1/documents/{id}/void#

Void a document

ParameterTypeDescription
idrequiredpathstring
reasonrequiredstring
POST /api/v1/documents/{id}/void
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"
  }'
GET/api/v1/documents/{id}/download#

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.

ParameterTypeDescription
idrequiredpathstring
GET /api/v1/documents/{id}/download
curl -X GET \
  https://www.sigpen.com/api/v1/documents/doc_123/download \
  -H "Authorization: Bearer sp_test_your_key"