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.

  • Projects: list, fetch, create and update projects.
  • Tasks: list, fetch, create and update tasks.
  • Webhooks: receive events from TaskForce, and post messages into a chat channel.

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

  1. In TaskForce, open Settings > Workspace > API access. You need the manage access tokens permission.
  2. Give the token a name, pick an expiry and select its scopes.
  3. 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.

ScopeAllowsIncludes
projects:readList and read projects.-
projects:writeCreate and update projects.projects:read
tasks:readList and read tasks.-
tasks:writeCreate 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-ID and 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:

FieldTypeDescription
successbooleantrue for 2xx responses from the controllers, false for handled errors.
messagestringHuman-readable message. Empty string on reads, for example Task created successfully on writes.
dataobject | nullThe resource, or { projects | tasks, meta } on list endpoints. null on errors.
errorsobject | nullValidation errors keyed by field (camelCase). Only present on error responses.
metaobjectAlways {} 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

StatusErrorWhen
401UnauthenticatedNo token, an unknown or revoked token, or an expired token.
401Deactivated userThe user who owns the token has been deactivated.
403Missing scopeThe token lacks a scope the endpoint needs. The message lists every missing ability. A non-integration token also misses integration-api.
403Workspace mismatchX-Tenant-ID was sent and differs from the token's workspace.
403No workspace accessThe token owner is no longer an active member of the token's workspace.
403Project outside the workspaceCreating a task in, or moving a task to, a project that exists but belongs to another workspace.
404Not foundThe id does not exist in the token's workspace. Projects and tasks of other workspaces are reported as not found.
422Validation failedA 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.
422Nothing to updateA PATCH request without any recognised field.
429Too many requestsMore 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:

ParameterTypeDescription
pageintegerPage number. Default 1.
per_pageintegerItems 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.

  • meta is nested inside data, next to the list. The top-level meta is always {}.
  • from and to are null when 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-Limit and X-RateLimit-Remaining. A 429 also carries Retry-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;
A brighter way to work

Bring your team and AI agents together, starting today.