Put e-signatures inside your product

Create documents, collect signatures and record consent through one REST API. Embed the signing form in your app and get a webhook when it is done.

curl -X POST https://signlypdf.com/api/submissions \
  -H "X-Auth-Token: $SIGNLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": 1042,
    "send_email": true,
    "submitters": [
      {
        "role": "Merchant",
        "email": "owner@harbor-bistro.com",
        "name": "Lena Okafor"
      }
    ]
  }'

Overview

SignlyPDF gives you four building blocks. Use one or combine them: most integrations create a submission through the API, show the signing form inside their own app, and update their records from a webhook.

Quickstart

From a new account to a signed document in four steps.

  1. Request API access

    Create an account, open the API settings page and press Request access to tell us what you are building. Our team enables API access for your account, and your key then appears on the same page.

  2. Create a template

    Build it in the editor, or upload a PDF or Word file with POST /api/templates. A template holds the document, the signer roles and the fields each role fills in. Note its id.

  3. Send it for signature

    Create a submission for the template. With send_email: true each signer gets an invitation email. To sign inside your app instead, pass false and use the embed_src from the response.

    curl -X POST https://signlypdf.com/api/submissions \
      -H "X-Auth-Token: $SIGNLY_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "template_id": 1042,
        "send_email": true,
        "submitters": [
          {
            "role": "Merchant",
            "email": "owner@harbor-bistro.com",
            "name": "Lena Okafor"
          }
        ]
      }'
  4. Get notified

    An account admin adds an endpoint under Settings › Webhooks and subscribes it to form.completed. The payload includes the signer's values and links to the signed PDF and audit log. See Webhooks.

Authentication

Every request carries your API key in the X-Auth-Token header.

Each user has their own key on the API settings page, and it acts with that user's role inside your account. An Admin's key can do everything; an Editor's key works with templates, documents and clickwraps; a Viewer's key can only read. If an admin limited a user to their own documents, that user's key only sees the templates, submissions and clickwraps the user created. Rotating the key revokes the old one immediately.

The API is meant to be called from your server. Successful responses do not include CORS headers, so a key placed in browser code would not work and would be exposed.

  • Missing, wrong or revoked key: 401 {"error":"Not authenticated"}
  • Account without approved API access: 403 {"error":"Forbidden"}
  • A record that belongs to another account, or an action the key's user is not allowed to take: 403 {"error":"Not authorized"}
Check your key
curl https://signlypdf.com/api/user \
  -H "X-Auth-Token: $SIGNLY_API_KEY"
200 OK
{
  "id": 318,
  "first_name": "Marcus",
  "last_name": "Reyes",
  "email": "marcus@harbor-payments.com"
}

Try it now, no signup

A public, shared key for poking at the API before you create an account.

It works against every endpoint on this page, but with guardrails: it's shared by everyone reading these docs, so treat anything you create with it as temporary: everything made with this key is deleted automatically about six hours after it was created. It never sends email or SMS: invitations (even with send_email: true), completion and consent emails are skipped, so open the signing form through embed_src instead. When a clickwrap asks for a phone code, the code is shown on the page instead of being texted, so the flow is still testable. It also has a lower rate limit than a real key: 100 requests per 5 minutes in total, shared by everyone using it. The X-RateLimit-* headers still show the normal per-key budget, so do not rely on them with this key.

The sandbox account starts empty. Create a template first (see Templates), then send it or build a clickwrap on it.

For anything you intend to keep, create an account and use your own key instead.

Try it
curl https://signlypdf.com/api/templates \
  -H "X-Auth-Token: signly_sandbox_9f3c2a7b1e4d6f58a0c3b7e2d5f91a4c"

Requests

JSON over HTTPS, with resource paths under /api. The full machine-readable description is in our OpenAPI 3.1 spec; import it into Postman, Insomnia or a code generator.

  • Send request bodies as JSON with Content-Type: application/json. Without that header a JSON body is not read as JSON.
  • Timestamps are ISO 8601 in UTC, for example 2026-10-08T15:50:34.648Z.
  • Use external_id on templates and signers to store your own identifiers. You can filter lists by it later.
  • File links in responses (documents[].url, audit_log_url) are signed and expire after 40 minutes. Download the file, or fetch the record again for fresh links.

Pagination

List endpoints return the newest records first and page with a cursor.

limitinteger
Records per page. Default 10, maximum 100.
afterinteger
Return records older than this id. Pass pagination.next from the previous page.
beforeinteger
Return records newer than this id, for example to check for anything created since pagination.prev.

When data comes back with fewer items than limit, you have reached the end.

# First page
curl "https://signlypdf.com/api/submissions?limit=50" \
  -H "X-Auth-Token: $SIGNLY_API_KEY"

