- Qubitara eSign
- Developers
- Templates API
Templates API
This page is for developers who want to use templates from the app again and again. With a template, you do not place fields on every request. The page describes the planned template endpoints.
How templates work#
A template is a document layout that you can use many times. You create it under Templates → + New Template in the app. The wizard has three steps:
Step | What you set |
|---|---|
Type | Contract, NDA, HR & Onboarding, Invoice or Custom |
Details | Name, description, category, Make Public, optional base |
Roles | For example Employee and Manager |
Fields on a template belong to roles, not to named people.
When you create a signature request from a template, you do three things:
Bind each role to a real recipient (name and email).
Prefill form fields if you want to. Prefill means you put values in before the signer opens the document.
Save a draft or send at once.
For the same work in the app, see Templates and Create and use a template.
The template resource#
{
"id": "tpl_01J8Z5NDA",
"name": "Mutual NDA (standard)",
"description": "Two-party NDA, 2-year term",
"type": "nda",
"category": "non_disclosure_agreement",
"visibility": "private",
"roles": [
{ "id": "role_disclosing", "name": "Disclosing Party", "order": 1 },
{ "id": "role_receiving", "name": "Receiving Party", "order": 2 }
],
"fields": [
{ "id": "fld_a", "type": "signature", "role_id": "role_disclosing", "page": 3, "x": 72, "y": 600, "width": 180, "height": 60 },
{ "id": "fld_b", "type": "text", "role_id": "role_receiving", "label": "Company name", "page": 1, "x": 120, "y": 210, "width": 220, "height": 24 }
],
"field_count": 6,
"use_count": 14,
"has_base_docx": true,
"created_at": "2026-08-02T10:00:00Z",
"updated_at": "2026-09-01T14:20:00Z"
}All properties are planned and may change.
Property | Planned values |
|---|---|
| The wizard types: |
| The category chips in the app, in snake_case |
|
|
The category chips in the app are: Non-Disclosure Agreement, Contract, Employment, Real Estate, Sales Agreement, Lease Agreement, Service Agreement, Partnership Agreement, Legal Document, Financial Document, Healthcare, Human Resources, Government Form, Education, Other.
List templates#
curl "https://<org>.esign.qubitara.com/api/v1/templates?scope=mine&category=non_disclosure_agreement" \
-H "Authorization: Bearer $QUBITARA_API_KEY"The planned endpoint is GET /templates. The query parameters match the chips in the app: scope (all, mine, public), category, and q (name search). The endpoint also uses cursor pagination, as described in Authentication.
{
"data": [ { "id": "tpl_01J8Z5NDA", "name": "Mutual NDA (standard)", "field_count": 6, "use_count": 14, "visibility": "private" } ],
"has_more": false,
"next_cursor": null
}Get a template#
curl "https://<org>.esign.qubitara.com/api/v1/templates/tpl_01J8Z5NDA" \
-H "Authorization: Bearer $QUBITARA_API_KEY"The planned endpoint is GET /templates/{id}. Use it to find the role IDs and the labels of the fields you can prefill. Do this before you create a request.
Create a signature request from a template#
curl -X POST "https://<org>.esign.qubitara.com/api/v1/templates/tpl_01J8Z5NDA/signature-requests" \
-H "Authorization: Bearer $QUBITARA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "NDA - Acme Co. - Sept 2026",
"recipients": [
{ "role_id": "role_disclosing", "name": "Asha Rao", "email": "[email protected]" },
{ "role_id": "role_receiving", "name": "Ben Ito", "email": "[email protected]", "signature_type": "aadhaar_otp" }
],
"cc": ["[email protected]"],
"prefill": {
"Company name": "Acme Co.",
"Effective date": "2026-10-01"
},
"options": {
"sign_in_order": true,
"deadline": "2026-10-15",
"auto_reminder_days": 3,
"message": "Standard NDA for our engagement."
},
"send": true
}'The planned endpoint is POST /templates/{id}/signature-requests. The response is a normal signature request resource (see Signature requests). It has template_id set, and its status is draft or sent.
The planned rules are:
You must bind every role in the template to exactly one recipient. If not, the API returns
422 role_unbound.prefillkeys are field labels (or field IDs). You can prefill only Form and Advanced fields. If you prefill a signing field, the API returns422 field_not_prefillable.prefillvalues are strings fortextandparagraph, booleans forcheckbox, an option string forradioanddropdown, andYYYY-MM-DDfordate.A recipient bound to a role gets the fields of that role. You can add more
fieldsin the body. Place them as described in Signature requests.Sending uses a signing credit, the same as a normal send.
When you use a template, the API emits signature_request.created with template_id in the payload. When send is true, signature_request.sent follows. See Webhooks.
Public templates#
Templates with Make Public on can be used by "anyone with the link". The planned API behavior is:
GET /templates/{id}on a public template works with the key of any organization.POST /templates/{id}/signature-requestscreates the request in the organization of the caller.
Create or update templates through the API#
You build a template in the editor in the app. This includes placing fields, defining roles and uploading a base .docx. The plan for the first release is that the API can read and use templates only.
Bulk send#
Many teams need to send the same template to many recipients. An example is a policy that every employee must acknowledge.
A bulk-send endpoint is not planned in detail yet. Until it is, the planned way is to call POST /templates/{id}/signature-requests in a loop. Stay inside the rate limits.
Python example#
import os, requests
BASE = f"https://{os.environ['QUBITARA_ORG']}.esign.qubitara.com/api/v1"
H = {"Authorization": f"Bearer {os.environ['QUBITARA_API_KEY']}"}
tpl = requests.get(f"{BASE}/templates/tpl_01J8Z5NDA", headers=H, timeout=30).json()
roles = {r["name"]: r["id"] for r in tpl["roles"]}
r = requests.post(f"{BASE}/templates/{tpl['id']}/signature-requests", headers=H, timeout=30, json={
"title": "NDA - Acme Co.",
"recipients": [
{"role_id": roles["Disclosing Party"], "name": "Asha Rao", "email": "[email protected]"},
{"role_id": roles["Receiving Party"], "name": "Ben Ito", "email": "[email protected]"},
],
"prefill": {"Company name": "Acme Co."},
"send": True,
})
r.raise_for_status()
print(r.json()["id"], r.json()["status"])Every path and property in this example is planned and may change.
Next steps#
Signature requests: the resource you get back and how to track it.
Webhooks: react to
signature_request.createdandsignature_request.sent.Templates: build templates in the app.