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

NameValueRequiredDescription
Content-Typeapplication/jsonYesSpecifies the format of the request body
AuthorizationBearer {access_token}YesBearer token with the write:templates scope

Request Body

ParameterTypeRequiredDescription
namestringYesTemplate name (1-50 characters)
documentobjectYesA block document. May contain {{{variable}}} tokens
recipientsarrayYes1-20 recipients with key and optional name, email, signingOrder. Name/email may be variable tokens or left blank to fill in at session creation
variablesarrayNoUp 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
activatebooleanNotrue creates the template as active (immediately usable for sessions); false (default) creates a draft to review and activate in the editor first
expiryDays / reminderEnabled / reminderFrequencymixedNoDefault 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

StatusDescription
400Invalid request body, undeclared variable token, or the document failed layout validation (DOCUMENT_VALIDATION_FAILED with an issues list)
401Missing or invalid authentication token
403A setting requires a plan feature (PLAN_FEATURE_REQUIRED)