Data Reference

The following sections describe the different data types used by the Teamwork Projects API.


Account

{
  "account": {
    "requirehttps": false,
    "time-tracking-enabled": true,
    "name": "Teamwork Account Name",
    "datesignedup": "2013-03-05T00:00:00Z",
    "companyname": "Owner Company Name",
    "ssl-enabled": true,
    "created-at": "2011-08-22T12:57:00Z",
    "cacheUUID": "C14A34C3-D5AE-86A3-B9A88A5377D2CD79",
    "account-holder-id": "1",
    "logo": "http://www.someteamworkurl.com/images/349C6BDFA9EA4F814B6822C2F8C13A61%2Ejpg",
    "id": "1",
    "URL": "http://sampleaccount.teamwork.com/",
    "email-notification-enabled": true,
    "companyid": "1",
    "lang": "EN",
    "code": "teamworksitecode"
  }
}


Category

{
    "category": {
        "id": "999", // integer
        "elements_count": "1", // integer
        "name": "Demo Category",
        "project-id": "999", // integer
        "type": "FileCategory", // type of category 
        "parent-id": "" // parent category id, integer, default=0 (Root)
    }
}


Comment

{
    "comment": {
        "id": "999", // integer
        "commentable_type": "todo_items", // todo_items, milestones, notebooks, links, files
        "body": "A test comment",
        "author_id": "999",
        "author-firstname": "Demo",
        "author-lastname": "User",
        "author-avatar-url": "http://sitename.teamwork.com/images/avatar.jpg",
        "commentable-id": "999", // integer
        "attachments-count": "0", // integer
        "emailed-from": "", 
        "datetime": "2014-04-02T10:54:05Z", // datetime
        "private": false, // boolean
    }
}

Note: For comments on files, the commentable_type field is FILES but the commentable-id is the File Version ID


Company

{
    "company": {
        "id": "999", // integer
        "can_see_private": false, // boolean
        "company_name_url": "14674-demo-2-company",
        "name": "Demo 2 Company",
        "address_one": "Address Line 1",
        "address_two": "Address Line 2",
        "city": "City",
        "state": "State",
        "zip": "",
        "country": "Ireland",
        "website": "http://demo2company.com",
        "phone": "",
        "fax": ""    
    }
}


Message

{
    "post": {
        "id": "999", // integer
        "title": "Message Title",
        "author-id": "999", // integer
        "author-first-name": "Demo",
        "author-last-name": "User",
        "author-avatar-url": "http://sitename.teamwork.com/images/avatar.jpg",
        "body": "Message body",
        "category-id": "", // integer
        "posted-on": "2014-03-31T18:11:03Z", // datetime
        "project-id": "999", // integer
        "comments-count": "1", // integer
        "attachments-count": "0", // integer
        "display-body": "Updated message content goes here",
        "private": false // boolean
    }
}


Message Reply

{
    "messageReplies": [
        {
            "id": "999", // integer
            "title": "Title",
            "author-id": "999",
            "author-firstname": "Demo",
            "author-lastname": "User",
            "author-avatar-url": "https://s3.amazonaws.com/TWFiles/2/users/999.avatar",
            "body": "Reply Body",
            "category-id": "999", // integer
            "posted-on": "2014-04-01T10:04:26Z",
            "messageId": "999", // integer
            "attachments-count": "0", // integer
            "comments-count": "999", // integer
            "private": false, // boolean
            "replyNo": "999" // integer
        }
    ]
}


Milestone

{
    "milestone": {
        "id": "999", // integer
        "title": "Test Milestone",
        "project-id": "999", // integer
        "created-on": "2014-04-01T09:26:49Z", // datetime
        "creator-id": "28726", // integer
        "comments-count": "0", //integer
        "completed-on": "2014-04-02T09:26:49Z", // datetime
        "deadline": "20140401", // date
        "completed": false, // boolean
        "completer-id": "28726", // integer
        "responsible-party-ids": "999", // id's of users the milestone is assigned to, comma-seperated
        "responsible-party-names": "Demo U.", // user names that the milestone is assigned to
        "reminder": false, // boolean
        "private": false // boolean
    }
}


Notebook

{
    "notebook": {
        "id": "999", // integer
        "name": "Test notebook",
        "description": "Notebook description",
        "content": "<p>some text</p>", // HTML content only if requested
        "private": "0", // integer
        "category-id": "999", // integer
        "category-name": "Demo Notebooks 2", 
        "created-date": "2014-03-31T11:56:46Z", // date
        "created-by-userId": "999", // integer
        "created-by-userfirstname": "Demo", 
        "created-by-userlastname": "User",
        "locked": "0", // integer
        "locked-date": "", // date
        "locked-by-userid": "999", // integer
        "locked-by-userfirstname": "Demo",
        "locked-by-userlastname": "User",
        "project-id": "999" // integer
    }
}


