TaskLeef API-documentatie

REST API voor het beheren van taken, projecten en Kanban-borden

Laatst bijgewerkt:

Authenticatie

De API ondersteunt twee authenticatiemethoden:

1. Authenticatie met API-sleutel (aanbevolen)

Generate an API key from your Settings page and include it in the X-API-Key header:

curl -H "X-API-Key: your-api-key" \
  https://taskleef.com/api/todos

2. JWT Bearer-token

Authenticeer voor browsergebaseerde applicaties via het login-endpoint:

curl -X POST https://taskleef.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": "your-username", "password": "your-password"}'

Voeg het token vervolgens toe aan volgende verzoeken:

curl -H "Authorization: Bearer your-jwt-token" \
  https://taskleef.com/api/todos

Taken

GET/api/todos

Haal alle taken op voor de geauthenticeerde gebruiker.

curl -H "X-API-Key: your-api-key" \
  https://taskleef.com/api/todos
GET/api/todos/{id}

Haal een specifieke taak op via ID.

GET/api/inbox

Haal taken op die niet aan een project zijn toegewezen.

POST/api/todos

Maak een nieuwe taak.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "Buy groceries", "description": "Milk, eggs, bread"}' \
  https://taskleef.com/api/todos

Request body

VeldTypeVereistBeschrijving
titlestringYesTodo title
descriptionstringNoDetailed description
dueDateISO 8601NoDue date/time
prioritystringNoLow, Medium, High, or Urgent
projectIdUUIDNoAssign to a project
PUT/api/todos/{id}

Werk een bestaande taak bij.

PATCH/api/todos/{id}/complete

Schakel de voltooiingsstatus van een taak om.

curl -X PATCH -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"isCompleted": true}' \
  https://taskleef.com/api/todos/{id}/complete
DELETE/api/todos/{id}

Verwijder een taak.

POST/api/todos/{parentId}/subtasks

Maak een subtaak onder een bovenliggende taak.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "Subtask title"}' \
  https://taskleef.com/api/todos/{parentId}/subtasks

Projecten

GET/api/projects

Toon alle projecten voor de geauthenticeerde gebruiker.

POST/api/projects

Maak een nieuw project.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "Work Tasks", "description": "Tasks for work"}' \
  https://taskleef.com/api/projects
GET/api/projects/{id}

Haal een specifiek project met zijn taken op.

PUT/api/projects/{id}

Werk een project bij.

DELETE/api/projects/{id}

Verwijder een project (taken worden naar het postvak verplaatst).

Kanban-borden

GET/api/boards

Toon alle borden waartoe de gebruiker toegang heeft.

POST/api/boards

Maak een nieuw bord.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "Sprint Board", "projectId": "project-uuid"}' \
  https://taskleef.com/api/boards
GET/api/boards/{id}

Haal een specifiek bord op.

GET/api/boards/{boardId}/columns

Haal alle kolommen van een bord op.

GET/api/boards/{boardId}/todos

Haal alle taken op die kaarten op dit bord hebben.

Kolommen

POST/api/boards/{boardId}/columns

Maak een nieuwe kolom op een bord.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "In Progress", "wipLimit": 3}' \
  https://taskleef.com/api/boards/{boardId}/columns
PUT/api/columns/{id}

Werk een kolom bij (titel, WIP-limiet, voltooiingscriteria).

GET/api/columns/{columnId}/cards

Haal alle kaarten in een kolom op.

DELETE/api/columns/{id}

Verwijder een kolom.

Kaarten

Kaarten vertegenwoordigen taken op een Kanban-bord. Een taak kan kaarten op meerdere borden hebben.

POST/api/columns/{columnId}/cards

Maak een kaart voor een taak in een kolom.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"todoId": "todo-uuid"}' \
  https://taskleef.com/api/columns/{columnId}/cards
PUT/api/cards/{id}

Werk een kaart bij (verplaats naar een andere kolom of subkolom).

# Move card to a different column
curl -X PUT -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"columnId": "new-column-uuid", "subColumn": "Inbox"}' \
  https://taskleef.com/api/cards/{id}

# Move card to Done subColumn
curl -X PUT -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"subColumn": "Done"}' \
  https://taskleef.com/api/cards/{id}

Subkolomwaarden

  • Inbox - Active items in the column
  • Done - Completed items within the column
  • Blocked - Items waiting on external dependencies
DELETE/api/cards/{id}

Verwijder een kaart van het bord (verwijdert de taak niet).

Labels

GET/api/tags

Toon alle labels voor de geauthenticeerde gebruiker.

POST/api/tags

Maak een nieuw label.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"name": "urgent"}' \
  https://taskleef.com/api/tags
PUT/api/tags/{id}

Werk een label bij.

DELETE/api/tags/{id}

Verwijder een label.

Reacties

GET/api/todos/{todoId}/comments

Haal alle reacties op een taak op.

POST/api/todos/{todoId}/comments

Voeg een reactie toe aan een taak.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"text": "This is my comment"}' \
  https://taskleef.com/api/todos/{todoId}/comments
PUT/api/comments/{id}

Werk een reactie bij.

DELETE/api/comments/{id}

Verwijder een reactie.

Antwoordformaat

Succesvolle antwoorden

Geslaagde verzoeken retourneren JSON met de opgevraagde gegevens:

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "title": "Buy groceries",
  "description": "Milk, eggs, bread",
  "isCompleted": false,
  "createdAt": "2024-01-15T10:30:00Z"
}

Foutantwoorden

Fouten retourneren passende HTTP-statuscodes:

  • 400 - Bad Request (invalid input)
  • 401 - Unauthorized (missing or invalid authentication)
  • 403 - Forbidden (insufficient permissions)
  • 404 - Not Found
  • 500 - Internal Server Error

Need help? Check your Settings to manage API keys.