# Next page: pass pagination.next as "after"
curl "https://signlypdf.com/api/submissions?limit=50&after=8812" \
  -H "X-Auth-Token: $SIGNLY_API_KEY"

Errors

Failed requests return a status code and a JSON body with an error message.

422 Unprocessable Content
{ "error": "email is invalid in `submitters[0]`." }
StatusMeaning
200 201Success. Creating a template returns 201; other creates return 200.
401The API key is missing, wrong or revoked.
403API access is not approved for the account (Forbidden), or the key's user may not do this (Not authorized): the record belongs to a different account, a Viewer's key tried to change something, or a user limited to their own documents asked for someone else's.
404No record with that id.
422The request was understood but invalid: a missing field, an invalid email, a file that cannot be read. The message says which.
429Too many requests. Wait for the number of seconds in Retry-After; see Rate limits.
5xxSomething failed on our side. Retry with backoff; the request can be repeated safely only if it was a read.

Rate limits

Each API key gets 600 requests per 5 minutes, whichever IP address the calls come from.

Every API response to a request with a key tells you where you stand:

X-RateLimit-Limit
Requests allowed for this key in the current 5-minute window.
X-RateLimit-Remaining
Requests left in the window.
X-RateLimit-Reset
Unix time when the window resets.

Over the limit the API answers 429 with Retry-After set to the seconds left until the reset. Separately, one IP address can make up to 1,200 API calls per 5 minutes across all keys. Spread bulk jobs over time and use webhooks instead of polling. If you need more, talk to us before you launch.

Response headers
HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 587
X-RateLimit-Reset: 1791476100

Templates

A template is a document with signer roles and fields. Every submission starts from one. Every endpoint below is also described in the OpenAPI spec.

GET/api/templatesList templates. Filters: q, external_id, folder, archived=true.
GET/api/templates/{id}Template with roles, fields and document links.
POST/api/templatesCreate from a PDF, image or Word file.
POST/api/templates/htmlCreate from HTML (html), converted to PDF.
PUT/api/templates/{id}Rename, move, edit roles and fields, or archive with "archived": true. Note: in PUT, areas[].page starts at 0.
POST/api/templates/{id}/cloneCopy a template, optionally with a new name and external_id.
GET/api/templates/{id}/pdfDownload links for the template documents.
DELETE/api/templates/{id}Archive. Add permanently=true to delete.

Creating a template

Pass one or more documents. Each file is either a public https:// URL we download, or the file content as base64. PDF, images, DOCX, DOC, ODT, RTF, XLSX, XLS, PPTX, PPT and HTML are accepted; everything that is not a PDF or an image is converted to PDF. For base64 content, give the document a name with its extension (agreement.docx) or send a data: URI; without either we detect the type from the file itself.

Place fields with areas in relative coordinates: x, y, w and h run from 0 to 1 across the page, and page starts at 1. A role that does not exist yet becomes a new signer role. Optional folder_name puts the template in a folder (created if needed). If you leave fields out, we use the form fields already in the PDF; a PDF without form fields gives a template with no fields, and you need to add some before you can send it.

Field types: text, signature, initials, date, number, checkbox, radio, select, multiple, image, file, stamp, cells, phone.

curl -X POST https://signlypdf.com/api/templates \
  -H "X-Auth-Token: $SIGNLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Merchant Processing Agreement",
    "external_id": "mpa-v3",
    "documents": [
      {
        "name": "agreement.pdf",
        "file": "https://harbor-payments.com/mpa-v3.pdf",
        "fields": [
          {
            "name": "Signature",
            "type": "signature",
            "role": "Merchant",
            "areas": [
              { "page": 4, "x": 0.12, "y": 0.78, "w": 0.3, "h": 0.06 }
            ]
          }
        ]
      }
    ]
  }'

Field tags

Instead of coordinates, write tags into the document text: {{Field name;role=Client;type=signature}}. When a document comes without fields, each tag becomes a field over the space it takes, and the tag text is painted over so signers do not see it. This works for PDF, Word and other office files, and HTML.

  • The first part is the field name. role names the signer; the first role named takes the template's default one.
  • type is any field type above (default text). required defaults to true; readonly and options (comma separated, for select and radio) are optional.
  • The field is as wide as the tag. Signatures and initials get a minimum height; set height in points to change it.
  • In HTML you can also use field elements, for example <signature-field name="Sign" role="Client"></signature-field> or <date-field role="Client"/>; they are read as the same tags.
<p>Client name: {{Client name;role=Client}}</p>
<p>Plan: {{Plan;role=Client;type=select;options=Basic,Pro}}</p>
<p>Signature: {{Signature;role=Client;type=signature}}  Date: {{Date;role=Client;type=date}}</p>
<p>Provider: {{Provider signature;role=Provider;type=signature}}</p>

