Create Session From Template

Create a new signing session from a template. This endpoint allows you to generate a session based on a template and specify recipients.

Endpoint

POST https://api.airsign.com.au/api/v1/SessionFromTemplate

Headers

NameValueRequiredDescription
Content-Typeapplication/jsonYesSpecifies the format of the request body
AuthorizationBearer {access_token}YesBearer token obtained from authentication

Request Body

ParameterTypeRequiredDescription
templateIdstringYesThe ID of the template to use, must be active
namestringNoName of the session (1-50 characters). Defaults to the template name
sendImmediatelybooleanNoWhether to send invitations immediately or leave in draft. Defaults to false
recipientsarrayNoList of recipient objects (name, email). Overrides the template recipients by index. Must not exceed the number of recipients defined in the template
variableValuesobjectNoKey-value map of template variable values. Text variables accept strings, image variables accept file IDs, and table variables accept objects with headers (string[]) and data (string[][]). Required variables must be provided
tagIdsstring[]NoArray of tag UUIDs to associate with the session

Session Settings

The following optional parameters allow you to override session settings. If not provided, values are inherited from the template. Some settings require specific plan features — using a setting without the required plan will return a 403 error.

ParameterTypeDescriptionPlan Required
expiryDaysnumberNumber of days before the session expires (1-730). Null means no expirySession Expiry
reminderEnabledbooleanWhether to send automatic reminders to recipientsSession Expiry
reminderFrequencystringReminder frequency: daily, weekly, monthly, or quarterlySession Expiry
senderProfileIdstringID of a verified sender profile to use for this sessionSender Profiles
overrideCompletionEmailRecipientsstringWho receives the completion email: all, sender_only, sender_and_cc, or noneAdvanced Completion Email
overrideAttachPdfbooleanWhether to attach the signed PDF to the completion emailAdvanced Completion Email
overrideAttachCertificatebooleanWhether to attach the signing certificate to the completion emailAdvanced Completion Email
overrideCustomCompletionMessagestringCustom message to include in the completion email (max 50,000 characters)Advanced Completion Email
overrideDownloadLinkExpiryDaysnumberNumber of days before the download link in the completion email expires (1-365)Advanced Completion Email

Example (application/json):

{
  "templateId": "2bc7fc6a-2b90-44f4-9889-d8f7673f5f4f",
  "name": "api test multirecipient",
  "sendImmediately": true,
  "recipients": [
    {
      "name": "test1",
      "email": "{valid_email}"
    }
  ],
  "variableValues": {
    "client_name": "Jane Smith",
    "contract_date": "2025-01-15"
  },
  "tagIds": ["tag-uuid-1"],
  "expiryDays": 30,
  "reminderEnabled": true,
  "reminderFrequency": "weekly"
}

Example Request

curl --location 'https://api.airsign.com.au/api/v1/SessionFromTemplate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data-raw '{
    "templateId": "{uuid}",
    "name": "api test multirecipient",
    "sendImmediately": true,
    "recipients": [{
        "name": "test1",
        "email": "{valid_email}"
    }],
    "variableValues": {
        "client_name": "Jane Smith"
    },
    "expiryDays": 30,
    "reminderEnabled": true,
    "reminderFrequency": "weekly"
}'

Response

Status: 200 OK

{
    "name": "Api Test",
    "sessionId": "{uuid}",
    "status": "pending",
    "selfSignOnly": false,
    "expiryDays": 30,
    "expiryDate": "2025-08-01 16:19:36",
    "reminderEnabled": true,
    "reminderFrequency": "weekly",
    "senderProfileId": null,
    "overrideCompletionEmailRecipients": null,
    "overrideAttachPdf": null,
    "overrideAttachCertificate": null,
    "overrideCustomCompletionMessage": null,
    "createdAt": "2025-07-02 16:19:36",
    "completedDate": null,
    "updatedAt": "2025-07-02 16:19:36",
    "files": [
        {
            "fileId": "{uuid}",
            "fileName": "{file_name}.pdf",
            "fileType": "application/octet-stream",
            "namespace": "templateDocuments",
            "zones": [
                {
                    "id": "{uuid}",
                    "name": "signingZone3315",
                    "type": "signingZone",
                    "label": "Sign",
                    "page": 1,
                    "recipientId": "default",
                    "x": 29.17,
                    "y": 38.01,
                    "w": 100,
                    "h": 50
                }
            ],
            "sessionId": "{uuid}",
            "importedZones": true
        }
    ],
    "recipients": [
        {
            "recipientId": "default",
            "status": "pending",
            "name": "test1",
            "email": "{valid_email}"
        }
    ],
    "tagIds": []
}

Error Responses

StatusDescription
400Invalid request body, template not active, recipients mismatch, or missing required variables
401Missing or invalid authentication token
403Your plan does not include the required feature for the provided session settings
404Template not found