Create Template
Create a reusable signing template from scratch using the block document format. Use {{{variableName}}} tokens in the document text (and in recipient names/emails) for the values that change each time - declare each one in variables, and supply values later with Create Session From Template. Templates are created as drafts for review in the AirSign editor (editorUrl in the response); pass activate: true to make the template immediately usable.
Endpoint
POST https://api.airsign.com.au/api/v1/Template
Headers
| Name | Value | Required | Description |
|---|
| Content-Type | application/json | Yes | Specifies the format of the request body |
| Authorization | Bearer {access_token} | Yes | Bearer token with the write:templates scope |
Request Body
| Parameter | Type | Required | Description |
|---|
| name | string | Yes | Template name (1-50 characters) |
| document | object | Yes | A block document. May contain {{{variable}}} tokens |
| recipients | array | Yes | 1-20 recipients with key and optional name, email, signingOrder. Name/email may be variable tokens or left blank to fill in at session creation |
| variables | array | No | Up to 50 variable definitions: name (required), displayName, type (text, date or number, default text), required (default true), defaultValue, description. Every token used in the document must be declared here |
| activate | boolean | No | true creates the template as active (immediately usable for sessions); false (default) creates a draft to review and activate in the editor first |
| expiryDays / reminderEnabled / reminderFrequency | mixed | No | Default session settings inherited by sessions created from this template. Requires the Session Expiry plan feature |
Example Request
curl --location 'https://api.airsign.com.au/api/v1/Template' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data-raw '{
"name": "Offer Letter",
"activate": true,
"document": {
"format": "blocks",
"title": "Letter of Offer",
"blocks": [
{ "type": "paragraph", "text": "Dear {{{candidateName}}}, we are pleased to offer you the role of {{{roleTitle}}}." },
{ "type": "spacer", "height": 24 },
{ "type": "signatureBlock", "recipient": "candidate", "label": "Candidate" }
]
},
"recipients": [
{ "key": "candidate", "name": "{{{candidateName}}}", "email": "{{{candidateEmail}}}" }
],
"variables": [
{ "name": "candidateName", "displayName": "Candidate name" },
{ "name": "candidateEmail", "displayName": "Candidate email" },
{ "name": "roleTitle", "displayName": "Role title" }
]
}'
Response
Status: 200 OK
{
"templateId": "{uuid}",
"name": "Offer Letter",
"status": "active",
"pageCount": 1,
"recipients": [
{ "recipientId": "{uuid}", "name": "{{{candidateName}}}", "email": "{{{candidateEmail}}}", "signingOrder": 1 }
],
"variables": ["candidateName", "candidateEmail", "roleTitle"],
"editorUrl": "https://app.airsign.com.au/authenticated/main/templates/template/{uuid}",
"activated": true
}
Error Responses
| Status | Description |
|---|
400 | Invalid request body, undeclared variable token, or the document failed layout validation (DOCUMENT_VALIDATION_FAILED with an issues list) |
401 | Missing or invalid authentication token |
403 | A setting requires a plan feature (PLAN_FEATURE_REQUIRED) |