curl --request POST \
--url https://my.flowsign.app/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "Employment agreement",
"roles": [
{
"name": "Employee",
"order": 0,
"id": "cmg3k2v8a0001s7p4d9x1qz2h",
"actionType": "SIGNER",
"deliveryDefault": "EMAIL",
"hostRole": "SENDER",
"hostUserIds": [
"8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f"
],
"hostGroupIds": [
"cmg1hd3x10002v8p9f6r8bt4n"
]
}
],
"description": "Standard individual employment agreement for new hires.",
"status": "DRAFT",
"tags": [
"HR",
"Onboarding"
],
"reminderIntervalDays": 3,
"expirationDays": 30,
"expiryWarningDays": 5,
"emailSubject": "Your employment agreement with Studio Phoenix Limited",
"emailMessage": "Kia ora {{employee_name}}, please review and sign your agreement.",
"signingMode": "SEQUENTIAL",
"brandColor": "#1a2b3c",
"metadata": "<unknown>",
"questions": [
{
"question": "Does the role include a company vehicle?",
"order": 0,
"type": "TOGGLE",
"dependsOnQuestionIndex": 0,
"dependsOnOptionIndex": 0,
"options": [
{
"label": "Yes",
"order": 0,
"isDefault": true,
"actions": [
{
"type": "INCLUDE_DOCUMENT",
"targetDocumentId": "cmg3k5r1c0003s7p4h2m8tb7k",
"targetFieldId": "cmg3k7q9e0004s7p4b1z6lc3n"
}
]
}
]
}
],
"mergeFields": [
{
"key": "start_date",
"label": "Start date",
"order": 0,
"description": "The employee's first day of work.",
"source": "SENDER",
"type": "DATE",
"options": [
"Full time",
"Part time"
],
"defaultValue": "2026-10-01",
"isRequired": true
}
]
}
EOFconst options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Employment agreement',
roles: [
{
name: 'Employee',
order: 0,
id: 'cmg3k2v8a0001s7p4d9x1qz2h',
actionType: 'SIGNER',
deliveryDefault: 'EMAIL',
hostRole: 'SENDER',
hostUserIds: ['8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f'],
hostGroupIds: ['cmg1hd3x10002v8p9f6r8bt4n']
}
],
description: 'Standard individual employment agreement for new hires.',
status: 'DRAFT',
tags: ['HR', 'Onboarding'],
reminderIntervalDays: 3,
expirationDays: 30,
expiryWarningDays: 5,
emailSubject: 'Your employment agreement with Studio Phoenix Limited',
emailMessage: 'Kia ora {{employee_name}}, please review and sign your agreement.',
signingMode: 'SEQUENTIAL',
brandColor: '#1a2b3c',
metadata: '<unknown>',
questions: [
{
question: 'Does the role include a company vehicle?',
order: 0,
type: 'TOGGLE',
dependsOnQuestionIndex: 0,
dependsOnOptionIndex: 0,
options: [
{
label: 'Yes',
order: 0,
isDefault: true,
actions: [
{
type: 'INCLUDE_DOCUMENT',
targetDocumentId: 'cmg3k5r1c0003s7p4h2m8tb7k',
targetFieldId: 'cmg3k7q9e0004s7p4b1z6lc3n'
}
]
}
]
}
],
mergeFields: [
{
key: 'start_date',
label: 'Start date',
order: 0,
description: 'The employee\'s first day of work.',
source: 'SENDER',
type: 'DATE',
options: ['Full time', 'Part time'],
defaultValue: '2026-10-01',
isRequired: true
}
]
})
};
fetch('https://my.flowsign.app/api/v1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Employment agreement',
roles: [
{
name: 'Employee',
order: 0,
id: 'cmg3k2v8a0001s7p4d9x1qz2h',
actionType: 'SIGNER',
deliveryDefault: 'EMAIL',
hostRole: 'SENDER',
hostUserIds: ['8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f'],
hostGroupIds: ['cmg1hd3x10002v8p9f6r8bt4n']
}
],
description: 'Standard individual employment agreement for new hires.',
status: 'DRAFT',
tags: ['HR', 'Onboarding'],
reminderIntervalDays: 3,
expirationDays: 30,
expiryWarningDays: 5,
emailSubject: 'Your employment agreement with Studio Phoenix Limited',
emailMessage: 'Kia ora {{employee_name}}, please review and sign your agreement.',
signingMode: 'SEQUENTIAL',
brandColor: '#1a2b3c',
metadata: '<unknown>',
questions: [
{
question: 'Does the role include a company vehicle?',
order: 0,
type: 'TOGGLE',
dependsOnQuestionIndex: 0,
dependsOnOptionIndex: 0,
options: [
{
label: 'Yes',
order: 0,
isDefault: true,
actions: [
{
type: 'INCLUDE_DOCUMENT',
targetDocumentId: 'cmg3k5r1c0003s7p4h2m8tb7k',
targetFieldId: 'cmg3k7q9e0004s7p4b1z6lc3n'
}
]
}
]
}
],
mergeFields: [
{
key: 'start_date',
label: 'Start date',
order: 0,
description: 'The employee\'s first day of work.',
source: 'SENDER',
type: 'DATE',
options: ['Full time', 'Part time'],
defaultValue: '2026-10-01',
isRequired: true
}
]
})
};
fetch('https://my.flowsign.app/api/v1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://my.flowsign.app/api/v1/templates';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Employment agreement',
roles: [
{
name: 'Employee',
order: 0,
id: 'cmg3k2v8a0001s7p4d9x1qz2h',
actionType: 'SIGNER',
deliveryDefault: 'EMAIL',
hostRole: 'SENDER',
hostUserIds: ['8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f'],
hostGroupIds: ['cmg1hd3x10002v8p9f6r8bt4n']
}
],
description: 'Standard individual employment agreement for new hires.',
status: 'DRAFT',
tags: ['HR', 'Onboarding'],
reminderIntervalDays: 3,
expirationDays: 30,
expiryWarningDays: 5,
emailSubject: 'Your employment agreement with Studio Phoenix Limited',
emailMessage: 'Kia ora {{employee_name}}, please review and sign your agreement.',
signingMode: 'SEQUENTIAL',
brandColor: '#1a2b3c',
metadata: '<unknown>',
questions: [
{
question: 'Does the role include a company vehicle?',
order: 0,
type: 'TOGGLE',
dependsOnQuestionIndex: 0,
dependsOnOptionIndex: 0,
options: [
{
label: 'Yes',
order: 0,
isDefault: true,
actions: [
{
type: 'INCLUDE_DOCUMENT',
targetDocumentId: 'cmg3k5r1c0003s7p4h2m8tb7k',
targetFieldId: 'cmg3k7q9e0004s7p4b1z6lc3n'
}
]
}
]
}
],
mergeFields: [
{
key: 'start_date',
label: 'Start date',
order: 0,
description: 'The employee\'s first day of work.',
source: 'SENDER',
type: 'DATE',
options: ['Full time', 'Part time'],
defaultValue: '2026-10-01',
isRequired: true
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://my.flowsign.app/api/v1/templates"
payload = {
"name": "Employment agreement",
"roles": [
{
"name": "Employee",
"order": 0,
"id": "cmg3k2v8a0001s7p4d9x1qz2h",
"actionType": "SIGNER",
"deliveryDefault": "EMAIL",
"hostRole": "SENDER",
"hostUserIds": ["8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f"],
"hostGroupIds": ["cmg1hd3x10002v8p9f6r8bt4n"]
}
],
"description": "Standard individual employment agreement for new hires.",
"status": "DRAFT",
"tags": ["HR", "Onboarding"],
"reminderIntervalDays": 3,
"expirationDays": 30,
"expiryWarningDays": 5,
"emailSubject": "Your employment agreement with Studio Phoenix Limited",
"emailMessage": "Kia ora {{employee_name}}, please review and sign your agreement.",
"signingMode": "SEQUENTIAL",
"brandColor": "#1a2b3c",
"metadata": "<unknown>",
"questions": [
{
"question": "Does the role include a company vehicle?",
"order": 0,
"type": "TOGGLE",
"dependsOnQuestionIndex": 0,
"dependsOnOptionIndex": 0,
"options": [
{
"label": "Yes",
"order": 0,
"isDefault": True,
"actions": [
{
"type": "INCLUDE_DOCUMENT",
"targetDocumentId": "cmg3k5r1c0003s7p4h2m8tb7k",
"targetFieldId": "cmg3k7q9e0004s7p4b1z6lc3n"
}
]
}
]
}
],
"mergeFields": [
{
"key": "start_date",
"label": "Start date",
"order": 0,
"description": "The employee's first day of work.",
"source": "SENDER",
"type": "DATE",
"options": ["Full time", "Part time"],
"defaultValue": "2026-10-01",
"isRequired": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://my.flowsign.app/api/v1/templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"name\": \"Employment agreement\",\n \"roles\": [\n {\n \"name\": \"Employee\",\n \"order\": 0,\n \"id\": \"cmg3k2v8a0001s7p4d9x1qz2h\",\n \"actionType\": \"SIGNER\",\n \"deliveryDefault\": \"EMAIL\",\n \"hostRole\": \"SENDER\",\n \"hostUserIds\": [\n \"8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f\"\n ],\n \"hostGroupIds\": [\n \"cmg1hd3x10002v8p9f6r8bt4n\"\n ]\n }\n ],\n \"description\": \"Standard individual employment agreement for new hires.\",\n \"status\": \"DRAFT\",\n \"tags\": [\n \"HR\",\n \"Onboarding\"\n ],\n \"reminderIntervalDays\": 3,\n \"expirationDays\": 30,\n \"expiryWarningDays\": 5,\n \"emailSubject\": \"Your employment agreement with Studio Phoenix Limited\",\n \"emailMessage\": \"Kia ora {{employee_name}}, please review and sign your agreement.\",\n \"signingMode\": \"SEQUENTIAL\",\n \"brandColor\": \"#1a2b3c\",\n \"metadata\": \"<unknown>\",\n \"questions\": [\n {\n \"question\": \"Does the role include a company vehicle?\",\n \"order\": 0,\n \"type\": \"TOGGLE\",\n \"dependsOnQuestionIndex\": 0,\n \"dependsOnOptionIndex\": 0,\n \"options\": [\n {\n \"label\": \"Yes\",\n \"order\": 0,\n \"isDefault\": true,\n \"actions\": [\n {\n \"type\": \"INCLUDE_DOCUMENT\",\n \"targetDocumentId\": \"cmg3k5r1c0003s7p4h2m8tb7k\",\n \"targetFieldId\": \"cmg3k7q9e0004s7p4b1z6lc3n\"\n }\n ]\n }\n ]\n }\n ],\n \"mergeFields\": [\n {\n \"key\": \"start_date\",\n \"label\": \"Start date\",\n \"order\": 0,\n \"description\": \"The employee's first day of work.\",\n \"source\": \"SENDER\",\n \"type\": \"DATE\",\n \"options\": [\n \"Full time\",\n \"Part time\"\n ],\n \"defaultValue\": \"2026-10-01\",\n \"isRequired\": true\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://my.flowsign.app/api/v1/templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"name\": \"Employment agreement\",\n \"roles\": [\n {\n \"name\": \"Employee\",\n \"order\": 0,\n \"id\": \"cmg3k2v8a0001s7p4d9x1qz2h\",\n \"actionType\": \"SIGNER\",\n \"deliveryDefault\": \"EMAIL\",\n \"hostRole\": \"SENDER\",\n \"hostUserIds\": [\n \"8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f\"\n ],\n \"hostGroupIds\": [\n \"cmg1hd3x10002v8p9f6r8bt4n\"\n ]\n }\n ],\n \"description\": \"Standard individual employment agreement for new hires.\",\n \"status\": \"DRAFT\",\n \"tags\": [\n \"HR\",\n \"Onboarding\"\n ],\n \"reminderIntervalDays\": 3,\n \"expirationDays\": 30,\n \"expiryWarningDays\": 5,\n \"emailSubject\": \"Your employment agreement with Studio Phoenix Limited\",\n \"emailMessage\": \"Kia ora {{employee_name}}, please review and sign your agreement.\",\n \"signingMode\": \"SEQUENTIAL\",\n \"brandColor\": \"#1a2b3c\",\n \"metadata\": \"<unknown>\",\n \"questions\": [\n {\n \"question\": \"Does the role include a company vehicle?\",\n \"order\": 0,\n \"type\": \"TOGGLE\",\n \"dependsOnQuestionIndex\": 0,\n \"dependsOnOptionIndex\": 0,\n \"options\": [\n {\n \"label\": \"Yes\",\n \"order\": 0,\n \"isDefault\": true,\n \"actions\": [\n {\n \"type\": \"INCLUDE_DOCUMENT\",\n \"targetDocumentId\": \"cmg3k5r1c0003s7p4h2m8tb7k\",\n \"targetFieldId\": \"cmg3k7q9e0004s7p4b1z6lc3n\"\n }\n ]\n }\n ]\n }\n ],\n \"mergeFields\": [\n {\n \"key\": \"start_date\",\n \"label\": \"Start date\",\n \"order\": 0,\n \"description\": \"The employee's first day of work.\",\n \"source\": \"SENDER\",\n \"type\": \"DATE\",\n \"options\": [\n \"Full time\",\n \"Part time\"\n ],\n \"defaultValue\": \"2026-10-01\",\n \"isRequired\": true\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://my.flowsign.app/api/v1/templates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "Employment agreement",
"roles": [
{
"name": "Employee",
"order": 0,
"id": "cmg3k2v8a0001s7p4d9x1qz2h",
"actionType": "SIGNER",
"deliveryDefault": "EMAIL",
"hostRole": "SENDER",
"hostUserIds": [
"8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f"
],
"hostGroupIds": [
"cmg1hd3x10002v8p9f6r8bt4n"
]
}
],
"description": "Standard individual employment agreement for new hires.",
"status": "DRAFT",
"tags": [
"HR",
"Onboarding"
],
"reminderIntervalDays": 3,
"expirationDays": 30,
"expiryWarningDays": 5,
"emailSubject": "Your employment agreement with Studio Phoenix Limited",
"emailMessage": "Kia ora {{employee_name}}, please review and sign your agreement.",
"signingMode": "SEQUENTIAL",
"brandColor": "#1a2b3c",
"metadata": "<unknown>",
"questions": [
{
"question": "Does the role include a company vehicle?",
"order": 0,
"type": "TOGGLE",
"dependsOnQuestionIndex": 0,
"dependsOnOptionIndex": 0,
"options": [
{
"label": "Yes",
"order": 0,
"isDefault": true,
"actions": [
{
"type": "INCLUDE_DOCUMENT",
"targetDocumentId": "cmg3k5r1c0003s7p4h2m8tb7k",
"targetFieldId": "cmg3k7q9e0004s7p4b1z6lc3n"
}
]
}
]
}
],
"mergeFields": [
{
"key": "start_date",
"label": "Start date",
"order": 0,
"description": "The employee's first day of work.",
"source": "SENDER",
"type": "DATE",
"options": [
"Full time",
"Part time"
],
"defaultValue": "2026-10-01",
"isRequired": true
}
]
}'{
"data": {
"id": "kX9dQ2mB7pLw",
"warnings": [
"Question 2 depends on an answer that does not exist and was left unconditional"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}Create a template
Creates a reusable template with roles, optional questions and merge fields. Requires CREATE template access, and answers 402 when the plan’s template cap is reached.
curl --request POST \
--url https://my.flowsign.app/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "Employment agreement",
"roles": [
{
"name": "Employee",
"order": 0,
"id": "cmg3k2v8a0001s7p4d9x1qz2h",
"actionType": "SIGNER",
"deliveryDefault": "EMAIL",
"hostRole": "SENDER",
"hostUserIds": [
"8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f"
],
"hostGroupIds": [
"cmg1hd3x10002v8p9f6r8bt4n"
]
}
],
"description": "Standard individual employment agreement for new hires.",
"status": "DRAFT",
"tags": [
"HR",
"Onboarding"
],
"reminderIntervalDays": 3,
"expirationDays": 30,
"expiryWarningDays": 5,
"emailSubject": "Your employment agreement with Studio Phoenix Limited",
"emailMessage": "Kia ora {{employee_name}}, please review and sign your agreement.",
"signingMode": "SEQUENTIAL",
"brandColor": "#1a2b3c",
"metadata": "<unknown>",
"questions": [
{
"question": "Does the role include a company vehicle?",
"order": 0,
"type": "TOGGLE",
"dependsOnQuestionIndex": 0,
"dependsOnOptionIndex": 0,
"options": [
{
"label": "Yes",
"order": 0,
"isDefault": true,
"actions": [
{
"type": "INCLUDE_DOCUMENT",
"targetDocumentId": "cmg3k5r1c0003s7p4h2m8tb7k",
"targetFieldId": "cmg3k7q9e0004s7p4b1z6lc3n"
}
]
}
]
}
],
"mergeFields": [
{
"key": "start_date",
"label": "Start date",
"order": 0,
"description": "The employee's first day of work.",
"source": "SENDER",
"type": "DATE",
"options": [
"Full time",
"Part time"
],
"defaultValue": "2026-10-01",
"isRequired": true
}
]
}
EOFconst options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Employment agreement',
roles: [
{
name: 'Employee',
order: 0,
id: 'cmg3k2v8a0001s7p4d9x1qz2h',
actionType: 'SIGNER',
deliveryDefault: 'EMAIL',
hostRole: 'SENDER',
hostUserIds: ['8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f'],
hostGroupIds: ['cmg1hd3x10002v8p9f6r8bt4n']
}
],
description: 'Standard individual employment agreement for new hires.',
status: 'DRAFT',
tags: ['HR', 'Onboarding'],
reminderIntervalDays: 3,
expirationDays: 30,
expiryWarningDays: 5,
emailSubject: 'Your employment agreement with Studio Phoenix Limited',
emailMessage: 'Kia ora {{employee_name}}, please review and sign your agreement.',
signingMode: 'SEQUENTIAL',
brandColor: '#1a2b3c',
metadata: '<unknown>',
questions: [
{
question: 'Does the role include a company vehicle?',
order: 0,
type: 'TOGGLE',
dependsOnQuestionIndex: 0,
dependsOnOptionIndex: 0,
options: [
{
label: 'Yes',
order: 0,
isDefault: true,
actions: [
{
type: 'INCLUDE_DOCUMENT',
targetDocumentId: 'cmg3k5r1c0003s7p4h2m8tb7k',
targetFieldId: 'cmg3k7q9e0004s7p4b1z6lc3n'
}
]
}
]
}
],
mergeFields: [
{
key: 'start_date',
label: 'Start date',
order: 0,
description: 'The employee\'s first day of work.',
source: 'SENDER',
type: 'DATE',
options: ['Full time', 'Part time'],
defaultValue: '2026-10-01',
isRequired: true
}
]
})
};
fetch('https://my.flowsign.app/api/v1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Employment agreement',
roles: [
{
name: 'Employee',
order: 0,
id: 'cmg3k2v8a0001s7p4d9x1qz2h',
actionType: 'SIGNER',
deliveryDefault: 'EMAIL',
hostRole: 'SENDER',
hostUserIds: ['8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f'],
hostGroupIds: ['cmg1hd3x10002v8p9f6r8bt4n']
}
],
description: 'Standard individual employment agreement for new hires.',
status: 'DRAFT',
tags: ['HR', 'Onboarding'],
reminderIntervalDays: 3,
expirationDays: 30,
expiryWarningDays: 5,
emailSubject: 'Your employment agreement with Studio Phoenix Limited',
emailMessage: 'Kia ora {{employee_name}}, please review and sign your agreement.',
signingMode: 'SEQUENTIAL',
brandColor: '#1a2b3c',
metadata: '<unknown>',
questions: [
{
question: 'Does the role include a company vehicle?',
order: 0,
type: 'TOGGLE',
dependsOnQuestionIndex: 0,
dependsOnOptionIndex: 0,
options: [
{
label: 'Yes',
order: 0,
isDefault: true,
actions: [
{
type: 'INCLUDE_DOCUMENT',
targetDocumentId: 'cmg3k5r1c0003s7p4h2m8tb7k',
targetFieldId: 'cmg3k7q9e0004s7p4b1z6lc3n'
}
]
}
]
}
],
mergeFields: [
{
key: 'start_date',
label: 'Start date',
order: 0,
description: 'The employee\'s first day of work.',
source: 'SENDER',
type: 'DATE',
options: ['Full time', 'Part time'],
defaultValue: '2026-10-01',
isRequired: true
}
]
})
};
fetch('https://my.flowsign.app/api/v1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://my.flowsign.app/api/v1/templates';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Employment agreement',
roles: [
{
name: 'Employee',
order: 0,
id: 'cmg3k2v8a0001s7p4d9x1qz2h',
actionType: 'SIGNER',
deliveryDefault: 'EMAIL',
hostRole: 'SENDER',
hostUserIds: ['8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f'],
hostGroupIds: ['cmg1hd3x10002v8p9f6r8bt4n']
}
],
description: 'Standard individual employment agreement for new hires.',
status: 'DRAFT',
tags: ['HR', 'Onboarding'],
reminderIntervalDays: 3,
expirationDays: 30,
expiryWarningDays: 5,
emailSubject: 'Your employment agreement with Studio Phoenix Limited',
emailMessage: 'Kia ora {{employee_name}}, please review and sign your agreement.',
signingMode: 'SEQUENTIAL',
brandColor: '#1a2b3c',
metadata: '<unknown>',
questions: [
{
question: 'Does the role include a company vehicle?',
order: 0,
type: 'TOGGLE',
dependsOnQuestionIndex: 0,
dependsOnOptionIndex: 0,
options: [
{
label: 'Yes',
order: 0,
isDefault: true,
actions: [
{
type: 'INCLUDE_DOCUMENT',
targetDocumentId: 'cmg3k5r1c0003s7p4h2m8tb7k',
targetFieldId: 'cmg3k7q9e0004s7p4b1z6lc3n'
}
]
}
]
}
],
mergeFields: [
{
key: 'start_date',
label: 'Start date',
order: 0,
description: 'The employee\'s first day of work.',
source: 'SENDER',
type: 'DATE',
options: ['Full time', 'Part time'],
defaultValue: '2026-10-01',
isRequired: true
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://my.flowsign.app/api/v1/templates"
payload = {
"name": "Employment agreement",
"roles": [
{
"name": "Employee",
"order": 0,
"id": "cmg3k2v8a0001s7p4d9x1qz2h",
"actionType": "SIGNER",
"deliveryDefault": "EMAIL",
"hostRole": "SENDER",
"hostUserIds": ["8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f"],
"hostGroupIds": ["cmg1hd3x10002v8p9f6r8bt4n"]
}
],
"description": "Standard individual employment agreement for new hires.",
"status": "DRAFT",
"tags": ["HR", "Onboarding"],
"reminderIntervalDays": 3,
"expirationDays": 30,
"expiryWarningDays": 5,
"emailSubject": "Your employment agreement with Studio Phoenix Limited",
"emailMessage": "Kia ora {{employee_name}}, please review and sign your agreement.",
"signingMode": "SEQUENTIAL",
"brandColor": "#1a2b3c",
"metadata": "<unknown>",
"questions": [
{
"question": "Does the role include a company vehicle?",
"order": 0,
"type": "TOGGLE",
"dependsOnQuestionIndex": 0,
"dependsOnOptionIndex": 0,
"options": [
{
"label": "Yes",
"order": 0,
"isDefault": True,
"actions": [
{
"type": "INCLUDE_DOCUMENT",
"targetDocumentId": "cmg3k5r1c0003s7p4h2m8tb7k",
"targetFieldId": "cmg3k7q9e0004s7p4b1z6lc3n"
}
]
}
]
}
],
"mergeFields": [
{
"key": "start_date",
"label": "Start date",
"order": 0,
"description": "The employee's first day of work.",
"source": "SENDER",
"type": "DATE",
"options": ["Full time", "Part time"],
"defaultValue": "2026-10-01",
"isRequired": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://my.flowsign.app/api/v1/templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"name\": \"Employment agreement\",\n \"roles\": [\n {\n \"name\": \"Employee\",\n \"order\": 0,\n \"id\": \"cmg3k2v8a0001s7p4d9x1qz2h\",\n \"actionType\": \"SIGNER\",\n \"deliveryDefault\": \"EMAIL\",\n \"hostRole\": \"SENDER\",\n \"hostUserIds\": [\n \"8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f\"\n ],\n \"hostGroupIds\": [\n \"cmg1hd3x10002v8p9f6r8bt4n\"\n ]\n }\n ],\n \"description\": \"Standard individual employment agreement for new hires.\",\n \"status\": \"DRAFT\",\n \"tags\": [\n \"HR\",\n \"Onboarding\"\n ],\n \"reminderIntervalDays\": 3,\n \"expirationDays\": 30,\n \"expiryWarningDays\": 5,\n \"emailSubject\": \"Your employment agreement with Studio Phoenix Limited\",\n \"emailMessage\": \"Kia ora {{employee_name}}, please review and sign your agreement.\",\n \"signingMode\": \"SEQUENTIAL\",\n \"brandColor\": \"#1a2b3c\",\n \"metadata\": \"<unknown>\",\n \"questions\": [\n {\n \"question\": \"Does the role include a company vehicle?\",\n \"order\": 0,\n \"type\": \"TOGGLE\",\n \"dependsOnQuestionIndex\": 0,\n \"dependsOnOptionIndex\": 0,\n \"options\": [\n {\n \"label\": \"Yes\",\n \"order\": 0,\n \"isDefault\": true,\n \"actions\": [\n {\n \"type\": \"INCLUDE_DOCUMENT\",\n \"targetDocumentId\": \"cmg3k5r1c0003s7p4h2m8tb7k\",\n \"targetFieldId\": \"cmg3k7q9e0004s7p4b1z6lc3n\"\n }\n ]\n }\n ]\n }\n ],\n \"mergeFields\": [\n {\n \"key\": \"start_date\",\n \"label\": \"Start date\",\n \"order\": 0,\n \"description\": \"The employee's first day of work.\",\n \"source\": \"SENDER\",\n \"type\": \"DATE\",\n \"options\": [\n \"Full time\",\n \"Part time\"\n ],\n \"defaultValue\": \"2026-10-01\",\n \"isRequired\": true\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://my.flowsign.app/api/v1/templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"name\": \"Employment agreement\",\n \"roles\": [\n {\n \"name\": \"Employee\",\n \"order\": 0,\n \"id\": \"cmg3k2v8a0001s7p4d9x1qz2h\",\n \"actionType\": \"SIGNER\",\n \"deliveryDefault\": \"EMAIL\",\n \"hostRole\": \"SENDER\",\n \"hostUserIds\": [\n \"8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f\"\n ],\n \"hostGroupIds\": [\n \"cmg1hd3x10002v8p9f6r8bt4n\"\n ]\n }\n ],\n \"description\": \"Standard individual employment agreement for new hires.\",\n \"status\": \"DRAFT\",\n \"tags\": [\n \"HR\",\n \"Onboarding\"\n ],\n \"reminderIntervalDays\": 3,\n \"expirationDays\": 30,\n \"expiryWarningDays\": 5,\n \"emailSubject\": \"Your employment agreement with Studio Phoenix Limited\",\n \"emailMessage\": \"Kia ora {{employee_name}}, please review and sign your agreement.\",\n \"signingMode\": \"SEQUENTIAL\",\n \"brandColor\": \"#1a2b3c\",\n \"metadata\": \"<unknown>\",\n \"questions\": [\n {\n \"question\": \"Does the role include a company vehicle?\",\n \"order\": 0,\n \"type\": \"TOGGLE\",\n \"dependsOnQuestionIndex\": 0,\n \"dependsOnOptionIndex\": 0,\n \"options\": [\n {\n \"label\": \"Yes\",\n \"order\": 0,\n \"isDefault\": true,\n \"actions\": [\n {\n \"type\": \"INCLUDE_DOCUMENT\",\n \"targetDocumentId\": \"cmg3k5r1c0003s7p4h2m8tb7k\",\n \"targetFieldId\": \"cmg3k7q9e0004s7p4b1z6lc3n\"\n }\n ]\n }\n ]\n }\n ],\n \"mergeFields\": [\n {\n \"key\": \"start_date\",\n \"label\": \"Start date\",\n \"order\": 0,\n \"description\": \"The employee's first day of work.\",\n \"source\": \"SENDER\",\n \"type\": \"DATE\",\n \"options\": [\n \"Full time\",\n \"Part time\"\n ],\n \"defaultValue\": \"2026-10-01\",\n \"isRequired\": true\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://my.flowsign.app/api/v1/templates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "Employment agreement",
"roles": [
{
"name": "Employee",
"order": 0,
"id": "cmg3k2v8a0001s7p4d9x1qz2h",
"actionType": "SIGNER",
"deliveryDefault": "EMAIL",
"hostRole": "SENDER",
"hostUserIds": [
"8f1c2a4e-6b3d-4c9a-9e7f-2d5b1a3c4e6f"
],
"hostGroupIds": [
"cmg1hd3x10002v8p9f6r8bt4n"
]
}
],
"description": "Standard individual employment agreement for new hires.",
"status": "DRAFT",
"tags": [
"HR",
"Onboarding"
],
"reminderIntervalDays": 3,
"expirationDays": 30,
"expiryWarningDays": 5,
"emailSubject": "Your employment agreement with Studio Phoenix Limited",
"emailMessage": "Kia ora {{employee_name}}, please review and sign your agreement.",
"signingMode": "SEQUENTIAL",
"brandColor": "#1a2b3c",
"metadata": "<unknown>",
"questions": [
{
"question": "Does the role include a company vehicle?",
"order": 0,
"type": "TOGGLE",
"dependsOnQuestionIndex": 0,
"dependsOnOptionIndex": 0,
"options": [
{
"label": "Yes",
"order": 0,
"isDefault": true,
"actions": [
{
"type": "INCLUDE_DOCUMENT",
"targetDocumentId": "cmg3k5r1c0003s7p4h2m8tb7k",
"targetFieldId": "cmg3k7q9e0004s7p4b1z6lc3n"
}
]
}
]
}
],
"mergeFields": [
{
"key": "start_date",
"label": "Start date",
"order": 0,
"description": "The employee's first day of work.",
"source": "SENDER",
"type": "DATE",
"options": [
"Full time",
"Part time"
],
"defaultValue": "2026-10-01",
"isRequired": true
}
]
}'{
"data": {
"id": "kX9dQ2mB7pLw",
"warnings": [
"Question 2 depends on an answer that does not exist and was left unconditional"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The workspace the key was issued for, as returned by GET /api/v1/workspaces. Optional: omitting it acts in the key's workspace, and any other id is rejected with 401.
Body
The template's name.
1"Employment agreement"
The named slots recipients fill at launch. At least one, at most 100.
1 - 100 elementsShow child attributes
Show child attributes
Free-text description of what the template is for.
"Standard individual employment agreement for new hires."
Initial lifecycle state. Defaults to DRAFT. ACTIVE also stamps the publish time; ARCHIVED stamps the archive time. ACTIVE is refused with 400 when signingMode is WORKFLOW and the questions break a workflow rule; save as DRAFT to keep them and read the problems from warnings.
DRAFT, ACTIVE, ARCHIVED "DRAFT"
Organisation tags to put on the template. A tag that does not exist yet is created.
["HR", "Onboarding"]
Days between automatic reminders to each recipient who hasn't finished, counted from their invitation. Null or absent sends none.
x >= 13
Days the package stays open for signing, counted from when it is sent. Null or absent means it never expires.
x >= 130
Days before expiry at which recipients who haven't finished are warned. MUST be fewer than expirationDays.
x >= 15
Subject of the invitation email. {{key}} placeholders are filled from the package's merge field values.
"Your employment agreement with Studio Phoenix Limited"
Body of the invitation email. {{key}} placeholders are filled from the package's merge field values.
"Kia ora {{employee_name}}, please review and sign your agreement."
How recipients are walked through signing. PARALLEL (the default) invites every role at once; SEQUENTIAL invites one role at a time in order; WORKFLOW follows the template's workflow, asking recipients its questions as they open the package.
PARALLEL, SEQUENTIAL, WORKFLOW "SEQUENTIAL"
Accent colour for the signing experience and emails, as a six-digit hex code. Needs a plan with custom branding, otherwise 402. Null clears it.
^#[0-9a-fA-F]{6}$"#1a2b3c"
Not accepted. A template's default custom field values are set in the app; sending this is refused with 400 and nothing is saved.
Conditional questions the sender answers at launch. Each answer's actions decide which documents the package includes. Questions reference each other by position in this array.
Show child attributes
Show child attributes
Values the template collects and merges into its documents and emails. Blank at launch means the field's default.
Show child attributes
Show child attributes
Response
Success
Show child attributes
Show child attributes
Was this page helpful?