Permissions

{
  "permissions": {
    "view-messages-and-files": "1",  // 1|0 (numeric)
    "view-tasks-and-milestones": "1", // 1|0 (numeric)
    "view-time": "1", // 1|0 (numeric)
    "view-notebooks": "1", // 1|0 (numeric)
    "view-risk-register": "0", // 1|0 (numeric)
    "view-invoices": "1", // 1|0 (numeric)
    "view-links": "1", // 1|0 (numeric)
    "add-tasks": "1", // 1|0 (numeric)
    "add-milestones": "1", // 1|0 (numeric)
    "add-taskLists": "1", // 1|0 (numeric)
    "add-messages": "1", // 1|0 (numeric)
    "add-files": "1", // 1|0 (numeric)
    "add-time": "1", // 1|0 (numeric)
    "add-notebooks": "1", // 1|0 (numeric)
    "add-links": "1", // 1|0 (numeric)
    "set-privacy": "1", // 1|0 (numeric)
    "can-be-assigned-to-tasks-and-milestones": "1", // 1|0 (numeric)
    "project-administrator": "0", // 1|0 (numeric)
    "add-people-to-project": "0" // 1|0 (numeric)
  }
}


Person

{
    "person": {
        "id": "999", // integer
        "user-type": "account", // 'account' or 'contact' default:'account'
        "first-name": "Demo",
        "last-name": "User",
        "title": "",
        "email-address": "me@demo1company.com",
        "im-handle": "",
        "im-service": "",
        "notes": "",
        "phone-number-office": "",
        "phone-number-office-ext": "",
        "phone-number-mobile": "",
        "phone-number-home": "",
        "phone-number-fax": "",     
        "last-login": "2014-04-01T11:32:12Z", // datetime
        "company-id": "999", // integer
        "company-name": "Demo 1 Company",
        "in-owner-company": "1", // boolean
        "created-at": "2013-10-21T18:01:39Z", // datetime
        "last-changed-on": "2014-03-31T10:23:46Z", // datetime
        "avatar-url": "https://s3.amazonaws.com/TWFiles/2/users/999.avatar",
        "user-name": "test",
        "deleted": false, // boolean
        "has-access-to-new-projects": false, // boolean
        "administrator": true, // boolean
        "permissions": {
            "can-manage-people": true, // boolean
            "can-add-projects": true // boolean
        }
    }
}


Post

{
    "post": {
        "id": "999", // integer
        "title": "Message title",
        "body": "Message content goes here",
        "category-id": "999", // integer
        "author-id": "999", // integer
        "use-textile": false, // boolean
        "milestone-id": "999", // integer
        "posted-on": "2014-03-31T17:38:58Z", // datetime    
        "project-id": "999", // integer
        "comments-count": "0", // integer
        "attachments-count": "0", // integer
        "private": false // boolean
    }
}


Post (short version)

{
    "post": {
        "id": "999", // integer
        "title": "Message title",
        "attachments-count": "0", // integer
        "posted-on": "2014-03-31T17:38:58Z", // datetime
        "category": {
            "id": "999",
            "name": "Category name"
          }
    }
}


Project GET

{
    "project": {
      "id": "999", // integer
      "name": "demo",
      "last-changed-on": "2014-04-01T14:29:32Z", // datetime
      "show-announcement": false, // boolean
      "created-on": "2014-03-28T15:24:22Z", // datetime
      "status": "active",
        "company": {
            "name": "Demo 1 Company",
            "id": "999" // integer
        },
        "announcement": "",
        "notifyeveryone": false, // boolean
        "starred": false,
        "startDate": "",
        "endDate": "",
        "start-page": "projectoverview",
        "harvest-timers-enabled": "true"
    }
}


Project POST/PUT

{
    "project": {
        "name": "demo",
        "description": "Optional description",
        "companyId": "999" // integer,
        "newCompany": "Optional if creating a new company",
        "category-id": "999" // integer (optional),
        "start-date": "",
        "end-date": "",
        "use-tasks" : "1", // 1|0 (numeric)
        "use-milestones" : "1", // 1|0 (numeric)
        "use-messages" : "1", // 1|0 (numeric)
        "use-files" : "1", // 1|0 (numeric)
        "use-time" : "1", // 1|0 (numeric)
        "use-notebook" : "1", // 1|0 (numeric)
        "use-riskregister" : "1", // 1|0 (numeric)
        "use-links" : "1", // 1|0 (numeric)
        "use-billing" : "1", // 1|0 (numeric)
        "start-page": "projectoverview",
        "harvest-timers-enabled": "true",
        "defaultPrivacy": "open"
    }
}


