Skip to content

Create a template

This endpoint allows you to create a new template (also known as a blueprint) within a specified organization.

Endpoint

POST https://go.tallyfy.com/api/organizations/{org}/checklists

Path Parameters

ParameterTypeDescription
orgstringRequired. The ID of the organization.

Body Parameters

The request body should be a JSON object containing the desired properties for the new template.

ParameterTypeDescription
titlestringRequired. The title of the template.
summarystringA brief summary or description of the template.
owner_idintegerThe ID of the member who will own the template.
webhookstringA URL to send webhook notifications to for template events.
explanation_videostringURL of a video explaining the template.
starredbooleanWhether the template should be starred by default.
guidancestringDetailed guidance or instructions for using the template.
iconstringName of an icon to associate with the template.
is_publicbooleanWhether the template should be publicly accessible in the library.
is_featuredbooleanWhether the template should be featured in the public library.
public_coverstringURL for a cover image for the public library listing.
typestringThe type of template (e.g., procedure, form, document).
default_process_name_formatstringA format string for automatically naming processes launched from this template (uses variables).
is_public_kickoffbooleanWhether the kick-off form for this template is public.
auto_namingbooleanEnable or disable automatic naming of processes launched from this template based on the format string.
usersarrayAn array of member IDs who have default access permissions to this template.
groupsarrayAn array of group IDs that have default access permissions to this template.
prerunarrayAn array of objects defining kick-off form fields for the template. See swagger.json for structure.
folderize_processbooleanAutomatically create a folder for processes launched from this template.
tag_processbooleanAutomatically tag processes launched from this template.
allow_launcher_change_namebooleanWhether the user launching a process can override the default process name.
ko_form_blueprint_idstringID of another template to use as the kick-off form.
default_folderstringThe ID of the folder where processes launched from this template should be placed by default.
folder_changeable_by_launcherbooleanWhether the user launching a process can change the default folder.
kickoff_sharing_user_idintegerThe ID of the user whose sharing settings should be used for the public kick-off form.

Code Samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID'; // Replace with actual Org ID
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/checklists`;
const templateData = {
title: "New JS API Template", // Required
summary: "Template created via Fetch API.",
owner_id: 12345, // Optional: Specify owner User ID
type: "procedure" // Or "form", "document"
// Add other optional fields like prerun, users, groups, etc. as needed
};
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
headers.append('Content-Type', 'application/json');
fetch(apiUrl, {
method: 'POST',
headers: headers,
body: JSON.stringify(templateData)
})
.then(response => {
return response.json().then(data => { // Attempt to parse JSON regardless of status
if (!response.ok) {
console.error("Failed to create template:", data);
throw new Error(`HTTP error! status: ${response.status}`);
}
// Expect 200 OK or 201 Created
console.log(`Template creation initiated. Status: ${response.status}`);
return data; // Pass successful data along
});
})
.then(data => {
console.log('Successfully created template:');
console.log(JSON.stringify(data, null, 2));
// Use data.data.id to get the new template ID
})
.catch(error => {
console.error('Error creating template:', error.message);
});

Example Response (200 OK)

{
"data": {
"id": "b3d9c1a8e7f6...", // Unique ID of the newly created template
"title": "New Client Onboarding Template",
"summary": "Standard procedure for onboarding new clients.",
"starred": false,
"webhook": null,
"explanation_video": null,
"guidance": null,
"icon": null,
"alias": "new-client-onboarding-template-b3d9c1", // Auto-generated alias
"prerun": [], // Empty array as no kick-off fields were defined
"automated_actions": [],
"created_by": 123, // ID of the user who made the API call
"owner_id": 12345,
"started_processes": 0,
"kickoff_title": null,
"kickoff_description": null,
"created_at": "2023-10-27T10:00:00.000Z",
"last_updated": "2023-10-27T10:00:00.000Z",
"archived_at": null,
"is_public": false,
"is_featured": false,
"users": [],
"groups": [],
"public_cover": null,
"industry_tags": [],
"topic_tags": [],
"type": "procedure",
"default_process_name_format": null,
"is_public_kickoff": false,
"dual_version_enabled": false,
"is_published_state": false, // Templates are created in draft state
"auto_naming": false,
"last_updated_by": 123,
"linked_tasks": [],
"folderize_process": false,
"tag_process": false,
"allow_launcher_change_name": false,
"is_pinned": false,
"ko_form_blueprint_id": null,
"default_folder": null,
"folder_changeable_by_launcher": false,
"kickoff_sharing_user_id": null
// ... other template properties with default values
}
}

Templates > List templates

An API endpoint documentation for retrieving process templates from organizations with code examples in JavaScript Python Java and Go along with details about request headers query parameters and response format.

Processes > Launch process

A comprehensive REST API endpoint that enables launching new process instances by sending a POST request with required template ID and name along with optional configurations for pre-filling fields and overriding task properties.