Onplana Timesheets API
Hours logged against tasks: create and edit your own entries
Hours logged against tasks: create and edit your own entries
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/onplana-com:onplana-com-timesheets-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Onplana Timesheets API
version: 1.0.0
description: AI-native Project Management System REST API. All org-scoped routes require the `X-Organization-Id` header. Most routes require a Bearer JWT obtained from `/auth/login`.
servers:
- url: /api
security:
- bearerAuth: []
- patAuth: []
tags:
- name: Timesheets
description: 'Hours logged against tasks: create and edit your own entries'
paths:
/timesheets:
get:
tags:
- Timesheets
summary: List timesheet entries
description: Needs the TIMESHEETS_READ scope on a token, and time tracking on the plan (402 otherwise). The caller's own entries, or the organization's for an Owner, Admin, Manager or timesheet approver; userId names one person, refused with 403 for anyone but yourself unless you see the organization. startDate and endDate together take priority over weekStart (the seven days from it). Ordered by person, then date.
parameters:
- $ref: '#/components/parameters/OrgHeader'
- name: userId
in: query
required: false
schema:
type: string
description: One person's entries
- name: weekStart
in: query
required: false
schema:
type: string
description: First day of a week, YYYY-MM-DD; returns that day and the six after it
- name: startDate
in: query
required: false
schema:
type: string
description: 'With endDate: entries on or after this day, YYYY-MM-DD'
- name: endDate
in: query
required: false
schema:
type: string
description: 'With startDate: entries before this day, YYYY-MM-DD'
- name: status
in: query
required: false
schema:
type: string
description: DRAFT, SUBMITTED, APPROVED or REJECTED; repeat it for more than one
responses:
'200':
description: Array of entries, each with user, task, project and approvedBy
'400':
description: Validation error
'401':
description: Unauthorized - missing or invalid JWT
'402':
description: Plan gate - feature not available on current plan
'403':
description: Forbidden - insufficient role
operationId: getTimesheets
x-operation-id-source: derived
post:
tags:
- Timesheets
summary: Log hours on a task (a DRAFT entry on the caller's own timesheet)
description: Needs the TIMESHEETS_WRITE scope on a token, and time tracking on the plan (402 otherwise). The caller must be on the project unless their organization role lets them log time on any project (403 NOT_PROJECT_MEMBER), and the task must be in it (404 TASK_NOT_IN_PROJECT). The date may not be in the future (400 DATE_IN_FUTURE) and may be refused outside the project's dates (400 DATE_BEFORE_PROJECT_START, DATE_AFTER_PROJECT_END), the project may not be closed (400 PROJECT_CLOSED), and one entry per task per day (409 DUPLICATE_ENTRY).
parameters:
- $ref: '#/components/parameters/OrgHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
taskId:
type: string
projectId:
type: string
date:
type: string
description: 'The day the work was done: YYYY-MM-DD or an ISO 8601 timestamp (year 1900 to 9999)'
hours:
type: number
minimum: 0.25
maximum: 24
description: Hours worked that day
notes:
type: string
required:
- taskId
- projectId
- date
- hours
responses:
'201':
description: The entry, status DRAFT
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetEntry'
'400':
description: Validation error
'401':
description: Unauthorized - missing or invalid JWT
'402':
description: Plan gate - feature not available on current plan
'403':
description: Forbidden - insufficient role
'404':
description: PROJECT_NOT_FOUND or TASK_NOT_IN_PROJECT
'409':
description: 'DUPLICATE_ENTRY: the caller already has an entry for this task on this day'
operationId: postTimesheets
x-operation-id-source: derived
/timesheets/{id}:
put:
tags:
- Timesheets
summary: Edit one of the caller's own timesheet entries
description: Only date, hours and notes change; an entry moves to another task or project by delete and create. A SUBMITTED or APPROVED entry cannot be edited (403); editing a REJECTED entry returns it to DRAFT. A new date meets the same rules as a create (400, or 409 DUPLICATE_ENTRY).
parameters:
- $ref: '#/components/parameters/OrgHeader'
- name: id
in: path
required: true
schema:
type: string
description: Timesheet entry id
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
date:
type: string
description: 'The day the work was done: YYYY-MM-DD or an ISO 8601 timestamp (year 1900 to 9999)'
hours:
type: number
minimum: 0.25
maximum: 24
notes:
type: string
responses:
'200':
description: The updated entry
'400':
description: Validation error
'401':
description: Unauthorized - missing or invalid JWT
'402':
description: Plan gate - feature not available on current plan
'403':
description: Forbidden - insufficient role
'404':
description: Not one of the caller's entries
'409':
description: DUPLICATE_ENTRY
operationId: putTimesheetsById
x-operation-id-source: derived
delete:
tags:
- Timesheets
summary: Delete one of the caller's own timesheet entries
description: Needs the TIMESHEETS_WRITE scope on a token, and time tracking on the plan (402 otherwise). Only a DRAFT or REJECTED entry can be deleted; a SUBMITTED or APPROVED one is refused with 403.
parameters:
- $ref: '#/components/parameters/OrgHeader'
- name: id
in: path
required: true
schema:
type: string
description: Timesheet entry id
responses:
'200':
description: '`{ message }`'
'400':
description: Validation error
'401':
description: Unauthorized - missing or invalid JWT
'402':
description: Plan gate - feature not available on current plan
'403':
description: Forbidden - insufficient role
'404':
description: Not one of the caller's entries
operationId: deleteTimesheetsById
x-operation-id-source: derived
/timesheets/{id}/withdraw:
post:
tags:
- Timesheets
summary: Take back one submitted entry before it is reviewed
description: Needs the TIMESHEETS_WRITE scope on a token, and time tracking on the plan (402 otherwise). Returns the caller's own SUBMITTED entry to DRAFT. Any other status is refused with 400 NOT_WITHDRAWABLE (the body carries the status), someone else's entry with 403, and an entry an approver decided in the same moment with 409 ALREADY_REVIEWED.
parameters:
- $ref: '#/components/parameters/OrgHeader'
- name: id
in: path
required: true
schema:
type: string
description: Timesheet entry id
responses:
'200':
description: The entry, status DRAFT
'400':
description: Validation error
'401':
description: Unauthorized - missing or invalid JWT
'402':
description: Plan gate - feature not available on current plan
'403':
description: Forbidden - insufficient role
'404':
description: No such entry in the organization
'409':
description: ALREADY_REVIEWED
operationId: postTimesheetsByIdWithdraw
x-operation-id-source: derived
/timesheets/withdraw-week:
post:
tags:
- Timesheets
summary: Take back the caller's own submitted week
description: 'Needs the TIMESHEETS_WRITE scope on a token, and time tracking on the plan (402 otherwise). The mirror of submit-week: returns the caller''s SUBMITTED entries in the seven days from weekStart to DRAFT. Entries already approved or rejected stay as they are.'
parameters:
- $ref: '#/components/parameters/OrgHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
weekStart:
type: string
description: First day of the week, YYYY-MM-DD
required:
- weekStart
responses:
'200':
description: How many entries returned to DRAFT
content:
application/json:
schema:
type: object
properties:
withdrawn:
type: integer
description: Entries withdrawn
required:
- withdrawn
'400':
description: Validation error
'401':
description: Unauthorized - missing or invalid JWT
'402':
description: Plan gate - feature not available on current plan
'403':
description: Forbidden - insufficient role
operationId: postTimesheetsWithdrawWeek
x-operation-id-source: derived
/timesheets/submit-week:
post:
tags:
- Timesheets
summary: Submit the caller's own week for approval
description: Needs the TIMESHEETS_WRITE scope on a token, and time tracking on the plan (402 otherwise). Moves the caller's DRAFT entries in the seven days from weekStart to SUBMITTED and notifies the approvers. 400 when the organization has the approval workflow turned off.
parameters:
- $ref: '#/components/parameters/OrgHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
weekStart:
type: string
description: First day of the week, YYYY-MM-DD
required:
- weekStart
responses:
'200':
description: How many entries moved to SUBMITTED
content:
application/json:
schema:
type: object
properties:
submitted:
type: integer
description: Entries submitted
required:
- submitted
'400':
description: Validation error
'401':
description: Unauthorized - missing or invalid JWT
'402':
description: Plan gate - feature not available on current plan
'403':
description: Forbidden - insufficient role
operationId: postTimesheetsSubmitWeek
x-operation-id-source: derived
/timesheets/approve-week:
post:
tags:
- Timesheets
summary: Approve one person's submitted week
description: Needs the TIMESHEETS_WRITE scope on a token, and time tracking on the plan (402 otherwise). The caller must be a timesheet approver for that person (403 otherwise), and nobody approves their own week (403). Moves that person's SUBMITTED entries in the seven days from weekStart to APPROVED (a project-scoped token, only on its projects).
parameters:
- $ref: '#/components/parameters/OrgHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
userId:
type: string
description: The person whose week is approved
weekStart:
type: string
description: First day of the week, YYYY-MM-DD
required:
- userId
- weekStart
responses:
'200':
description: How many entries moved to APPROVED
content:
application/json:
schema:
type: object
properties:
approved:
type: integer
description: Entries approved
required:
- approved
'400':
description: Validation error
'401':
description: Unauthorized - missing or invalid JWT
'402':
description: Plan gate - feature not available on current plan
'403':
description: Forbidden - insufficient role
operationId: postTimesheetsApproveWeek
x-operation-id-source: derived
components:
parameters:
OrgHeader:
name: X-Organization-Id
in: header
required: true
description: UUID of the active organization. Sets org context for all scoped operations.
schema:
type: string
schemas:
TimesheetEntry:
type: object
properties:
id:
type: string
userId:
type: string
taskId:
type: string
projectId:
type: string
date:
type: string
format: date-time
description: The day the hours were worked.
hours:
type: number
notes:
type: string
nullable: true
status:
type: string
enum:
- DRAFT
- SUBMITTED
- APPROVED
- REJECTED
approvedById:
type: string
nullable: true
description: Who approved or rejected the entry; status says which.
approvedAt:
type: string
format: date-time
nullable: true
rejectionReason:
type: string
nullable: true
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
required:
- id
- userId
- taskId
- projectId
- date
- hours
- status
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
patAuth:
type: apiKey
in: header
name: Authorization
description: 'Personal Access Token: `Authorization: Bearer pat_<token>`. Org context is embedded in the token - no `X-Organization-Id` header required.'
oauthApp:
type: oauth2
description: Third-party OAuth app (confidential client). Register the app under Settings > Developer > OAuth apps; the person approving picks the workspace the token acts in. Tokens last 90 days and extend while in use; there is no refresh token, so a dormant connection re-consents.
flows:
authorizationCode:
authorizationUrl: /oauth/authorize
tokenUrl: /oauth/token
scopes:
tasks: Read and write the tasks assigned to the person, read their projects, log their time.
schedule: Read projects and create or update them (publish a schedule).
mcp: The MCP tool surface, as a member-capped agent persona.
webhooks: Create, list, change and delete the app's own webhook subscriptions.