TaskDash/API reference

API reference

A small, read only REST API over HTTPS. JSON in, JSON out. Keys are scoped and can never change data.

https://www.taskdash.online/api/v1Base address
600 requests a minutePer key

Authentication

Create a key in the panel under Developers. Owners and anyone with the Developer role can do this. Choose its scopes: status, time, activity and payroll. A key is shown once; store it like a password.

curl -H "Authorization: Bearer td_your_key" https://www.taskdash.online/api/v1/users?status=active

If a proxy strips the Authorization header, send X-API-Key: td_your_key instead. Times are unix seconds in UTC. Ranges can span at most 400 days.

Errors

Errors come back as {"error": "what went wrong"} with a matching status: 401 for a missing or revoked key, 403 when the key lacks a scope, 404 for unknown ids, 429 when you pass the rate limit.

Authentication

GET/mescope: any

Tells you which team and scopes a key has. Use it to test a key.

{
  "team": {"id": 1, "name": "Halden & Co"},
  "key": {"name": "Status board", "prefix": "td_3f9a1c0", "scopes": ["status"], "created": 1792900000}
}

People and status

GET/users?status=activescope: status

Everyone in the team with their live status: active, break or inactive. status can be active, inactive or all.

  • status active, inactive or all (default all)
  • since unix seconds for today_secs, default midnight UTC
{
  "count": 1,
  "users": [{"id": 4, "name": "Priya Nair", "email": "[email protected]", "status": "active",
             "project": "Homepage build", "since": 1792908000, "today_secs": 15840,
             "screenshots_paused": false, "last_seen": 1792915200}]
}
GET/users/{id}scope: status

One person, same fields as above.

curl -H "Authorization: Bearer td_your_key" \
  https://www.taskdash.online/api/v1/users/{id}

Time

GET/projectsscope: time

All projects of the team.

curl -H "Authorization: Bearer td_your_key" \
  https://www.taskdash.online/api/v1/projects
GET/time?from=&to=&user=scope: time

Time entries and totals per person in a range (unix seconds, at most 400 days).

  • from start, unix seconds
  • to end, unix seconds
  • user optional person id
{
  "from": 1792800000, "to": 1792886400,
  "totals": [{"user_id": 4, "name": "Priya Nair", "secs": 28440}],
  "entries": [{"id": 912, "user_id": 4, "project": "Homepage build", "start": 1792832400,
               "stop": 1792846800, "secs": 14400, "source": "app", "manual": 0, "late": 0}]
}

Activity

GET/activity?from=&to=&user=&tz=scope: activity

Categories, apps, work-related share and activity level. tz is the offset in minutes east of UTC for day buckets.

{
  "secs": 28440, "work_related_pct": 91, "activity_pct": 74,
  "categories": [{"category": "Development", "secs": 15600, "pct": 54.8}],
  "apps": [{"app": "Code", "secs": 12000, "cls": "work", "category": "Development", "users": 1}]
}

Payroll

GET/payroll?from=&to=scope: payroll

Hours, rate and money earned per person in a period: work, paid leave and holidays, bonuses, and what was already paid.

{
  "people": [{"user_id": 4, "name": "Priya Nair", "hours": 152.5, "pay_type": "hourly", "rate": 18.0,
              "currency": "USD", "earned": 2745.0, "paid": 0.0}]
}
GET/payouts?from=&to=scope: payroll

Payouts with bill numbers and status (draft or paid).

curl -H "Authorization: Bearer td_your_key" \
  https://www.taskdash.online/api/v1/payouts?from=&to=

Webhooks

Set an address in the panel under Developers. Each event is a POST with a JSON body and two headers: X-TrueDuty-Event and X-TrueDuty-Signature: sha256=<hex>, the HMAC-SHA256 of the raw body with your signing secret.

{
  "event": "user.inactive",
  "time": 1792915200,
  "team": "Halden & Co",
  "user": {"id": 4, "name": "Priya Nair", "email": "[email protected]"},
  "data": {"reason": "idle"}
}
user.active
Someone started tracking.
{"project": "Homepage build"}
user.inactive
Someone stopped. reason is stopped, idle or break.
{"reason": "idle"}
screenshots.paused
Someone paused screenshots.
{"minutes": 60, "until": 1792919000}
screenshots.resumed
Screenshots are back on.
{}
screenshots.consent
Someone agreed to or withdrew from screenshots.
{"consent": true}
payout.paid
A payout was marked paid.
{"number": "TD-1-00012", "amount": 2745.0, "currency": "USD"}
test
Sent from the panel to check your endpoint.
{"hello": "from TaskDash"}