Document Signing

Add electronic signatures to your documents using <sign-field> HTML elements. Generate a PDF, send it for signature, and get back a sealed document — all through a single API.

How It Works

  1. Add sign fields to your HTML — Place <sign-field> elements where you want signatures, initials, dates, or text inputs.
  2. Create a signing request — Call POST /v1/sign with your HTML and a list of signers. The API generates the PDF and returns a unique signing URL for each signer.
  3. Signers complete their fields — Each signer opens their URL, reviews the document, draws their signature, and submits.
  4. Document is sealed — Once all signers complete, the original PDF is sealed with signatures overlaid and an audit trail appended.

Sign Field Elements

Sign fields are HTML elements that render as styled placeholders in the PDF. They flow naturally with your content — no coordinate math required.

<sign-field type="signature" signer="client" required>Sign here</sign-field>

<sign-field type="name" signer="client" label="Printed Name">Name</sign-field>

<sign-field type="date" signer="client">Date</sign-field>

<sign-field type="checkbox" signer="client"
  label="I agree to the terms" required>I agree</sign-field>

Field Types

TypeDescriptionRenders As
signaturePrimary signatureDrawing canvas (200x40px)
initialsInitialsSmall drawing canvas (60x30px)
namePrinted nameText input
emailEmail addressEmail input
dateDateDate picker
textFree textText input
checkboxAgreement checkboxCheckbox

Attributes

AttributeRequiredDescription
typeYesField type (signature, name, date, etc.)
signerYesRole name matching a signer in the request
requiredNoMust be filled to complete signing
labelNoLabel shown above the field
styleNoCSS styling (width, height)

Create Signing Request

POST https://pdfrelay.com/api/v1/sign
{
  "source": "html",
  "content": "<h1>Contract</h1>...<sign-field type=\"signature\" signer=\"client\" required>Sign</sign-field>...",
  "signers": [
    {
      "role": "client",
      "name": "Jane Smith",
      "email": "jane@example.com"
    },
    {
      "role": "provider",
      "name": "Bob Wilson",
      "email": "bob@company.com"
    }
  ],
  "signing_options": {
    "sequential": false,
    "expires_in": 604800,
    "message": "Please review and sign."
  }
}

The response includes a unique sign_url for each signer. Share these URLs — signers open them in a browser to review and sign.

Response

{
  "id": "sign_abc123",
  "status": "pending",
  "document_id": "doc_xyz",
  "signers": [
    {
      "id": "signer_1",
      "role": "client",
      "name": "Jane Smith",
      "status": "pending",
      "sign_url": "https://pdfrelay.com/sign/tok_abc123"
    }
  ]
}

Signing Status

GET https://pdfrelay.com/api/v1/sign/:id

Poll this endpoint to check signing progress. When status is completed, the signed_document_id field points to the sealed PDF with all signatures and an audit trail.

Void a Request

DELETE https://pdfrelay.com/api/v1/sign/:id

Cancels the signing request. Signers who haven't signed yet will see a "cancelled" message when they open their signing URL.

Sequential Signing

Set signing_options.sequential: true to require signers to sign in order. Each signer's status starts as waiting until the previous signer completes. The next signer is automatically unlocked when the current one finishes.

Full Example

A complete service agreement with checkbox acknowledgment and signature blocks for both parties:

curl -X POST https://pdfrelay.com/api/v1/sign \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "source": "html",
    "content": "<html><body>
      <h1>Service Agreement</h1>
      <p>Terms and conditions here...</p>

      <p><sign-field type=\"checkbox\" signer=\"client\"
        label=\"I agree\" required>I agree</sign-field></p>

      <sign-field type=\"signature\" signer=\"client\"
        required>Sign here</sign-field>
      <sign-field type=\"date\" signer=\"client\">Date</sign-field>

      <sign-field type=\"signature\" signer=\"provider\"
        required>Sign here</sign-field>
      <sign-field type=\"date\" signer=\"provider\">Date</sign-field>
    </body></html>",
    "signers": [
      {"role": "client", "name": "Jane", "email": "jane@example.com"},
      {"role": "provider", "name": "Bob", "email": "bob@co.com"}
    ]
  }'

Pricing

Document signing is included with all paid plans at no additional cost. Each signing request counts as a conversion (for the generated PDF) plus a hosted document. There are no per-signature fees.

Signing is not available on the free tier.

Document Signing - pdfRelay Docs | pdfRelay