Account API Calls

The account API can be accessed by any user and contains basic account information. In addition we also include a basic authenticate call which is useful for checking that a user's API key is working.

Get Account Details

GET /account.json

Retrieves details about the Teamwork account. A nice about this is call is that it returns "cacheuuid" which is a string that you can use to quickly determine if the application has been updated since you last accessed it.

The user authenticating against this call must be an Administrator or you will receive an Access Denied response.

Response

{
	"STATUS": "OK",
	"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"
	}
}
See Accounts in Data reference


The 'Authenticate' Call

GET /authenticate.json

Returns details about the Teamwork account and some basic details of the current user being authenticated.

The unique thing about this call is that you call the generic URL authenticate.teamwork.com to perform this and it will return the correct URL for your installation e.g. Calling https://authenticate.teamwork.com/authenticate.json will work!

If the user is hosted in the EU Region you can make a similar call to authenticate.eu.teamwork.com such as https://authenticate.eu.teamwork.com/authenticate.json

You can use this to require users to only have to enter their API key and nothing else - clever eh!.

If it fails, you get a standard failure response.

Response

{
    "STATUS": "OK",
    "account": {
        "requirehttps": false,
        "canaddprojects": "1",
        "userIsMemberOfOwnerCompany": true,
        "name": "Demo Site",
        "userIsAdmin": true,
        "companyname": "Demo 1 Company",
        "canManagePeople": "1",
        "ssl-enabled": false,
        "firstname": "Demo",
        "dateSeperator": "/",
        "timeFormat": "h:mmtt",
        "logo": "http://demo1company.teamwork.com/images/logo.jpg",
        "avatar-url": "https://s3.amazonaws.com/TWFiles/2/users/999.avatar",
        "startonsundays": false,
        "id": "999",
        "URL": "http://demo1company.teamwork.com",
        "dateFormat": "dd/mm/yyyy",
        "lang": "EN",
        "companyid": "999",
        "code": "testing",
        "userId": "999",
        "lastname": "User"
    }
}