---
title: "Creates a new timesheet entry. If Duration is null or 0, a timer will be started automatically. Requires ProjectIDFK and TimesheetCategoryIDFK."
method: POST
path: "/api/Timesheet"
tags: ["Timesheet"]
---

# Creates a new timesheet entry. If Duration is null or 0, a timer will be started automatically. Requires ProjectIDFK and TimesheetCategoryIDFK.

`POST /api/Timesheet`

## Request body

- NewTimesheet — Request model for creating a new timesheet entry. If Duration is null or 0, a timer is started automatically.
  - `UserIDFK` integer — UserID for a Timesheet user in Avaza
  - `ProjectIDFK` integer — The project to associate the timesheet with.
  - `TimesheetCategoryIDFK` integer — The Project timesheet category to link the timesheet to
  - `Duration` number, double — The duration of the timesheet, in decimal hours. If null or 0, a timer will be started.
  - `isInvoiced` boolean — Optional. False by default. Allows you to mark the timesheet as invoiced in an external system.
  - `EntryDate` string, date-time — The date of the timesheet entry, with an optional start time component.
  - `hasStartEndTime` boolean — If true, the start time will be take from the time component of the Entry Date field, and the end time will be calculated by adding the Duration to the StartDate
  - `Notes` string — Timesheet Notes
  - `TaskIDFK` integer — Optional. Link the timesheet to a specific task
  - `CustomMetadata` string — Optional. free nvarchar field available via Api to store any additional metadata against a timesheet. We suggest you use Json or your preferred serialisation format. 1000 characters max.
  - `SendWebhooks` boolean — If true, fires the timesheet_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.

## Response `200`

Returns the created timesheet entry. If Duration was 0 or null, a timer is started.

- TimesheetDetails — Full details of a single timesheet entry including user, project, category, approval, timer, and rate information.
  - `TimesheetEntryID` integer — Unique identifier for the timesheet entry.
  - `UserIDFK` integer — The ID of the user who owns this timesheet entry.
  - `Firstname` string — First name of the timesheet user.
  - `Lastname` string — Last name of the timesheet user.
  - `Email` string — Email address of the timesheet user.
  - `ProjectIDFK` integer — The project ID this timesheet entry is associated with.
  - `ProjectTitle` string — Title of the associated project.
  - `ProjectCode` string — Project code of the associated project, if project codes are enabled.
  - `CustomerIDFK` integer — The customer/company ID associated with the project.
  - `CustomerName` string — Name of the customer/company associated with the project.
  - `TimesheetCategoryIDFK` integer — The timesheet category ID applied to this entry.
  - `CategoryName` string — Name of the timesheet category applied to this entry.
  - `Duration` number, double — Duration of the timesheet entry in decimal hours.
  - `TimesheetEntryApprovalStatusCode` string — Approval status of the entry. Values: Draft, Pending, Approved, Rejected, AutoApproved.
  - `HasTimer` boolean — Whether a timer is currently running on this entry.
  - `TimerStartedAtUTC` string, date-time — The UTC date and time at which the timer was started, if a timer is running.
  - `isBillable` boolean — Whether this timesheet entry is billable to the client.
  - `isInvoiced` boolean — Whether this timesheet entry has been included on an invoice.
  - `EntryDate` string, date-time — The date of the timesheet entry.
  - `StartTimeLocal` string, date-time — The local start time of the entry, if start/end time tracking is enabled.
  - `StartTimeUTC` string, date-time — The UTC start time of the entry, if start/end time tracking is enabled.
  - `EndTimeLocal` string, date-time — The local end time of the entry, if start/end time tracking is enabled.
  - `EndTimeUTC` string, date-time — The UTC end time of the entry, if start/end time tracking is enabled.
  - `TimesheetUserTimeZone` string — The IANA time zone ID of the user who owns the timesheet.
  - `Notes` string — Free-text notes attached to this timesheet entry.
  - `TaskIDFK` integer — The task ID this timesheet entry is linked to, if any.
  - `TaskTitle` string — Title of the task this entry is linked to.
  - `InvoiceIDFK` integer — The invoice Transaction ID this entry was billed on, if invoiced.
  - `InvoiceLineItemIDFK` integer — The invoice line item ID this entry was billed on, if invoiced.
  - `DateCreated` string, date-time — Date and time the record was created (UTC).
  - `DateUpdated` string, date-time — Date and time the record was last updated (UTC).
  - `DateApproved` string, date-time — Date and time the entry was approved, if applicable.
  - `ApprovedBy` string — Name or email of the user who approved this entry.
  - `CustomMetadata` string — Optional free-form metadata field for storing additional information. Maximum 1000 characters.
  - `RateAmount` number, double — Only visible to Admin role users
  - `CostAmount` number, double — Only visible to Admin role users
  - `ViewTimesheetURL` string — URL to view this timesheet entry's day in the Avaza web application.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized

---

[API](https://skmtc.net/avaza/apis/avaza-api-documentation.md) · [All operations](https://skmtc.net/avaza/apis/avaza-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/avaza/avaza-api-documentation/versions/1eeadf750514/schema)