Submissions

A submission is one signing request: a template sent to one or more signers. Each signer is a submitter.

POST/api/submissionsSend a template for signature.
POST/api/submissions/pdf | docx | htmlSend a document without creating a template first: documents (or html) instead of template_id.
POST/api/submissions/emailsShortcut: template_id and emails (comma separated) creates one submission per address, each with a single signer.
GET/api/submissionsList. Filters: template_id, status, q, created_at_from, completed_at_to and more.
GET/api/submissions/{id}Status, signers, values, events, documents and audit log.
GET/api/submissions/{id}/documentsDocument links, including previews while signing is in progress.
GET/api/submissions/{id}/pdfSigned PDF links once every signer has completed.
DELETE/api/submissions/{id}Archive. Add permanently=true to delete.

Body

template_idintegerrequired
submittersarrayrequired
One entry per signer, each with at least an email, phone or name. Match a template role with role; signers without a matching role fill the remaining roles in order. A signer that prefills values must name an existing role, or the request fails with 422 Unknown submitter role. Also accepts values (prefill by field name), readonly_fields, external_id, metadata, completed, send_email and message.
send_emailboolean, default true
Email each signer an invitation. Set to false for embedded signing.
orderstring, default preserved
preserved invites signers one after another; random invites everyone at once.
completed_redirect_urlstring
Where to send the signer after they finish. We append ?event=completed or ?event=declined.
messageobject
Custom invitation email: subject and body (body is required).
expire_attimestamp
After this time the submission expires and the signing link stops working.
reply_to, bcc_completedemail
Reply-to address for invitations, and an address that gets a copy of the completed documents once every signer has finished. The copy is only sent when the submission's send_email is not false.

The response is an array with one object per signer. Each has an id, a slug and an embed_src for embedded signing.

curl -X POST https://signlypdf.com/api/submissions \
  -H "X-Auth-Token: $SIGNLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": 1042,
    "send_email": false,
    "completed_redirect_url": "https://harbor-payments.com/done",
    "submitters": [
      {
        "role": "Merchant",
        "email": "owner@harbor-bistro.com",
        "name": "Lena Okafor",
        "external_id": "merchant_5521",
        "metadata": { "application_id": "app_9f2c" },
        "values": { "Business name": "Harbor Bistro LLC" }
      }
    ]
  }'
Read the result later
curl https://signlypdf.com/api/submissions/8861 \
  -H "X-Auth-Token: $SIGNLY_API_KEY"

Without a template

POST /api/submissions/pdf, /docx and /html take the same body, but with the document itself in documents (or html) instead of template_id. We build a template from it exactly as POST /api/templates would, using its fields or field tags, then send it. The template stays in your account, so you can reuse it.

# No template needed: send the document and the signers in one call.
curl -X POST https://signlypdf.com/api/submissions/docx \
  -H "X-Auth-Token: $SIGNLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Service Agreement",
    "send_email": true,
    "documents": [
      { "name": "agreement.docx", "file": "https://harbor-payments.com/agreement.docx" }
    ],
    "submitters": [
      { "role": "Client", "email": "owner@harbor-bistro.com" },
      { "role": "Provider", "email": "ops@harbor-payments.com" }
    ]
  }'
Submission statusMeaning
pendingAt least one signer has not finished.
completedEvery signer has signed. Signed PDFs and the audit log are available.
declinedA signer declined. The reason is in the form.declined webhook as decline_reason, and in the API as submission_events[].data.reason on the decline_form event.
expiredexpire_at passed before everyone signed.

Submitters

One signer inside a submission.

GET/api/submittersFilters: submission_id, external_id, completed_after.
GET/api/submitters/{id}One signer with values and documents.
PUT/api/submitters/{id}Fix an email, prefill values, send the invitation (only if none was sent yet) or mark as completed.

Submitter status moves through awaiting, sent, opened and ends as completed or declined. A completed submitter can no longer be changed.

Correct an email and send the invitation
curl -X PUT https://signlypdf.com/api/submitters/20471 \
  -H "X-Auth-Token: $SIGNLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "lena@harbor-bistro.com",
    "send_email": true
  }'

Clickwrap

Create agreements and read the consents collected for them. How consent works is covered in Clickwrap consent.

GET/api/clickwrapsList active clickwraps.
POST/api/clickwrapsCreate, optionally with "publish": true.
GET/api/clickwraps/{id}Settings, version number and public url.
PUT/api/clickwraps/{id}Edit the draft. Add "publish": true to release it as a new version. The response shows the published version, so a draft change appears only after you publish.
POST/api/clickwraps/{id}/publishPublish the current draft as a new, immutable version.
GET/api/clickwraps/{id}/consentsConsents collected, newest first.
POST/api/clickwraps/{id}/consentsRecord a consent collected in your own UI.
GET/api/consents/{id}One consent with its certificate link.

