To get access to the API, please drop us a message.
Tyme uses the OAuth v2 standard for authenticating users. To make yourself familiar with OAuth, please take a look at the introduction at oauth.net.
Login form to log the user in and redirect them to your app
GET /v1/authorize
Parameters:
{
"response_type": "code",
"client_id": "YOUR_CLIENT_ID",
"state": "YOUR_STATE",
"redirect_uri": "YOUR_REDIRECT_URI"
}
Exchange the authcode with an access & refresh token
POST /v1/access_token
Parameters:
{
"grant_type": "authorization_code",
"code": "YOUR_AUTH_CODE",
"redirect_uri": "YOUR_REDIRECT_URI",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}
Exchange the refresh token with a new access token
POST /v1/refresh_token
Parameters:
{
"grant_type": "refresh_token",
"refresh_token": "THE_REFRESH_TOKEN",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}
You can use webhooks to subscribe for realtime notifications. The following notifications are available:
GET /webhooks/subscribe/
Parameters:
{
"hookUrl": "String",
"trigger_type": "category|project|task|subtask|time|stopped_time"
}
POST /webhooks/unsubscribe/
Parameters:
{
"hookUrl": "String",
"trigger_type": "category|project|task|subtask|time|stopped_time"
}
GET /data/search_entity/
Parameters:
{
"type": "ProjectCategory|Project|TimedTask|TimedSubTask",
// the name to search for
"name": "String",
// optional. ID of the parent entity. For example a project id when searching for a task
"parent_id": "null|String"
}
POST /data/update_entity/
Create or Update a Category:
{
"type": "ProjectCategory",
// optional. if not provided, Tyme will genereate a unique ID.
"id": "String",
"name": "String"
}
Create or Update a Project:
{
"type": "Project",
// optional. if not provided, Tyme will genereate a unique ID.
"id": "String",
"name": "String",
// optional. ID of the connected category
"category_id": "String|null",
"rounding_method": "DOWN|NEAREST|UP",
"rounding_minutes": "Int",
"hourly_rate": "Float",
// planned duration in hours (i.e. 120.5)
"planned_duration_hours": "Float",
"planned_budget": "Float"
}
Create or Update a Task:
{
"type": "TimedTask",
// optional. if not provided, Tyme will genereate a unique ID.
"id": "String",
"name": "String",
// ID of the connected project
"project_id": "String",
"billable": "Bool",
"planned_duration": "Int" // duration in seconds
}
Create or Update a Sub-Task:
{
"type": "TimedSubTask",
// optional. if not provided, Tyme will genereate a unique ID.
"id": "String",
"name": "String",
// ID of the connected task
"task_id": "String",
"planned_duration": "Int" // duration in seconds
}
Create or Update a Time Entry:
{
"type": "TimedTaskRecord",
// optional. if not provided, Tyme will genereate a unique ID.
"id": "String",
// ID of the connected task or empty if a child of a sub-task
"task_id": "String",
// ID of the connected sub-task if or empty is not a child of a sub-task
"subtask_id": "String",
"time_start": "DateTime",
// null if the time entry is still running
"time_end": "DateTime|null",
"note": "String"
}
GET /data/summary/
Task Summary:
{
"from": "DateTime", // i.e. 2000-01-01 00:00:00
"to": "DateTime"
}