Skip to content

The Templates API lets you discover saved PDF templates, inspect their prefillable variable keys, and create a signing document from a template in one request—ideal for Zapier, Calendly, CRM, and custom automations.

GET /wp-json/insigner/v1/templates
ParameterTypeDefaultDescription
searchstringFilter by template name/description
per_pageinteger50Max results (1–100)
Terminal window
curl -X GET "https://your-site.com/wp-json/insigner/v1/templates?per_page=20" \
-H "X-WPS-API-Key: wps_your_key" \
-H "X-WPS-API-Secret: your_secret"
[
{
"id": 12,
"name": "Property Showing Agreement",
"description": "",
"original_filename": "showing-agreement.pdf",
"total_pages": 2,
"created_at": "2026-07-01 10:00:00",
"updated_at": "2026-07-15 14:30:00",
"variables": [
{ "key": "client_name", "label": "Client Name", "field_type": "name" },
{ "key": "property_address", "label": "Property Address", "field_type": "text" },
{ "key": "appointment_date", "label": "Appointment Date", "field_type": "date" }
]
}
]

Non-admin users only see their own templates. Administrators and users with full WPsigner manage access see all templates.


GET /wp-json/insigner/v1/templates/{id}

Returns the same shape as a list item, including the variables array.

Terminal window
curl -X GET "https://your-site.com/wp-json/insigner/v1/templates/12" \
-H "X-WPS-API-Key: wps_your_key" \
-H "X-WPS-API-Secret: your_secret"

Clone a template into a new document, optionally prefill fields, add signers, and email signing invitations.

POST /wp-json/insigner/v1/templates/{id}/documents

Note: Requires Full Access. Prefill only applies to non-signature fields that have a matching variable key.

ParameterTypeDescription
idintegerRequired. Template ID
ParameterTypeRequiredDefaultDescription
titlestringNoTemplate name + date/timeDocument title
signersarrayNo*[{ "name", "email", "role?", "signing_order?", "require_wp_login?" }]
signer_namestringNo*Convenience single signer name (used when signers is empty)
signer_emailstringNo*Convenience single signer email
variablesobjectNo{}Map of variable keys to values
client_namestringNoMerged into variables.client_name if not set
property_addressstringNoMerged into variables.property_address if not set
appointment_datestringNoMerged into variables.appointment_date if not set
sendbooleanNotrueWhen true, emails signing invitations immediately

* At least one signer is required when send is true.

Terminal window
curl -X POST "https://your-site.com/wp-json/insigner/v1/templates/12/documents" \
-H "X-WPS-API-Key: wps_your_key" \
-H "X-WPS-API-Secret: your_secret" \
-H "Content-Type: application/json" \
-d '{
"title": "Showing Agreement - Jane Smith",
"signer_name": "Jane Smith",
"signer_email": "jane@example.com",
"variables": {
"client_name": "Jane Smith",
"property_address": "123 Main Street, Austin, TX",
"appointment_date": "2026-08-10 14:00"
},
"send": true
}'
{
"id": 456,
"document_id": 456,
"template_id": 12,
"title": "Showing Agreement - Jane Smith",
"status": "sent",
"prefilled": true,
"sent": true,
"message": "Document sent successfully.",
"signers": [
{
"id": 10,
"name": "Jane Smith",
"email": "jane@example.com",
"role": "signer",
"signing_order": "1",
"status": "pending",
"signing_url": "https://your-site.com/?wps_sign=abc123"
}
],
"send_error": null
}
FieldDescription
prefilledtrue if at least one template field received a variable value
senttrue if invitations were emailed
signers[].signing_urlUnique signing link for that signer
  • Prefill writes values into WPsigner fields on the PDF (not binary PDF text merge).
  • Signature / initials fields are never auto-filled.
  • require_wp_login: true on a signer is refused unless that email already belongs to a WordPress user.
  • Set send to false if you want to review the draft first, then call POST /documents/{id}/send.