Kinds

  • no_document: the agreement text is the content you send. Plain text keeps its line breaks. Text that starts with an HTML block tag (<p>, <h1>-<h3>, <ul>, <ol>, <blockquote>, <table>) is rendered as basic HTML; scripts, forms and other tags are stripped.
  • view_only: the signer reads a template document in a scrollable window on the page, then agrees. After agreeing the page shows it again with a Download button. With require_scroll_to_bottom (the default) the button unlocks only once the document has been scrolled to the end. This is checked in the browser, not on our server.
  • requires_signature: after agreeing, the signer signs the template document.

Set kind explicitly. Without it the clickwrap is view_only, which needs a template_id (422 Template can't be blank otherwise). For requires_signature the template must have exactly one signer role, and name and email are always required.

curl -X POST https://signlypdf.com/api/clickwraps \
  -H "X-Auth-Token: $SIGNLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Merchant Terms of Service",
    "kind": "view_only",
    "template_id": 1042,
    "button_text": "I agree",
    "require_name": true,
    "require_email": true,
    "checkboxes": [
      { "text": "I agree to the Merchant Terms.", "required": true },
      { "text": "Email me updates.", "required": false }
    ],
    "publish": true
  }'

Body

namestringrequired
Shown as the page title and in the certificate.
kind, template_id, content
What the user agrees to: see Kinds above.
checkboxesarray
Each { "text", "required", "dialog_content" }. dialog_content is optional text shown in a popup from that checkbox. Leave the array out and you get one required box, "I have read and agree to the terms of this document." An empty array is rejected.
require_name, require_emailboolean, default true
The hosted page refuses to record consent without them.
require_phone, require_phone_otpboolean, default false
Ask for a US phone number (+1 and 10 digits), and with require_phone_otp confirm it with a six-digit code sent by SMS; require_phone_otp turns require_phone on. sms_message sets the text; {code} is replaced with the code.
require_scroll_to_bottomboolean, default true
Keep the button locked until the agreement (the document, the content text, or the popup opened from inline_content) has been scrolled to the end. Checked in the browser only.
inline_contentstring
Short text shown next to the first checkbox instead of the full agreement, for example I agree to the <a href="#clickwrap-dialog-content">Terms</a>. That link opens content in a popup.
button_textstring, default "I Agree"
email_subject, email_bodystring
The confirmation email sent to the user with their certificate. {clickwrap_name}, {name} and {date} are replaced.
publishboolean
Release the clickwrap right away. Until it is published its page and the consents endpoint refuse consents.
# Terms as plain text, no document. Name and email are required by default.
curl -X POST https://signlypdf.com/api/clickwraps \
  -H "X-Auth-Token: $SIGNLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Platform Terms",
    "kind": "no_document",
    "content": "1. You keep your data.\n2. We keep it safe.",
    "checkboxes": [
      { "text": "I accept the Platform Terms.", "required": true,
        "dialog_content": "The full terms, shown in a popup from the checkbox." }
    ],
    "publish": true
  }'
Agree, verify the phone, then sign
# Agree, then sign. The template must have exactly one signer role.
curl -X POST https://signlypdf.com/api/clickwraps \
  -H "X-Auth-Token: $SIGNLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Merchant Agreement",
    "kind": "requires_signature",
    "template_id": 1042,
    "require_phone": true,
    "require_phone_otp": true,
    "sms_message": "Your SignlyPDF code is {code}",
    "publish": true
  }'

Versions

Every publish creates a new, numbered version that never changes. Edits go to the draft; the page and the API keep using the published version until you publish again, and each consent records the version it was given for.

Edit, publish, read consents
# Change the draft. Users keep seeing version 1 until you publish.
curl -X PUT https://signlypdf.com/api/clickwraps/77 \
  -H "X-Auth-Token: $SIGNLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "button_text": "Accept and continue" }'

# Release the draft as version 2. Consents from now on record version 2.
curl -X POST https://signlypdf.com/api/clickwraps/77/publish \
  -H "X-Auth-Token: $SIGNLY_API_KEY"

# Who agreed, newest first
curl "https://signlypdf.com/api/clickwraps/77/consents?limit=100" \
  -H "X-Auth-Token: $SIGNLY_API_KEY"

Events

A catch-up feed of completed signers and submissions, with data in the webhook format.

GET/api/events/form/{type}completed, declined or viewed (the first time a signer opened the form), newest first.
GET/api/events/submission/{type}completed, created, archived or expired, with the submission as data.

Use it to backfill after an outage of your webhook endpoint. after and before are Unix timestamps of the event (for example completed_at) rather than ids, with the same meaning as in Pagination: before=T returns events completed after T, after=T those completed before T. Each item has event_type, timestamp (when that event happened: completed_at, opened_at, declined_at and so on) and data in the webhook format, but no event_id.

