Toggle Sidebar

TrackingTime API

The TrackingTime API allows you to integrate our features and your account data into your own applications. If you build something awesome with our API, find any issues or have any questions, please let us know.

Making a Request

All request URLs start with this base URL. Requests must be sent via SSL. The path is prefixed with the API version. If we change the API in backward-incompatible ways, we'll bump the version marker and maintain stable support for the old URLs.

https://app.trackingtime.co/api/v4/

To list all your company tasks, you'd append the tasks' endpoint path to the base url to get this:

https://app.trackingtime.co/api/v4/tasks

Important: Since we added multi-account support, you must now include the account id of one of the user's teams in the endpoint path to retrieve the data associated to that account.

https://app.trackingtime.co/api/v4/:account_id/:endpoint_path, e.g.
https://app.trackingtime.co/api/v4/12345/tasks

You can retrieve all the teams you belong to using the Teams endpoints. If you don't specify an account id, the id of the original account will be used.

Authentication

To hit the ground running with the API, you can use HTTP Basic Authentication with your own email and password. Instead of using your password, we can provide you with a bearer token to use instead. This is secure since all requests use SSL. Please contact us to request your bearer token.

curl -u username:password https://app.trackingtime.co/api/v4/tasks

If you enter that URL in your browser you'll be asked to provide your user credentials.


Supplying basic auth headers

You need to construct and send basic auth headers with your requests, specifying your email (username) and password. To do this you need to perform the following steps:

  1. Build a string of the form email:password, e.g. "john@doe.com:MyPassWord".
  2. BASE64 encode the string.
  3. Supply an Authorization header with content Basic followed by the encoded string. For example, the string "john@doe.com:MyPassWord" encodes to ImpvaG5AZG9lLmNvbTpNeVBhc3NXb3JkIg== in Base64, so you would make the request as follows:
curl -D- \
   -X GET \
   -H "Authorization: Basic ImpvaG5AZG9lLmNvbTpNeVBhc3NXb3JkIg==" \
   -H "Content-Type: application/json" \
   "https://app.trackingtime.co/api/v4/tasks"

Identifying your App

Your requests must include a User-Agent header with the name of your application and a link to your website or your email address so that we can reach out to you. You might also want to include your app's version.

User-Agent: 'MyApp, Inc. (http://myapp.com/contact)'

User-Agent: 'MyApp v1.2 (email@yourapp.com)'
                
curl -u username:password -H User-Agent: 'MyApp (yourname@example.com)' https://app.trackingtime.co/api/v4/tasks

Standard JSON Response

All API endpoints return a JSON object with the following format:

{
    "response": {
    "status": 200,
    "version": "4.0",
    "message": "ok",
    "note": null,
    "note_type": null
    },
    "data": {
    }
}

This are the standard response parameters for all API calls.


  • version: The API version that handled the request.
  • status: The HTTP response status code as described here.
  • message: The server response message, if any.
  • note: Contains additional information for the end user.
  • note_type: [INFO | WARNING | ERROR | ALERT]

For example, the get task endpoint will return a JSON response like this:

{
    "response": {
        "status": 200,
        "message": "ok",
        "note": null,
        "note_type": null
    },
    "data":
    [
        {
            "name": "Management",
            "project_id": 5348,
            "project": "Tracking Time v2",
            "priority": 0,
            "estimated_time": 900.0,
            "accumulated_time": 708869,
            "is_archived": false,
            "start_date": "2013-07-19 13:21:16",
            "end_date": null,
            "due_date": null
        }
    ]
}

If an error occurs the response status will be set to 500 and you'll get an error description in the response message. Callers should always check the value of the status parameter in the response.

{"response":{"status":500,"message":"There is already another client with the same name."},"data":{}}

Please refer to our API guidelines to know more about our response codes, the standards we're using and more.