Update a tag
put/api/v1/tags/{tagId}Update an existing tag by providing the tag ID and the updated information including name, color code, and associated module IDs. This endpoint allows you to modify tag properties while maintaining its associations across different modules.
Code snippet
curl -X 'PUT' \
'http://localhost:5080/api/v1/tags/1234' \
-H 'accept: text/plain; x-api-version=1.0' \
-H 'x-api-key: {your API key}' \
-H 'Content-Type: application/json-patch+json; x-api-version=1.0' \
-d '{
"data": {
"name": "HighPriority",
"colorCode": "#F97066",
"moduleIds": [1, 2, 3]
}
}'
var client = new RestClient("http://localhost:5080/api/");
var request = new RestRequest("v1/tags/{tagId}", Method.PUT);
request.AddUrlSegment("tagId", "1234");
request.AddJsonBody(new {
data = new {
name = "HighPriority",
colorCode = "#F97066",
moduleIds = new[] { 1, 2, 3 }
}
});
request.AddHeader("x-api-key", "your_api_key");
request.AddHeader("accept", "application/json");
RestResponse response = client.Execute(request);
Path parameters
| tagIdintRequired | Unique identifier of the tag to be updated. |
Request body
| namestringRequired | Updated name for the tag. Must be unique across all tags. |
| colorCodestringRequired | Updated hexadecimal color code for visual representation (e.g., #F97066). |
| moduleIdsarray | Updated list of module IDs to associate with this tag. |
Example response
200 Success
{
"message": "Tag updated successfully.",
"data": {
"recordId": 1234
}
}