Project Category

{
    "category": {
        "id": "999",
        "elements_count": "1",
        "name": "Demo Project Category",
        "type": "ProjectCategory", 
        "parent-id": "999" // parent category id, default=0 (Root)
    }
}


{
    "link": {
        "id": "999", // integer
        "project-id": "999",
        "name": "Website",
        "description": "Link to the website",
        "created-by-userfirstname": "Demo",
        "height": "600", // height of window in Teamwork (integer)
        "private": "0",
        "width": "800", // width of window in Teamwork (integer)
        "created-by-userId": "999",
        "created-by-userlastname": "User",
        "category-id": "999",
        "project-name": "demo",
        "open-in-new-window": false, // Force link to open in new window (boolean) 
        "provider": "default", // String identifier we detect from the Code value
        "created-date": "2014-03-31T13:17:14Z",
        "category-name": "Demo Links 2",
        "code": "http://demo1company.com",
    }
}


Time entry (GET)

{   
    "time-entry": {
        "project-id": "999",
        "minutes": "15", // An integer of the number of hours logged
        "isbillable": false, // boolean
        "person-first-name": "Demo",
        "todo-list-name": "Inbox",
        "description": "",
        "todo-item-name": "Task name",
        "todo-list-id": "999", 
         "tags": [
           {
             "name": "tag1",
             "id": "15990",
             "color": "#2f8de4"
           },
           {
             "name": "tag2",
             "id": "15991",
             "color": "#2f8de4"
         },
        "company-id": "999",
        "person-id": "999",
        "project-name": "demo",
        "company-name": "Demo 1 Company",
        "id": "999",
        "date": "2014-03-30T10:10:00Z",
        "todo-item-id": "999", // Associated todo item Id
        "invoiceNo": "",
        "person-last-name": "User",
        "has-start-time": true,
        "hours": "1" // An integer of the number of hours logged
    }
}


Time entry (PUT/POST)

{
    "time-entry" : {
        "date" : "20150201",
        "has-start-time" : true,
        "time" : "14:30",
        "minutes":15,
        "hours":1,
        "description":"Sample time entry",
        "markTaskComplete":false,
        "tags":"Support,API",
        "isBillable":false      
    }   
}


Todo item

{
    "todo-item": {
        "canComplete": true,
        "project-id": "23097",
        "creator-lastname": "User",
        "has-reminders": false,
        "todo-list-name": "Todos",
        "has-unread-comments": false,
        "due-date-base": "20140405",
        "order": "1002",
        "comments-count": "2",
        "private": "0",
        "grant-access-to": "12345,54321",
        "status": "reopened",
        "todo-list-id": "58759",
        "predecessors": [],
        "created-on": "2014-04-01T15:52:15Z",
        "canEdit": true,
        "content": "Write documentation",
        "has-predecessors": "0",
        "company-name": "Demo 1 Company",
        "id": "999",
        "creator-firstname": "Demo",
        "last-changed-on": "2014-04-02T11:05:19Z",
        "due-date": "20140405",
        "has-dependencies": "0",
        "completed": false,
        "position": "1002",
        "attachments-count": "0",
        "estimated-minutes": "0",
        "description": "",
        "priority": "",
        "progress": "0",
        "harvest-enabled": false,
        "viewEstimatedTime": true,
        "parentTaskId": "12345",
        "company-id": "2",
        "tasklist-lockdownId": "",
        "creator-avatar-url": "http://sitename.teamwork.com/images/avatar.jpg",
        "canLogTime": true,
        "creator-id": "28726",
        "project-name": "demo",
        "parent-task": {
              "content": "sample parent task",
              "id": "12345"
        },
        "attachments": [],
        "responsible-party-ids": "1,2",
        "responsible-party-names": "Daniel M.|Peter C.",
        "responsible-party-summary": "You & Peter C.",
        "start-date": "20140402",
        "tasklist-private": "0",
        "timeIsLogged": "0",
        "lockdownId": "",
        "tags": [
            {
                "id": 5,
                "name": "api",
                "color": "#b1da34"
            },
            {
                "id": 4,
                "name": "documentation",
                "color": "#A9C3F9"
            }
        ]
    }
}


Todo list

{
    "todo-list": {
        "name": "Inbox",
        "description": "",
        "milestone-id": "",
        "uncompleted-count": "1",
        "complete": false,
        "private": "0",
        "overdue-count": "0",
        "project-name": "demo",
        "pinned": false,
        "projectid": "999",
        "id": "999",
        "position": "3999",
        "completed-count": "1"
    },
    "STATUS": "OK"
}

<todo-list>
    <id type="integer">#{id}</id>
    <name>#{name}</name>
    <description>#{description}</description>
    <project-id type="integer">#{project_id}</project-id>
    <milestone-id type="integer">#{milestone_id}</milestone-id>
    <position type="integer">#{position}</position>
    <private type="boolean">#{private}</private>
    <pinned type="boolean">{pinned}</pinned>
    <tracked type="boolean">#{tracked}</tracked>
    <todo-items type="array">
        <todo-item> 
            ...
        </todo-item> 
        <todo-item> 
            ...
        </todo-item>
        ...
    </todo-items>
 </todo-list>


File

"files": {
      {
        "project-id": "999",
        "can-upload-new-version": true,
        "uploaded-date": "2016-01-01T12:00:00Z",
        "extraData": "",
        "private": "0",
        "version-id": "12345",
        "userFollowingComments": false,
        "comments-count": "0",
        "status": "active",
        "changeFollowerIds": "",
        "tags": [],
        "version": "1",
        "id": "999",
        "last-changed-on": "2015-01-01T12:00:00Z",
        "commentFollowerIds": "",
        "shareable": true,
        "versions": [],
        "thumbURL": "https://sitename.teamwork.com/?action=getThumb&ref=999",
        "uploaded-by-user-first-name": "Daniel",
        "uploaded-by-user-last-name": "Mackey",
        "name": "image.jpg",
        "uploaded-by-userId": "12345",
        "userFollowingChanges": false,
        "description": "",
        "category-id": "",
        "originalName": "imaage.jpg",
        "size": "50000",
        "file-source": "teamwork",
        "category-name": ""
      }
    }


Timezone Info

ID Name
83 Abu Dhabi
123 Adelaide
2 Alaska
98 Almaty
41 Amsterdam
4 Arizona
99 Astana
61 Athens
23 Atlantic Time (Canada)
136 Auckland
33 Azores
75 Baghdad
84 Baku
104 Bangkok
108 Beijing
42 Belgrade
43 Berlin
44 Bern
20 Bogota
28 Brasilia
45 Bratislava
145 Brazil (Acre)
146 Brazil (DeNoronha)
148 Brazil (East)
147 Brazil (West)
125 Brisbane
46 Brussels
62 Bucharest
47 Budapest
29 Buenos Aires
63 Cairo
126 Canberra
34 Cape Verde Is.
24 Caracas
35 Casablanca
15 Central America
6 Central Time (US & Canada)
93 Chennai
142 Chennai, Kolkata, Mumbai, New Delhi
13 Chihuahua
109 Chongqing
48 Copenhagen
144 Cork
124 Darwin
100 Dhaka
36 Dublin
7 Eastern Time (US & Canada)
37 Edinburgh
89 Ekaterinburg
137 Fiji
30 Georgetown
31 Greenland
16 Guadalajara
127 Guam
149 Guatemala
105 Hanoi
64 Harare
1 Hawaii
65 Helsinki
128 Hobart
110 Hong Kong
143 Iceland
8 Indiana (East)
111 Irkutsk
90 Islamabad
66 Istanbul
106 Jakarta
67 Jerusalem
88 Kabul
138 Kamchatka
91 Karachi
97 Kathmandu
94 Kolkata
107 Krasnoyarsk
112 Kuala Lumpur
76 Kuwait
68 Kyev
25 La Paz
21 Lima
38 Lisbon
49 Ljubljana
39 London
50 Madrid
133 Magadan
139 Marshall Is.
14 Mazatlan
129 Melbourne
17 Mexico City
32 Mid-Atlantic
10 Midway Island
69 Minsk
40 Monrovia
18 Monterrey
151 Montevideo
77 Moscow
5 Mountain Time (US & Canada)
95 Mumbai
85 Muscat
78 Nairobi
134 New Caledonia
96 New Delhi
27 Newfoundland
101 Novosibirsk
141 Nuku'alofa
118 Osaka
150 Oslo
3 Pacific Time (US & Canada)
51 Paris
113 Perth
130 Port Moresby
52 Prague
70 Pretoria
22 Quito
103 Rangoon
71 Riga
79 Riyadh
53 Rome
11 Samoa
26 Santiago
119 Sapporo
54 Sarajevo
19 Saskatchewan
120 Seoul
114 Singapore
55 Skopje
72 Sofia
135 Solomon Is.
102 Sri Jayawardenepura
80 St. Petersburg
56 Stockholm
131 Sydney
115 Taipei
73 Tallinn
92 Tashkent
86 Tbilisi
82 Tehran
12 Tijuana
121 Tokyo
116 Ulaan Bataar
117 Urumqi
57 Vienna
74 Vilnius
132 Vladivostok
81 Volgograd
58 Warsaw
140 Wellington
59 West Central Africa
152 Windhoek
122 Yakutsk
87 Yerevan
60 Zagreb