Template links reference
Publish, list, rotate and delete shareable template links, and mint an embeddable URL for one.
All documentation
Six endpoints for publishing a template as a link anyone can sign. For the worked example, read template links. Requires the Business or Ultimate plan, same as the rest of the API.
The link object
{
"id": "lnk_2f8d...",
"slug": "k4m9xa",
"url": "https://app.documentesign.com/start/k4m9xa",
"template_id": "tpl_4c8a...",
"label": "Supplier NDA - website",
"headline": "Sign our mutual NDA",
"message": null,
"redirect_url": null,
"expires_at": null,
"max_uses": 500,
"use_count": 12,
"enabled": true,
"signers": [
{ "placeholder_id": "ph_1", "role": "Supplier",
"is_open": true, "name": null, "email": null }
],
"created_at": "2026-09-01T10:00:00.000Z"
}/v1/templates/{id}/links| Field | Type | Notes |
|---|---|---|
signers | object[]required | One entry per signer role on the template. Exactly one must be open. |
signers[].placeholder_id | stringrequired | From roles[].id on GET /v1/templates/{id}. |
signers[].is_open | booleanrequired | True for the role the visitor fills. |
signers[].name / email | string | Required on every signer that is not open, else 400 assigned_signer_incomplete. |
label | string | Internal name, up to 120 chars. |
headline / message | string | Shown to the visitor above the form. |
redirect_url | string | Where to send them after signing. Must be https://. |
expires_at | string | ISO 8601. |
max_uses | integer | The link stops working after this many completed starts. |
Returns 201 with the link object.
/v1/templates/{id}/linksEvery link published for one template, newest first: { "data": [ ... ] }.
/v1/template-links/{linkId}Returns the link object. An id in another workspace returns 404, the same way documents and templates do.
/v1/template-links/{linkId}/embed-link| Field | Type | Notes |
|---|---|---|
expires_in | integer | 60 to 3600 seconds. Defaults to 900. |
{ "url": "https://app.documentesign.com/start/embed/eyJ...",
"expires_at": "2026-09-01T10:15:00.000Z" }url on the link object is a full page and is served with frame-ancestors 'none', so a browser will not put it in an iframe. This mints a short-lived signed envelope for a frameable URL instead. The envelope carries the link id, so rotating the slug does not break an embed you have already deployed./v1/template-links/{linkId}/rotateIssues a new slug and returns the updated link. The old URL stops working immediately. Outstanding embed envelopes keep working, because they reference the link rather than the slug - delete the link if you need to kill those too.
/v1/template-links/{linkId}{ "id": "lnk_2f8d...", "deleted": true }Permanent. Documents already created from the link are unaffected.
| Field | Type | Notes |
|---|---|---|
exactly_one_open_role_required | 400 | Zero or more than one signer was marked open. |
assigned_signer_incomplete | 400 | A non-open signer is missing a name or email. |
signers_incomplete | 400 | Not every signer role on the template was covered. |
template_not_published | 409 | Publish the template before you publish a link for it. |
template_has_no_signer | 400 | The template has no signer roles. |
embedding_not_configured | 409 | No origins on the workspace embed allowlist. |
template_link_disabled / template_link_expired | 409 | Cannot mint an embed URL for a link that is not usable. |
template_link_not_found | 404 | Unknown id, or a link in another workspace. |
entitlement_required:template_share_links_enabled | 402 | The plan does not include shareable links. |