cURL
# Events completed since 1791400000 (Unix time), newest first
curl "https://signlypdf.com/api/events/form/completed?before=1791400000&limit=100" \
  -H "X-Auth-Token: $SIGNLY_API_KEY"
POST/api/tools/mergeMerge two or more PDFs. Send files as base64; returns {"data": "<base64 PDF>"}.
POST/api/tools/verifyCheck a signed PDF (file as base64). Returns whether we issued it and its signatures.
GET/api/userThe user the API key belongs to.

Embedded signing

Show the signing form inside your own page, so signers never leave your product.

  1. Create the submission on your server with "send_email": false.
  2. Take embed_src from the signer in the response. It looks like https://signlypdf.com/apiemb/{slug}. If you only have a submitter from a list call, build the same URL from its slug.
  3. Render it with the <signlypdf-embed> element, which handles resizing and turns frame messages into DOM events. A plain <iframe> pointing at the same URL works too. Give it a fixed height (about 700px or 80vh): the answer field and the Next / Sign buttons sit at the bottom edge of the frame, so with height="auto" on a long document they end up far below the visible part of your page.
  4. Treat the browser event as a UI signal only. Confirm the result from the form.completed webhook or GET /api/submitters/{id} before you rely on it.
<script src="https://signlypdf.com/js/embed.js"></script>

<signlypdf-embed
  id="signing"
  src="https://signlypdf.com/apiemb/pX4ytYbVfQe2Lm"
  width="100%"
  height="700px">
</signlypdf-embed>

<script>
  const form = document.getElementById("signing");

  form.addEventListener("completed", (event) => {
    // event.detail.redirect_url is set when you passed completed_redirect_url
    window.location.href = event.detail.redirect_url || "/onboarding/done";
  });

  form.addEventListener("declined", () => {
    window.location.href = "/onboarding/declined";
  });
</script>

Only /apiemb/ links can be framed. Regular signing links (/s/), public template links (/d/) and clickwrap pages (/c/) refuse to load inside another site's iframe. The embed URL is a credential for that signer: generate it per signer on your server and do not share it.

Frame events

<signlypdf-embed> dispatches these as bubbling DOM events with the payload in event.detail.

EventWhenPayload
loadThe form has loaded in the frame.path, query
completedThe signer submitted the form.timestamp, redirect_url when one is set
declinedThe signer declined to sign.timestamp, redirect_url when one is set

The frame never navigates away on its own. When a redirect_url arrives, redirecting the page is up to you.

With a plain iframe, listen for message events. Accept only messages whose event.origin is https://signlypdf.com and whose data.source is "signlypdf"; data.type is one of loaded, resize, completed or declined. The same event can arrive more than once, so make your handler idempotent.

Clickwrap consent

A clickwrap is an agreement accepted with a click: your terms, optional required checkboxes, and an "I agree" button. There are two ways to collect consent.

Hosted page (recommended)

Send the user to the clickwrap's url. The page shows the current version, enforces the required name, email and checkboxes on our server, and records the user's own IP address and browser. Each consent gets a PDF certificate.

Prefill name, email and phone (used when the clickwrap asks for them), and pass external_id to link the consent to the user in your system. When the clickwrap verifies the phone, the user gets a six-digit code by SMS and enters it before the consent is recorded. After agreeing, requires_signature clickwraps continue straight to the signing form.

Link for one user
https://signlypdf.com/c/ToazhJ5qkCwGQx
  ?external_id=merchant_5521
  &name=Lena%20Okafor
  &email=owner%40harbor-bistro.com

Your own UI, recorded through the API

If the checkbox lives in your app, record the consent with POST /api/clickwraps/{id}/consents once the user agrees. We store what you send, so send the user's details, not your server's:

  • ip and user_agent from the user's request. Without them the record shows your server's address.
  • name, email, phone and external_id for the user.

The clickwrap must be published. Your app is responsible for showing the agreement text of the active version and for enforcing any required checkboxes and the phone code: nothing is checked on this call. The consent still gets a PDF certificate a few seconds later, and the same confirmation email goes to the address you sent. For a requires_signature clickwrap this call only records the consent; it does not start a signing session, so send the signer a submission yourself if you need the signature.

curl -X POST https://signlypdf.com/api/clickwraps/77/consents \
  -H "X-Auth-Token: $SIGNLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lena Okafor",
    "email": "owner@harbor-bistro.com",
    "phone": "+12025550123",
    "external_id": "merchant_5521",
    "ip": "203.0.113.24",
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6)"
  }'

Evidence and certificates

What is stored for each consent, and how the two methods compare.

