Skip to content

Update tag

Endpoint

PUT /organizations/{org_id}/tags/{tag_id}

This endpoint updates the properties (like title or color) of an existing tag.

Request

Replace {org_id} with your Organization ID and {tag_id} with the ID of the tag 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 tag properties to modify.

Refer to the #definitions/createTagInput schema (often similar to update). Key fields:

  • title (string): New title for the tag.
  • color (string): New hex color code.

Example Body:

{
"title": "High Priority (Red)",
"color": "#ff0000"
}

Code Samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const tagId = 'TAG_ID_TO_UPDATE';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/tags/${tagId}`;
const updateData = {
title: "JS Updated Tag Name",
color: "#1abc9c" // Turquoise
};
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',
headers: headers,
body: JSON.stringify(updateData)
})
.then(response => {
return response.json().then(data => {
if (!response.ok) {
console.error(`Failed to update tag ${tagId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data;
});
})
.then(data => {
console.log(`Successfully updated tag ${tagId}:`);
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error updating tag ${tagId}:`, error.message);
});

Response

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

{
"data": {
"id": "TAG_ID_TO_UPDATE",
"title": "Python Updated Tag", // Updated title
"color": "#34495e", // Updated color
// ... other tag properties ...
"updated_at": "2024-05-21T20:30:00Z" // Reflects update time
}
}

If the tag ID is not found or the payload is invalid, an error status code (404, 400, 422) will be returned.


Tags > Create tag

A POST endpoint that creates organization tags with specified title and color properties through multiple programming language examples including JavaScript Python Java and Go.

Members > Update member

A PUT endpoint that modifies organization member profiles by accepting JSON data containing updated fields and returning the complete updated profile upon success.

Groups > Update group

The PUT endpoint allows updating a group’s details including name description members and guests while returning the modified group data upon successful completion with appropriate status codes.

Tags > Get tag

The GET endpoint enables retrieval of specific tag details through unique IDs with optional related data inclusion and returns a JSON response containing tag information along with error handling for invalid requests or permissions.