Tags

List All Tags

GET /tags.json

Lists all tags on your teamwork.com account 

Request

GET /tags.json

Response

{
	"tags": [
		{
			"name": "api",
			"id": "5",
			"color": "#b1da34"
		}
		:
		:
	]
}


Get a single tag

GET /tags/{tag_id}.json

This returns all details about an individual tag. 

Request

GET /tags/#{tag_id}.json

Response

{
    "tag": {
        "id": "999",
        "name": "Website",
        "color": "#ff0000"
    },
    "STATUS": "OK"
}


Create a single tag

POST /tags.json

This command will create a single tag.

  • color must be valid tag color

Request

{
  "tag": {
    "name": "API",
    "color": "#color"
  }
}

#d84640,#f78234,#f4bd38,#b1da34,#53c944,#37ced0,#2f8de4,#9b7cdb,#f47fbe,#a6a6a6,#4d4d4d,#9e6957

Response

Returns HTTP status code 200 on success.


Update a single tag

PUT /tags/{tag_id}.json

This command will update a single tag.

  • color must be valid tag color

Request

{
  "tag": {
    "name": "API",
    "color": "#color"
  }
}

#d84640,#f78234,#f4bd38,#b1da34,#53c944,#37ced0,#2f8de4,#9b7cdb,#f47fbe,#a6a6a6,#4d4d4d,#9e6957

Response

Returns HTTP status code 200 on success.


Delete a single tag

DELETE /tags/{tag_id}.json

Deletes the tag specified by tag_id.

Response

Returns HTTP status code 200 on success.


List All Tags For A Resource

GET /{resource}/{id}/tags.json

Lists all tags for a given resource

Resources

  • projects
  • tasklists
  • tasks
  • milestones
  • messages
  • timelogs
  • files
  • users
  • companys
  • notebooks
  • links

Request

GET /{resource}/{id}/tags.json

Response

{
	"tags": [
		{
			"name": "api",
			"id": "5",
			"color": "#b1da34"
		}
		:
		:
	]
}


Update Tags On A Resource

PUT /{resource}/{id}/tags.json

Updates the tags for a given resource

Resources

  • projects
  • tasklists
  • tasks
  • milestones
  • messages
  • timelogs
  • files
  • users
  • companys
  • notebooks
  • links

Optional Parameters

  • replaceExistingTags (boolean - default=false) - Replace any existing tags with the tags sent in content
  • removeProvidedTags (boolean - default=false) - Don't add tags, just remove any tags sent in content

Request (add tags)

{
	"tags" : {
		"content" : "tag1,tag2,tag3"
	}	
}

Request (update tags, replacing any existing tags)

{
    "tags":{
        "content":"NewTag"
    },
    "replaceExistingTags":"true"
}

or, the following is also supported

{
    "tags":{
        "content":"NewTag",
        "replaceExistingTags":"true"
    }
}

Response

Returns HTTP status code 200 on success.