Skip to main content

Create Time Entry

POST /public/action/timeWorked/create

Logs a completed time entry, optionally creating the client / project / deliverable if missing. Start and end timestamps are required, and the end cannot precede the start. The user defaults to the workspace owner. IDs and relationships are validated in the API key’s workspace.

Use List time entries to discover entry IDs and Update time entry to edit them.

Authentication: X-API-KEY header (see Authentication).

Request body​

FieldTypeDescription
timerStartdatetimeStart timestamp.
timerEnddatetimeEnd timestamp.
clientNamestringClient name.
projectNamestringProject name.
deliverableNamestringDeliverable name.
notesstringClient-facing notes used when invoicing this time.
internalNotesstringPrivate team notes, excluded from invoices and client-facing responses.
customFieldsobjectPrivate JSON integration metadata, separate from configured custom fields.
clientIdstringClient ID; takes precedence over clientName.
projectIdstringProject ID; takes precedence over projectName and determines the client.
deliverableIdstringTask ID; takes precedence over deliverableName. Supports standalone tasks.
ticketIdstringTicket ID; cannot be combined with a project or task.
userIdintegerWorkspace member ID; takes precedence over userEmail.
billablebooleanDefaults to true. Project billing rules still determine billing classification.
pausedSecondsintegerDefaults to zero; non-negative and cannot exceed elapsed time.
formatstringMarkdown (default) or HTML.
userEmailstringUser the time is logged for.
createClientbooleanCreate the client if it does not exist.
createProjectbooleanCreate the project if it does not exist.
createDeliverablebooleanCreate the deliverable if it does not exist.

Request​

curl -X POST https://api.withmoxie.com/public/action/timeWorked/create \
-H "X-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"timerStart": "2026-07-08T09:00:00Z", "timerEnd": "2026-07-08T10:30:00Z", "clientName": "Acme Kft.", "projectName": "Website Redesign", "userEmail": "jane@acme.example"}'

Response​

Returns the created TimerEvent.

{
"id": "66b0f7f6c3a9e40012ab7200",
"accountId": 10016,
"clientId": "66b0f2a1c3a9e40012ab34cd",
"projectId": "66b0f4c3c3a9e40012ab6611",
"deliverableName": "Design homepage",
"timerStart": "2026-07-08T09:00:00Z",
"timerEnd": "2026-07-08T10:30:00Z",
"notes": null,
"userId": 5567,
"invoiceId": null
}