Create a template
curl --request POST \
--url https://my.flowsign.app/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"roles": [
{
"name": "<string>",
"order": 1
}
],
"description": "<string>",
"tags": [
"<string>"
],
"reminderDaysAfterSend": 1,
"expirationDays": 1,
"expiryWarningDays": 1,
"emailSubject": "<string>",
"emailMessage": "<string>",
"lockDocuments": true,
"lockRoles": true,
"lockFields": true,
"brandColor": "<string>",
"questions": [
{
"question": "<string>",
"order": 1,
"dependsOnQuestionIndex": 1,
"dependsOnOptionIndex": 1,
"options": [
{
"label": "<string>",
"order": 1,
"isDefault": true,
"actions": [
{
"targetDocumentId": "<string>",
"targetFieldId": "<string>"
}
],
"regionEffects": [
{
"regionId": "<string>",
"variantId": "<string>"
}
],
"variableBindings": [
{
"mergeFieldKey": "<string>",
"value": "<string>"
}
]
}
]
}
],
"mergeFields": [
{
"key": "<string>",
"label": "<string>",
"order": 1,
"description": "<string>",
"source": "<string>",
"defaultValue": "<string>",
"isRequired": true
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
roles: [{name: '<string>', order: 1}],
description: '<string>',
tags: ['<string>'],
reminderDaysAfterSend: 1,
expirationDays: 1,
expiryWarningDays: 1,
emailSubject: '<string>',
emailMessage: '<string>',
lockDocuments: true,
lockRoles: true,
lockFields: true,
brandColor: '<string>',
questions: [
{
question: '<string>',
order: 1,
dependsOnQuestionIndex: 1,
dependsOnOptionIndex: 1,
options: [
{
label: '<string>',
order: 1,
isDefault: true,
actions: [{targetDocumentId: '<string>', targetFieldId: '<string>'}],
regionEffects: [{regionId: '<string>', variantId: '<string>'}],
variableBindings: [{mergeFieldKey: '<string>', value: '<string>'}]
}
]
}
],
mergeFields: [
{
key: '<string>',
label: '<string>',
order: 1,
description: '<string>',
source: '<string>',
defaultValue: '<string>',
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));import requests
url = "https://my.flowsign.app/api/v1/templates"
payload = {
"name": "<string>",
"roles": [
{
"name": "<string>",
"order": 1
}
],
"description": "<string>",
"tags": ["<string>"],
"reminderDaysAfterSend": 1,
"expirationDays": 1,
"expiryWarningDays": 1,
"emailSubject": "<string>",
"emailMessage": "<string>",
"lockDocuments": True,
"lockRoles": True,
"lockFields": True,
"brandColor": "<string>",
"questions": [
{
"question": "<string>",
"order": 1,
"dependsOnQuestionIndex": 1,
"dependsOnOptionIndex": 1,
"options": [
{
"label": "<string>",
"order": 1,
"isDefault": True,
"actions": [
{
"targetDocumentId": "<string>",
"targetFieldId": "<string>"
}
],
"regionEffects": [
{
"regionId": "<string>",
"variantId": "<string>"
}
],
"variableBindings": [
{
"mergeFieldKey": "<string>",
"value": "<string>"
}
]
}
]
}
],
"mergeFields": [
{
"key": "<string>",
"label": "<string>",
"order": 1,
"description": "<string>",
"source": "<string>",
"defaultValue": "<string>",
"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\": \"<string>\",\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"order\": 1\n }\n ],\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"reminderDaysAfterSend\": 1,\n \"expirationDays\": 1,\n \"expiryWarningDays\": 1,\n \"emailSubject\": \"<string>\",\n \"emailMessage\": \"<string>\",\n \"lockDocuments\": true,\n \"lockRoles\": true,\n \"lockFields\": true,\n \"brandColor\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"order\": 1,\n \"dependsOnQuestionIndex\": 1,\n \"dependsOnOptionIndex\": 1,\n \"options\": [\n {\n \"label\": \"<string>\",\n \"order\": 1,\n \"isDefault\": true,\n \"actions\": [\n {\n \"targetDocumentId\": \"<string>\",\n \"targetFieldId\": \"<string>\"\n }\n ],\n \"regionEffects\": [\n {\n \"regionId\": \"<string>\",\n \"variantId\": \"<string>\"\n }\n ],\n \"variableBindings\": [\n {\n \"mergeFieldKey\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n }\n ],\n \"mergeFields\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"order\": 1,\n \"description\": \"<string>\",\n \"source\": \"<string>\",\n \"defaultValue\": \"<string>\",\n \"isRequired\": true\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {
"templateId": "<string>",
"warnings": [
"<string>"
]
}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}Templates
Create a template
Creates a reusable template with roles, optional conditional questions, and merge fields. Documents and fields are added through the editor UI; the API doesn’t upload PDFs.
POST
/
api
/
v1
/
templates
Create a template
curl --request POST \
--url https://my.flowsign.app/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"roles": [
{
"name": "<string>",
"order": 1
}
],
"description": "<string>",
"tags": [
"<string>"
],
"reminderDaysAfterSend": 1,
"expirationDays": 1,
"expiryWarningDays": 1,
"emailSubject": "<string>",
"emailMessage": "<string>",
"lockDocuments": true,
"lockRoles": true,
"lockFields": true,
"brandColor": "<string>",
"questions": [
{
"question": "<string>",
"order": 1,
"dependsOnQuestionIndex": 1,
"dependsOnOptionIndex": 1,
"options": [
{
"label": "<string>",
"order": 1,
"isDefault": true,
"actions": [
{
"targetDocumentId": "<string>",
"targetFieldId": "<string>"
}
],
"regionEffects": [
{
"regionId": "<string>",
"variantId": "<string>"
}
],
"variableBindings": [
{
"mergeFieldKey": "<string>",
"value": "<string>"
}
]
}
]
}
],
"mergeFields": [
{
"key": "<string>",
"label": "<string>",
"order": 1,
"description": "<string>",
"source": "<string>",
"defaultValue": "<string>",
"isRequired": true
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
roles: [{name: '<string>', order: 1}],
description: '<string>',
tags: ['<string>'],
reminderDaysAfterSend: 1,
expirationDays: 1,
expiryWarningDays: 1,
emailSubject: '<string>',
emailMessage: '<string>',
lockDocuments: true,
lockRoles: true,
lockFields: true,
brandColor: '<string>',
questions: [
{
question: '<string>',
order: 1,
dependsOnQuestionIndex: 1,
dependsOnOptionIndex: 1,
options: [
{
label: '<string>',
order: 1,
isDefault: true,
actions: [{targetDocumentId: '<string>', targetFieldId: '<string>'}],
regionEffects: [{regionId: '<string>', variantId: '<string>'}],
variableBindings: [{mergeFieldKey: '<string>', value: '<string>'}]
}
]
}
],
mergeFields: [
{
key: '<string>',
label: '<string>',
order: 1,
description: '<string>',
source: '<string>',
defaultValue: '<string>',
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));import requests
url = "https://my.flowsign.app/api/v1/templates"
payload = {
"name": "<string>",
"roles": [
{
"name": "<string>",
"order": 1
}
],
"description": "<string>",
"tags": ["<string>"],
"reminderDaysAfterSend": 1,
"expirationDays": 1,
"expiryWarningDays": 1,
"emailSubject": "<string>",
"emailMessage": "<string>",
"lockDocuments": True,
"lockRoles": True,
"lockFields": True,
"brandColor": "<string>",
"questions": [
{
"question": "<string>",
"order": 1,
"dependsOnQuestionIndex": 1,
"dependsOnOptionIndex": 1,
"options": [
{
"label": "<string>",
"order": 1,
"isDefault": True,
"actions": [
{
"targetDocumentId": "<string>",
"targetFieldId": "<string>"
}
],
"regionEffects": [
{
"regionId": "<string>",
"variantId": "<string>"
}
],
"variableBindings": [
{
"mergeFieldKey": "<string>",
"value": "<string>"
}
]
}
]
}
],
"mergeFields": [
{
"key": "<string>",
"label": "<string>",
"order": 1,
"description": "<string>",
"source": "<string>",
"defaultValue": "<string>",
"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\": \"<string>\",\n \"roles\": [\n {\n \"name\": \"<string>\",\n \"order\": 1\n }\n ],\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"reminderDaysAfterSend\": 1,\n \"expirationDays\": 1,\n \"expiryWarningDays\": 1,\n \"emailSubject\": \"<string>\",\n \"emailMessage\": \"<string>\",\n \"lockDocuments\": true,\n \"lockRoles\": true,\n \"lockFields\": true,\n \"brandColor\": \"<string>\",\n \"questions\": [\n {\n \"question\": \"<string>\",\n \"order\": 1,\n \"dependsOnQuestionIndex\": 1,\n \"dependsOnOptionIndex\": 1,\n \"options\": [\n {\n \"label\": \"<string>\",\n \"order\": 1,\n \"isDefault\": true,\n \"actions\": [\n {\n \"targetDocumentId\": \"<string>\",\n \"targetFieldId\": \"<string>\"\n }\n ],\n \"regionEffects\": [\n {\n \"regionId\": \"<string>\",\n \"variantId\": \"<string>\"\n }\n ],\n \"variableBindings\": [\n {\n \"mergeFieldKey\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n }\n ],\n \"mergeFields\": [\n {\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"order\": 1,\n \"description\": \"<string>\",\n \"source\": \"<string>\",\n \"defaultValue\": \"<string>\",\n \"isRequired\": true\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {
"templateId": "<string>",
"warnings": [
"<string>"
]
}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The workspace to act in, from GET /api/v1/workspaces. Omit to act in the organisation's default workspace. A workspace the key's user cannot act in is treated as omitted.
Body
application/json
Minimum string length:
1Minimum array length:
1Show child attributes
Show child attributes
Available options:
DRAFT, ACTIVE, ARCHIVED Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Available options:
PARALLEL, SEQUENTIAL, WORKFLOW Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Success
Show child attributes
Show child attributes
Was this page helpful?

