Skip to content

Update template

Endpoint

PUT /organizations/{org_id}/checklists/{checklist_id}

This endpoint allows you to update the properties of an existing process template (blueprint) identified by its ID.

Request

Replace {org_id} with your Organization ID and {checklist_id} with the ID of the template you want to update.

Headers

  • Authorization: Bearer {your_access_token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient
  • Content-Type: application/json

Body (JSON)

The request body requires a JSON object containing the template properties you wish to modify. You only need to include the fields you want to change.

Refer to the #definitions/createChecklistInput schema in the Swagger specification for the full list of updatable properties (it’s often the same or similar to the creation schema). Common fields to update include:

  • title (string)
  • summary (string)
  • owner_id (integer)
  • webhook (string)
  • guidance (string)
  • starred (boolean)
  • type (string)
  • users (array of integers) - Note: This usually replaces the existing list.
  • groups (array of strings) - Note: This usually replaces the existing list.

Example Body (Updating title and summary):

{
"title": "Updated Template Name",
"summary": "This template has been updated via the API."
}

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const checklistId = 'TEMPLATE_ID_TO_UPDATE';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/checklists/${checklistId}`;
const updateData = {
title: "Updated via JS Fetch",
starred: true, // Example: Star this template
// summary: "New summary..."
// Note: Updating 'users' or 'groups' replaces the entire list.
// users: [1001, 1005]
};
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: 'PUT', // Use PUT for updates
headers: headers,
body: JSON.stringify(updateData)
})
.then(response => {
return response.json().then(data => { // Attempt to parse JSON regardless of status
if (!response.ok) {
console.error(`Failed to update template ${checklistId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data; // Pass successful data along
});
})
.then(data => {
console.log(`Successfully updated template ${checklistId}:`);
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error updating template ${checklistId}:`, error.message);
});

Response

A successful request returns a 200 OK status code and a JSON object containing the full details of the template after the update.

{
"data": {
"id": "TEMPLATE_ID_TO_UPDATE",
"title": "Updated via JS Fetch", // Updated title
"summary": "This template has been updated via the API.", // Original or updated summary
"starred": true, // Updated value
// ... other template properties reflecting the current state ...
"last_updated": "2024-05-20T12:30:00.000Z" // Timestamp reflects the update
}
}

If the template ID is not found, you lack permission, or the request body is invalid, you will receive an appropriate error status code (404, 403, 400, 422).


Processes > Update process

A PUT endpoint that allows updating properties of an existing process run including name summary owner tags folders and form field values while returning the complete updated process data upon success.

Templates > Create a template

A comprehensive POST endpoint for creating organization templates with customizable properties including title summary owner permissions and various configuration options for process management.

Templates > Get template

An API endpoint that retrieves detailed information about a specific process template using a GET request with optional parameters to include related data such as steps tags and folder hierarchies.