- Every operation reads. This plugin covers DeskTime’s read actions, so nothing here can change an account. All seven operations are
readand none is irreversible. DeskTime also hascreate-project,start-projectandstop-project, which do change an account; they are not part of this plugin. - Every call needs a key.
pingis served openly by DeskTime, but the Corsair runtime resolves the account key before any endpoint runs, so a call without one raisesAuthMissingErrorlike the rest. - Keys are per tenant. Each tenant saves the key of its own DeskTime account, through a connect link or with
corsair.withTenant(id).desktime.keys.set_api_key(key).desktime({ key })at registration is sent for every tenant and takes priority over their saved keys, so every tenant would read that one account’s employees. Pass it only when the whole app reads a single DeskTime account. - The API returns mixed field casing.
groupIdandonlineTimeare camelCase whilework_startsandnotesare snake_case, and this plugin keeps the names exactly as sent. arrived,left,work_startsandwork_endsare timestamps or the booleanfalse. The help-center examples only show the timestamp form, so a schema that assumes a string rejects every response for an employee who has not clocked in yet.- A bad date or period is ignored, not rejected. DeskTime answers with today’s data instead of an error, so this plugin validates both before sending. Dates must be real calendar days, not just the right shape.
employees.listnests two levels deep. The response is keyed by date, then by employee id, so a week request returns seven buckets.periodacceptsday,weekormonth. This plugin also exposes a flattenedbucketsarray, newest first, with the date kept on each entry.employee.appsgroups by productivity class. The raw keys are-1unrated,0neutral and1productive; a labelledapps_by_productivitymap is returned alongside them.- Rate limits. DeskTime sends
x-ratelimit-limit: 600and noRetry-After. A 429 is retried after the header if present, otherwise after one minute. A 401 or 403 is never retried, because only a person can fix a key. - No webhooks. DeskTime sends none, so the plugin declares no webhook surface.
- 7 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
No setup required yet. When you make your first request as a tenant, Corsair prompts for the API key.More: API Key
4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List one day of tracked timeWhat’s next
API reference
Every
desktime.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.