API Documentation
Welcome to the API documentation. This guide will help you understand how to integrate the API into your applications using our REST interface.
Base URL
Direct all API requests to: /api/v1
Quick Start
Start using the API in just 5 minutes. Follow these steps:
1. Generate an API Key
Log in to the application and go to Settings → API Keys. Click "New Key" and choose permissions.
2. Make Your First Request
Test the connection by getting a list of projects:
curl -X GET "/api/v1/projects" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Accept: application/json"
3. Explore the Response
A successful response will look like this:
{
"status": "ok",
"data": [
{
"id": 1,
"name": "My first project",
"description": "Project description",
"created_at": "2024-01-15T10:30:00Z"
}
]
}
Authentication
The API uses Bearer tokens for authentication. Every request must include a valid API key.
Authentication Methods
1. Authorization Header (recommended)
Authorization: Bearer sk_live_your_api_key
2. Query Parameter (for quick tests)
/api/v1/projects?key=sk_live_your_api_key
Key Types
sk_live_*- Production key, works with real datask_test_*- Test key (coming soon)
Permissions (Scopes)
| Scope | Description |
|---|---|
read |
Read data (GET requests) |
write |
Create and update (POST, PUT) |
delete |
Delete resources (DELETE) |
admin |
Administrative operations |
Rate Limits
The API has limits set to ensure fair access for all users.
| Plan | Limit | Window |
|---|---|---|
| Default | 1,000 requests | per hour |
Rate Limit Headers
Each response contains information about the current limit status:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998
X-RateLimit-Reset: 2024-01-15T11:00:00Z
Error Codes
The API uses standard HTTP status codes:
| Code | Meaning | Description |
|---|---|---|
200 |
OK | Request completed successfully |
201 |
Created | Resource was created |
400 |
Bad Request | Invalid request (missing parameters) |
401 |
Unauthorized | Missing or invalid API key |
403 |
Forbidden | Insufficient permissions |
404 |
Not Found | Resource does not exist |
429 |
Too Many Requests | Rate limit exceeded |
500 |
Server Error | Internal server error |
Data Hierarchy
Data is hierarchical. Understanding this structure is key for proper API usage.
- Project - Top level. Contains everything else.
- Todolist - Category/list within a project (e.g., "Backend", "Frontend").
- Todo - The actual task. Always belongs to a todolist.
Practical Example
Want to create a task? First you need a todolist_id.
You get that from a project. So the workflow is: Project → Todolist → Todo.
Projects
List Projects
Returns a list of all projects the user has access to.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| archived | boolean | optional Include archived projects |
Get Project
Returns detailed information about a specific project.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| id | integer | required Project ID |
Create Project
Creates a new project.
Request Body
| Parameter | Type | Description |
|---|---|---|
| name | string | required Project name |
| description | string | optional Project description |
$response = $client->post('/api/v1/projects', [
'json' => [
'name' => 'New client website',
'description' => 'Corporate website redesign'
]
]);
Update Project
Updates an existing project.
Delete Project
Deletes a project and all its contents. This action is irreversible!
delete.Task Lists (Todolists)
List in Project
Returns all task lists in the given project.
Create List
Creates a new task list in the project.
Request Body
| Parameter | Type | Description |
|---|---|---|
| name | string | required List name |
Tasks (Todos)
List Tasks
Returns all tasks in the given list.
Get Task
Returns detailed information about a specific task.
Create Task
Creates a new task in the list.
Request Body
| Parameter | Type | Description |
|---|---|---|
| title | string | required Task name |
| description | string | optional Task description |
| due_date | date | optional Due date (YYYY-MM-DD) |
| assigned_to | integer | optional Assigned user ID |
// 1. Get todolist ID from project
$lists = $client->get('/api/v1/projects/1/todolists');
$todolistId = $lists['data'][0]['id'];
// 2. Create task in this todolist
$response = $client->post("/api/v1/todolists/{$todolistId}/todos", [
'json' => [
'title' => 'Implement new feature',
'description' => 'Detailed task description...',
'due_date' => '2024-02-01',
'assigned_to' => 5
]
]);
$newTodo = json_decode($response->getBody(), true);
echo "Created task with ID: " . $newTodo['todo']['id'];
Update Task
Updates an existing task. You can update only the fields you want to change.
Delete Task
Deletes a task. Requires scope delete.
Get Merge Candidates
Returns a list of incomplete tasks from the same project that can be used as merge targets. The source task and archived tasks are excluded.
Response
| Field | Type | Description |
|---|---|---|
| id | integer | Task ID |
| title | string | Task name |
| completed | boolean | Completion status (always 0) |
| list_name | string | Task list name |
| time_tracked | integer | Total time in minutes |
| comments_count | integer | Number of comments |
Merge Tasks
Merges the source task into the target. Moves all time entries, comments, attachments and subtasks to the target task. The source task is deleted after merging.
Parameters (JSON body)
| Parameter | Type | Description |
|---|---|---|
| target_todo_id | integer | Required. Target task ID |
Response
| Field | Type | Description |
|---|---|---|
| success | boolean | Operation success |
| time_entries_moved | integer | Number of moved time entries |
| comments_moved | integer | Number of moved comments |
| attachments_moved | integer | Number of moved attachments |
| subtasks_moved | integer | Number of moved subtasks |
| target_todo_id | integer | Target task ID |