Skip to content

Create tag

Endpoint

POST /organizations/{org_id}/tags

Creates a new tag in the specified organization.

Request

Replace {org_id} with your Organization ID.

Headers

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

Body (JSON)

FieldTypeRequiredDescription
titlestringYesTag name. Must be unique within the org. Can’t exceed 30 characters.
colorstringNoHex color code, exactly 7 characters (e.g., #3498db).
{
"title": "High Priority",
"color": "#e74c3c"
}

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/tags`;
const tagData = {
title: "JS Created Tag", // Required
color: "#9b59b6" // Optional: Purple
};
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(tagData)
})
.then(response => {
return response.json().then(data => {
if (!response.ok) {
console.error("Failed to create tag:", data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data;
});
})
.then(data => {
console.log('Successfully created tag:');
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error('Error creating tag:', error.message);
});

Response

You’ll get a 201 Created status with a JSON object containing the new tag’s details.

{
"data": {
"id": "new_tag_id_xyz",
"title": "Python Tag",
"color": "#f1c40f",
"auto_generated": false,
"created_at": "2024-03-15T10:30:00Z",
"deleted_at": null
}
}

Save the returned id to update or delete this tag later.


Tags > Update tag

Modify an existing tag’s title (up to 30 characters, unique per organization) or hex color code…

Groups > Create group

Create a new group in your Tallyfy organization via a POST request with a name, description, and…

Tags > Get tag

Retrieve a specific tag by its ID using a GET request to…