Skip to content

Archive tag

Endpoint

DELETE /organizations/{org_id}/tags/{tag_id}

This endpoint archives (soft deletes) an existing tag. Archived tags are generally hidden but not permanently removed.

Request

Replace {org_id} with your Organization ID and {tag_id} with the ID of the tag to archive.

Headers

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

Body

No request body is needed for this DELETE request.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const tagId = 'TAG_ID_TO_ARCHIVE';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/tags/${tagId}`;
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, {
method: 'DELETE', // DELETE archives the tag
headers: headers
})
.then(response => {
return response.json().then(data => { // Attempt to parse JSON regardless of status
if (!response.ok) { // Expect 200 OK on success
console.error(`Failed to archive tag ${tagId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
console.log(`Successfully archived tag ${tagId}. Status: ${response.status}`);
return data; // Archive usually returns the updated tag object
});
})
.then(data => {
console.log('Archived tag details:');
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error archiving tag ${tagId}:`, error.message);
});

Response

A successful archive request typically returns a 200 OK status code. The response body usually contains the details of the archived tag, now including a deleted_at timestamp.

{
"data": {
"id": "TAG_ID_TO_ARCHIVE",
"title": "Old Tag Name",
"color": "#cccccc",
// ... other tag properties ...
"deleted_at": "2024-05-21T21:00:00Z" // Timestamp indicates archival
}
}

If the tag ID is not found, an error will be returned.


Tasks > Archive task

A DELETE endpoint that archives standalone tasks by hiding them from default views while preserving data for potential future restoration through authenticated API requests and returns 200 or 204 status codes upon success.

Templates > Archive or delete template

The API supports template removal through archiving which retains data and permanent deletion which irreversibly removes all template information and its associated data.

Processes > Archive process

A DELETE endpoint archives process instances by hiding them from default views while retaining data for future restoration through authenticated API requests requiring organization and run IDs.

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.