Hosted pageRecorded through the API
Agreement versionRecordedRecorded (active version)
Name, email, external idName and email entered by the user (required ones enforced); external id from the linkAs sent by your server
PhoneEntered by the user; confirmed by SMS code when the clickwrap asks for itAs sent by your server, not verified
IP address and browserCaptured from the user's requestAs sent by your server
Checkbox answersEach box, ticked or not, printed on the certificateNot sent by you; the certificate lists every checkbox of the version as accepted
Time of agreementRecorded by SignlyPDFRecorded by SignlyPDF when the call arrives
PDF certificateYes for both, linked as certificate_url a few seconds after the consent, and emailed to the user (when there is an email) and to the clickwrap's creator

If consent may be used as evidence in a dispute, prefer the hosted page: the agreement is shown and the user's action is captured by SignlyPDF directly, not reported by your server. Published versions never change, so you can always show exactly what a user agreed to.

Clickwrap widget

Show an agreement inside your own website or web app, as a dialog or as an inline checkbox, and keep your user in your product.

  1. Create an app: you get a public App ID and a secret App Key.
  2. Show the agreement in the browser with the App ID. The widget returns a signature.
  3. Send the signature to your server, which confirms it with the App Key (server verification). Only then does the answer count.
<script src="https://signlypdf.com/clickwrap-widget.js"></script>
<script>
  SignlyClickwrap.init({ appId: 'cwa_...' })

  // dialog
  const result = await SignlyClickwrap.show({
    clickwrap: 'SLUG',            // the clickwrap's slug (its public link is /c/SLUG)
    endUserId: 'user-42',         // your id for this person; leave out to bind it later (deferred identity)
    language: 'en',               // stored with the answer
    placeholders: { full_name: 'Ann Lee', company_name: 'Acme' }
  })
  // result: { signature, status: 'accepted' | 'declined' }
  //      or { alreadyAccepted: true }   (no dialog is shown to someone who accepted the current version)
  //      or { canceled: true }

  // inline checkbox
  const box = SignlyClickwrap.renderInline('#terms', { clickwrap: 'SLUG', endUserId: 'user-42' },
                                           { onChange: ({ valid }) => submit.disabled = !valid })
  const outcome = await box.finalize()   // same result shape as show(); box.destroy() removes it
</script>

Options: disableClose: true removes the close button. Appearance (colors, radius, button and agreement text) comes from the clickwrap's Preview & Customize settings.

The app's allowed domains limit which sites may use the App ID (exact hosts or *.example.com; an empty list allows all). A request from another origin gets 403 with a readable error. The widget endpoints are rate limited to 1,000 requests per hour per app and IP.

Placeholders: full_name, email_address, company_name, job_title, phone_number, registration_no, vat_number, address, custom_1 to custom_10. date is always filled in by SignlyPDF. A placeholder without a value shows as an em dash.

Server verification

An answer collected by the widget stays unverified until your server confirms it. This keeps people from claiming consent that was never given.

POST/api/clickwrap/verifyConfirm a signature

Send the headers X-APP-ID and X-APP-KEY (never from a browser or mobile app) and the body { "signature": "...", "end_user_id": "..." }. end_user_id is required only when the widget was shown without one (deferred identity): the answer is then bound to that id.

curl -X POST https://signlypdf.com/api/clickwrap/verify \
  -H "X-APP-ID: cwa_..." -H "X-APP-KEY: cwk_..." -H "Content-Type: application/json" \
  -d '{"signature": "..."}'

{ "status": "ACCEPTED", "event_id": 912, "clickwrap_id": 77, "version": "1.0",
  "end_user_id": "user-42", "placeholders": {...},
  "technical_metadata": { "ip": "203.0.113.7", "user_agent": "..." },
  "action_at": "...", "presented_at": "...", "effective_at": "...", "verified_at": "..." }
  • status is ACCEPTED or DECLINED. A signature is also issued for a decline, so check the status before you grant access.
  • Verifying the same signature again returns the same result without repeating anything.
  • 410: the signature is forged or older than 24 hours (the answer is then expired). 404: it belongs to another account or app. 409: it already belongs to another end user. 422: end_user_id is missing.
  • When an answer is verified the certificate and signed agreement PDF are generated and the webhooks are sent.

Status and re-acceptance

Ask whether a person has agreed to the current terms, and ask people to agree again.

GET/api/clickwraps/{id}/status?external_id=...One clickwrap (by external_id or email)
GET/api/clickwrap_end_users/{external_id}/statusAll published clickwraps, optional tag filter
POST/api/clickwraps/{id}/reaccept{ "external_ids": [...] } or { "all": true }
GET/api/clickwrap_consentsSearch all consents: external_id, email, status, source, version, from, to, q
  • NO_DATA: never answered. ACCEPTED: agreed to the current major version. DECLINED: the latest answer was a decline. OVERDUE: agreed before, but a newer major version needs a new answer.
  • reacceptance_required: true on top of ACCEPTED means the clickwrap always asks again (setting require_reacceptance), or somebody asked for this person to re-accept after their last consent. Old consents and certificates are never changed; a new answer is a new consent.

