TaskForce External API
A REST API for reading and writing projects and tasks in your TaskForce workspace, plus outbound webhooks for reacting to changes made in the app.
Overview
All endpoints live under one base URL and speak JSON:
https://app.taskforce.place/api/v1/external The External API covers projects and tasks only: no delete endpoints, comments or users. Other /api routes are internal to the web app and not supported for integrations.
Authentication
Every request needs an integration token in the Authorization header:
Authorization: Bearer <token> Tokens look like <id>|<secret>, for example 12|Vx3.... Send the whole string, including the id and the pipe.
Creating a token
- In TaskForce, open Settings > Workspace > API access. You need the
manage access tokenspermission. - Give the token a name, pick an expiry and select its scopes.
- The token value is shown once, right after you create it. Only its last 4 characters are kept for display.
Expiry options in the app: 30 days, 90 days (default), 180 days, 1 year, Never (not recommended). Revoking a token in the same screen takes effect immediately.
Scopes
Each endpoint needs one scope. A write scope includes the matching read scope.
| Scope | Allows | Includes |
|---|---|---|
projects:read | List and read projects. | - |
projects:write | Create and update projects. | projects:read |
tasks:read | List and read tasks. | - |
tasks:write | Create and update tasks. | tasks:read |
Workspace and user
- Each token is bound to the workspace that was active when it was created. You do not need to send a workspace header. If you send
X-Tenant-IDand it does not match the token's workspace, the request fails with 403. - A token acts as the user who created it. If that user is deactivated, or loses active membership of the workspace, the token stops working.
- Only integration tokens created under API access work here. A token without the integration marker is refused with 403.
Messages are localised. Send Accept-Language: en to always get English; without it the user's or workspace's language is used.
Response envelope
Responses from the API controllers share one envelope:
| Field | Type | Description |
|---|---|---|
success | boolean | true for 2xx responses from the controllers, false for handled errors. |
message | string | Human-readable message. Empty string on reads, for example Task created successfully on writes. |
data | object | null | The resource, or { projects | tasks, meta } on list endpoints. null on errors. |
errors | object | null | Validation errors keyed by field (camelCase). Only present on error responses. |
meta | object | Always {} on this API. Pagination lives in data.meta, not here. |
{
"success": true,
"message": "",
"data": {
"id": 42,
"name": "Website relaunch"
},
"meta": {}
} Some errors are returned before a request reaches the API controllers. Scope, workspace and deactivated-user errors carry only success, message and errors; 401 Unauthenticated and 429 carry only message. Check the HTTP status first.
Errors
| Status | Error | When |
|---|---|---|
| 401 | Unauthenticated | No token, an unknown or revoked token, or an expired token. |
| 401 | Deactivated user | The user who owns the token has been deactivated. |
| 403 | Missing scope | The token lacks a scope the endpoint needs. The message lists every missing ability. A non-integration token also misses integration-api. |
| 403 | Workspace mismatch | X-Tenant-ID was sent and differs from the token's workspace. |
| 403 | No workspace access | The token owner is no longer an active member of the token's workspace. |
| 403 | Project outside the workspace | Creating a task in, or moving a task to, a project that exists but belongs to another workspace. |
| 404 | Not found | The id does not exist in the token's workspace. Projects and tasks of other workspaces are reported as not found. |
| 422 | Validation failed | A field is missing or invalid. Keys in errors are camelCase versions of the request field names; array items keep their index, for example assigneeIds.0. |
| 422 | Nothing to update | A PATCH request without any recognised field. |
| 429 | Too many requests | More than 60 requests in a minute for the same user. Wait for Retry-After seconds. |
401 Unauthenticated
{
"message": "Unauthenticated."
} 401 Deactivated user
{
"success": false,
"message": "Your account has been deactivated. Please contact your administrator.",
"errors": null
} 403 Missing scope
{
"success": false,
"message": "Missing required token abilities: tasks:write",
"errors": null
} 403 Workspace mismatch
{
"success": false,
"message": "Token tenant scope does not match requested tenant.",
"errors": null
} 403 No workspace access
{
"success": false,
"message": "Access to organization denied for this token.",
"errors": null
} 403 Project outside the workspace
{
"success": false,
"message": "Project does not belong to active tenant",
"data": null,
"errors": null,
"meta": {}
} 404 Not found
{
"success": false,
"message": "Task not found",
"data": null,
"errors": null,
"meta": {}
} 422 Validation failed
{
"success": false,
"message": "Validation failed",
"data": null,
"errors": {
"title": [
"The title field is required."
],
"projectId": [
"The selected project id is invalid."
]
},
"meta": {}
} 422 Nothing to update
{
"success": false,
"message": "No fields to update",
"data": null,
"errors": null,
"meta": {}
} 429 Too many requests
{
"message": "Too Many Attempts."
} Pagination
List endpoints are paginated with two query parameters:
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number. Default 1. |
per_page | integer | Items per page. Default 20. Values are clamped to 1..100. |
The response puts the page next to the list: data.projects or data.tasks, and data.meta with currentPage, from, lastPage, perPage, to, total.
metais nested insidedata, next to the list. The top-levelmetais always{}.fromandtoarenullwhen the page is empty.- Results are ordered by id, newest first.
Rate limit
The API allows 60 requests per minute, counted per user.
- The limit is counted per user, not per token: every token a user creates, and that user's own use of the web app, share the same 60 requests per minute.
- Responses carry
X-RateLimit-LimitandX-RateLimit-Remaining. A 429 also carriesRetry-After(seconds).
Quickstart
List your projects with curl:
export TASKFORCE_TOKEN="12|your-token"
curl "https://app.taskforce.place/api/v1/external/projects" \
-H "Authorization: Bearer $TASKFORCE_TOKEN" \
-H "Accept: application/json" Create a task from JavaScript (Node 18 or later). Keep tokens on the server; never ship one to a browser.
const BASE = "https://app.taskforce.place/api/v1/external";
const res = await fetch(`${BASE}/tasks`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.TASKFORCE_TOKEN}`,
Accept: "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({ title: "Follow up with client", project_id: 42 }),
});
const body = await res.json();
if (!body.success) throw new Error(body.message);
console.log(body.data.id); List the tasks of a project from PHP:
<?php
$ch = curl_init('https://app.taskforce.place/api/v1/external/tasks?project_id=42');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('TASKFORCE_TOKEN'),
'Accept: application/json',
],
]);
$body = json_decode(curl_exec($ch), true);
foreach ($body['data']['tasks'] as $task) {
echo $task['id'] . ' ' . $task['title'] . PHP_EOL;
}
echo 'Total: ' . $body['data']['meta']['total'] . PHP_EOL;