Skip to content

Update tag

Endpoint

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

Updates the title or color of an existing tag.

Request

Replace {org_id} with your organization ID and {tag_id} with the tag ID to update.

Headers

HeaderValue
AuthorizationBearer {your_access_token}
Acceptapplication/json
X-Tallyfy-ClientAPIClient
Content-Typeapplication/json

Body (JSON)

Send a JSON object with the fields you want to change.

FieldTypeRequiredDescription
titlestringYesTag name (max 30 characters, must be unique within your organization)
colorstringNoHex color code (e.g. #ff0000)

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 with the updated tag.

{
"data": {
"id": "TAG_ID_TO_UPDATE",
"title": "Python Updated Tag",
"color": "#34495e",
"auto_generated": false,
"created_at": "2024-01-15T10:30:00.000Z",
"deleted_at": null
}
}

If the tag ID isn’t found or the payload fails validation, expect a 404, 422, or 400 error.


Tags > Create tag

Tallyfy’s API lets you create organization tags by sending a POST request to the tags endpoint…

Groups > Update group

Tallyfy’s PUT endpoint for groups lets you rename a group or change its description and fully…