Versions

Each publication is an immutable version: 1.0, 1.1, 2.0.

POST /api/clickwraps/{id}/publish accepts change_type (major by default: everybody agrees again; minor: people who agreed to this major version are not asked again), effective_at (an ISO time in the future schedules it; the current version keeps serving until then) and change_summary. GET /api/clickwraps/{id}/versions lists them with their status (active, scheduled, archived) and consent counts. A newer schedule replaces an older one.

Also: POST /api/clickwraps/{id}/archive, /unarchive and /duplicate.

Apps and keys

An app is one integration: a website or backend with its own App ID and App Key. Admins manage apps; there is no charge per app.

GET/api/clickwrap_appsList (the key itself is never shown again, only its last four characters)
POST/api/clickwrap_apps{ "name", "allowed_domains": [...] }; the response contains app_key once
PATCH/api/clickwrap_apps/{id}Rename, change domains, enable or disable
POST/api/clickwrap_apps/{id}/regenerate_keyThe old key stops working immediately

The App ID and App Key also authenticate the clickwrap endpoints of this API (/api/clickwraps*, /api/clickwrap_consents, /api/consents, /api/clickwrap_end_users, /api/clickwrap/verify) without an API token, using the headers X-APP-ID and X-APP-KEY. They cannot be used on other endpoints or to manage apps. Keep the App Key on your server.

Bundles

Show several published clickwraps (2 to 10) on one page, for example Terms, Privacy and Marketing at sign-up. Each item can be required or optional. Pro plan.

Create and publish a bundle in Clickwraps › Bundles. Every change makes a new immutable bundle version. People answer each item or decline all at once; every answer is stored as a normal consent that points to the bundle version.

  • Hosted page: /b/{slug}.
  • Widget: const result = await SignlyClickwrap.showBundle({ bundle: '{slug}', endUserId: 'user-42' }); send result.signature to your server.
  • Deferred identity: answers from the widget are pending until your server confirms them with POST /api/clickwrap_bundle/verify (body: signature and optionally end_user_id) using the App ID and App Key. Pending answers expire after 24 hours.
  • API: GET /api/clickwrap_bundles lists bundles with their active version and items.

Document delivery

Email people a link to their signed agreement and certificate right after they accept. Pro plan.

  1. Turn on Send agreement via email in the template's settings (the field send_agreement_email in the API).
  2. The email goes to the address the person entered, or to the one you pass in the widget with SignlyClickwrap.setRecipient('person@example.com', 'Full Name') before showing it.
  3. The link works for 7 days. After that the page offers Email me a new link. Replies go to the app's reply-to address.

Follow every email in Clickwraps › Document delivery: sent, failed or skipped, link status, downloads, plus Resend and Withdraw. Webhooks for clickwrap events can be added under Integrations; events can also be exported as CSV from Events with the filters you have set.

Audit log

Who changed what in the clickwrap console, from the dashboard or the API. Admins only.

GET /api/clickwrap_audit_logs with the optional filters action_name (for example clickwrap.published), resource_id, user_id, from, to. Each entry has the action, the resource, details, the user, IP address, user agent and whether it came from the dashboard or the API. Actions: clickwrap.created, updated, published, archived, unarchived, duplicated, reacceptance_requested and clickwrap_app.created, updated, key_regenerated, deleted.

Webhooks

We send an HTTPS POST to your endpoint when something happens to a document.

  1. Open Settings › Webhooks (account admins only) and add your endpoint URL. Use HTTPS in production.
  2. Choose the events you need. New endpoints start with the four form.* events.
  3. Set a secret: a header name and a random value (we recommend at least 32 characters). We use the value to sign every request.
  4. Until the endpoint has its first delivery, a Test Webhook button sends a sample form.completed built from your latest completed signer. It appears only when the endpoint subscribes to form.completed and the account has a completed signer. The test has no event_id and does not appear in the delivery log.

Clickwrap consents are not among the default events: tick clickwrap.consent.created on the endpoint to receive them.

Every real delivery is listed under the endpoint with its status and response code, and can be resent from there.

{
  "event_id": "0b4f3d6e-6a0c-4f7a-9d2b-1c55e8a07c3f",
  "event_type": "form.completed",
  "timestamp": "2026-10-08T15:50:34.648Z",
  "data": {
    "id": 20471,
    "submission_id": 8861,
    "email": "owner@harbor-bistro.com",
    "name": "Lena Okafor",
    "role": "Merchant",
    "status": "completed",
    "external_id": "merchant_5521",
    "metadata": { "application_id": "app_9f2c" },
    "ip": "203.0.113.24",
    "completed_at": "2026-10-08T15:50:31.020Z",
    "values": [
      { "field": "Business name", "value": "Harbor Bistro LLC" }
    ],
    "documents": [{ "name": "agreement", "url": "https://signlypdf.com/file/..." }],
    "audit_log_url": "https://signlypdf.com/file/...",
    "submission": { "id": 8861, "status": "completed" }
  }
}

Events

Every delivery has the same envelope: event_id, event_type, timestamp and data.

Signer events, data is the submitter

form.viewedThe signer opened the form. Sent on every visit.
form.startedThe signer saved their first field.
form.completedThe signer finished. Includes values, signed documents and audit log.
form.declinedThe signer declined, with decline_reason.

Document events, data is the submission or template

submission.createdA submission was created.
submission.completedEvery signer has completed.
submission.expiredIt expired before everyone signed.
submission.archivedIt was archived. data holds id, slug and archived_at.
template.createdA template was created or cloned.
template.updatedA template was changed.

Clickwrap events, data is the consent

clickwrap.consent.createdSomeone agreed, on the hosted page or through the API. data matches GET /api/consents/{id}; certificate_url may still be null, so fetch the consent again for it.
clickwrap.consent.declinedSomeone declined. Sent in addition to clickwrap.consent.created.
clickwrap.publishedA version went live (immediately, or when its scheduled time came). data describes the clickwrap and its current version.
clickwrap.archivedA clickwrap was archived; clickwrap.unarchived when it came back.
clickwrap.reacceptance_requestedRe-acceptance was requested for one person or for everybody.

Signer payloads are close to GET /api/submitters/{id}: the slug is in link_slug, there is no uuid or submission_events, and they add decline_reason, signer_order, total_signers, audit_log_url, the parent submission with its status, and the signer's ip and ua when they signed in the browser. Submission payloads match GET /api/submissions/{id}. Your external_id and metadata come back unchanged, so you can match events to your own records.

Signatures

Check that a request came from SignlyPDF before you act on it.

Every delivery carries X-Signly-Event-Id, X-Signly-Event-Type and X-Signly-Timestamp. When the endpoint has a secret it also carries X-Signly-Signature:

X-Signly-Signature
v1= followed by the hex HMAC-SHA256 of {timestamp}.{raw body}, keyed with your secret value.
X-Signly-Timestamp
Unix time the request was signed. Reject requests more than five minutes old to block replays.
X-Signly-Event-Id
Stable id of the event, the same on every retry. Store it to skip duplicates.
X-Signly-Event-Type
For example form.completed, so you can route before parsing the body.

The secret header itself (for example X-Webhook-Secret: <value>) is also sent, for receivers that only compare a shared value. It carries the same value that keys the signature, so treat it as sensitive. Checking the signature adds what the header alone cannot: proof that the body was not changed, and protection against replays through the signed timestamp.

import crypto from "node:crypto";
import express from "express";

const app = express();
const SECRET = process.env.SIGNLY_WEBHOOK_SECRET; // the value you saved as the webhook secret

// Verify against the raw body, before JSON parsing changes it.
app.post("/webhooks/signly", express.raw({ type: "application/json" }), (req, res) => {
  const timestamp = req.get("X-Signly-Timestamp");
  const signature = req.get("X-Signly-Signature") || "";

  const expected = "v1=" + crypto
    .createHmac("sha256", SECRET)
    .update(`${timestamp}.${req.body}`)
    .digest("hex");

  const valid = Buffer.byteLength(signature) === Buffer.byteLength(expected) &&
    crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
  const fresh = Math.abs(Date.now() / 1000 - Number(timestamp)) < 300;

  if (!valid || !fresh) return res.sendStatus(401);

  const event = JSON.parse(req.body);
  // Deduplicate on event.event_id, then hand off to a queue.
  res.sendStatus(200);
});

Delivery and retries

  • Answer with any 2xx status within 30 seconds. Do the real work in a background job after you respond.
  • A 4xx or 5xx status, a timeout or a connection error counts as a failure. Redirects are not followed: a 3xx is recorded as delivered and not retried.
  • Failed deliveries are retried with exponential backoff: 1, 2, 4, 8 minutes and so on, for about 34 hours. form.completed keeps retrying for almost 6 days.
  • Events can arrive more than once and out of order. Use event_id to deduplicate and the record's own timestamps to order them.
  • Download documents from the links in the payload right away: they expire after 40 minutes. A later GET on the submission returns fresh links.
  • If your endpoint was down for longer than the retry window, catch up with the events feed.

Ready to integrate?

Create an account and request API access. We review requests quickly and can help you plan your integration.